Browse Source

合代码冲突

research/11.0
neil 5 years ago
parent
commit
c69f90e782
  1. 19
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

19
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.DesignModelAdapter;
@ -27,9 +28,12 @@ import com.fr.form.share.ShareLoader;
import com.fr.form.ui.ChartEditor;
import com.fr.form.ui.Widget;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JWindow;
import java.util.List;
import java.util.Map;
import java.awt.Color;
import java.awt.Component;
import java.awt.Point;
@ -93,7 +97,7 @@ public class FormCreatorDropTarget extends DropTarget {
//SetSelection时要确保选中的是最顶层的布局
//tab布局添加的时候是初始化了XWCardLayout,实际上最顶层的布局是XWCardMainBorderLayout
XCreator addingXCreator = addingModel.getXCreator();
Widget widget = (addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData();
Widget widget = (addingXCreator.getBackupParent() != null && addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData();
//图表埋点
dealChartBuryingPoint(widget);
if (addingXCreator.isShared()) {
@ -284,9 +288,16 @@ public class FormCreatorDropTarget extends DropTarget {
}
private void dealChartBuryingPoint(Widget widget) {
if (widget instanceof ChartEditor) {
ChartCollection chartCollection = (ChartCollection)((ChartEditor) widget).getChartCollection();
ChartInfoCollector.getInstance().collection(chartCollection.getSelectedChartProvider(ChartProvider.class), null);
List<BaseChartCollection> chartCollections = widget.getChartCollections();
for (BaseChartCollection baseChartCollection : chartCollections) {
ChartCollection chartCollection = (ChartCollection) baseChartCollection;
for (int i = 0, size = chartCollection.getChartCount(); i < size; i++) {
ChartProvider chart = chartCollection.getChart(i, ChartProvider.class);
//是否是共享的复用组件
boolean isReuse = StringUtils.isNotEmpty(this.addingModel.getXCreator().getShareId());
ChartInfoCollector.getInstance().collection(chart, null, isReuse);
ChartInfoCollector.getInstance().checkTestChart(chart);
}
}
}
}

Loading…
Cancel
Save