|
|
@ -30,6 +30,8 @@ import java.awt.*; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class ChartFloatAction extends ElementCaseAction { |
|
|
|
public class ChartFloatAction extends ElementCaseAction { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isRecordNeeded; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 构造函数 图表插入悬浮元素 |
|
|
|
* 构造函数 图表插入悬浮元素 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -64,9 +66,10 @@ public class ChartFloatAction extends ElementCaseAction { |
|
|
|
* @return 是则返回true |
|
|
|
* @return 是则返回true |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public boolean executeActionReturnUndoRecordNeeded() { |
|
|
|
public boolean executeActionReturnUndoRecordNeeded() { |
|
|
|
|
|
|
|
isRecordNeeded = false; |
|
|
|
final ElementCasePane reportPane = (ElementCasePane) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentElementCasePane(); |
|
|
|
final ElementCasePane reportPane = (ElementCasePane) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getCurrentElementCasePane(); |
|
|
|
if (reportPane == null) { |
|
|
|
if (reportPane == null) { |
|
|
|
return false; |
|
|
|
return isRecordNeeded; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
reportPane.stopEditing(); |
|
|
|
reportPane.stopEditing(); |
|
|
@ -78,7 +81,7 @@ public class ChartFloatAction extends ElementCaseAction { |
|
|
|
chartDialog.addDialogActionListener(new DialogActionAdapter() { |
|
|
|
chartDialog.addDialogActionListener(new DialogActionAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void doOk() { |
|
|
|
public void doOk() { |
|
|
|
|
|
|
|
isRecordNeeded = true; |
|
|
|
FloatElement newFloatElement; |
|
|
|
FloatElement newFloatElement; |
|
|
|
try { |
|
|
|
try { |
|
|
|
newFloatElement = new FloatElement(chartDialog.getChartCollection().clone()); |
|
|
|
newFloatElement = new FloatElement(chartDialog.getChartCollection().clone()); |
|
|
@ -101,6 +104,6 @@ public class ChartFloatAction extends ElementCaseAction { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
chartDialog.setVisible(true); |
|
|
|
chartDialog.setVisible(true); |
|
|
|
return true; |
|
|
|
return isRecordNeeded; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |