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