|
|
|
@ -7,7 +7,6 @@ import com.fr.base.BaseUtils;
|
|
|
|
|
import com.fr.base.DynamicUnitList; |
|
|
|
|
import com.fr.base.Style; |
|
|
|
|
import com.fr.base.chart.BaseChartCollection; |
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
|
import com.fr.design.actions.ElementCaseAction; |
|
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
|
import com.fr.design.file.HistoryTemplateListPane; |
|
|
|
@ -18,8 +17,6 @@ import com.fr.design.menu.MenuKeySet;
|
|
|
|
|
import com.fr.design.module.DesignModuleFactory; |
|
|
|
|
import com.fr.grid.Grid; |
|
|
|
|
import com.fr.grid.selection.FloatSelection; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.plugin.chart.vanchart.VanChart; |
|
|
|
|
import com.fr.report.ReportHelper; |
|
|
|
|
import com.fr.report.cell.FloatElement; |
|
|
|
|
import com.fr.report.elementcase.TemplateElementCase; |
|
|
|
@ -88,16 +85,7 @@ public class ChartFloatAction extends ElementCaseAction {
|
|
|
|
|
public void doOk() { |
|
|
|
|
isRecordNeeded = true; |
|
|
|
|
FloatElement newFloatElement; |
|
|
|
|
try { |
|
|
|
|
//TODO @Bjorn 这里不知道为什么要把ChartCollection克隆一下,会导致chart的ID发生变化,影响记录埋点的功能。
|
|
|
|
|
//TODO 不知道去掉clone之后会有什么影响,下个版本的迭代中优化试着去掉clone方法,测试看看会不会有问题。
|
|
|
|
|
ChartCollection chartCollection = (ChartCollection) chartDialog.getChartCollection().clone(); |
|
|
|
|
VanChart vanChart = ((ChartCollection) chartDialog.getChartCollection()).getSelectedChartProvider(VanChart.class); |
|
|
|
|
if (vanChart != null) { |
|
|
|
|
chartCollection.getSelectedChartProvider(VanChart.class).setUuid(vanChart.getUuid()); |
|
|
|
|
} |
|
|
|
|
newFloatElement = new FloatElement(chartCollection); |
|
|
|
|
|
|
|
|
|
newFloatElement = new FloatElement(chartDialog.getChartCollection()); |
|
|
|
|
newFloatElement.setWidth(new OLDPIX(BaseChartCollection.CHART_DEFAULT_WIDTH)); |
|
|
|
|
newFloatElement.setHeight(new OLDPIX(BaseChartCollection.CHART_DEFAULT_HEIGHT)); |
|
|
|
|
|
|
|
|
@ -130,9 +118,6 @@ public class ChartFloatAction extends ElementCaseAction {
|
|
|
|
|
reportPane.getEditingElementCase().addFloatElement(newFloatElement); |
|
|
|
|
reportPane.setSelection(new FloatSelection(newFloatElement.getName())); |
|
|
|
|
reportPane.fireSelectionChangeListener(); |
|
|
|
|
} catch (CloneNotSupportedException e) { |
|
|
|
|
FineLoggerFactory.getLogger().error("Error in Float"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|