Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

feature/big-screen
Maksim 5 years ago
parent
commit
54a2cbf23d
  1. 10
      designer-base/src/main/java/com/fr/design/gui/UILookAndFeel.java
  2. 10
      designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java
  3. 46
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java
  4. 68
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java
  5. 2
      designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java
  6. 18
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java
  7. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java
  8. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java
  9. 1
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java
  10. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java
  11. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java
  12. 5
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotAxisPane.java
  13. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomAxisPane.java
  14. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomLabelPane.java
  15. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomSeriesPane.java
  16. 6
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomTooltipPane.java
  17. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java
  18. 54
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java
  19. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineWidthPane.java
  20. 88
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java
  21. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java
  22. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  23. 12
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java
  24. 134
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java
  25. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java
  26. 186
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java
  27. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanChartDataSheetPane.java
  28. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java
  29. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartTooltipPane.java
  30. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java
  31. 25
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java
  32. 5
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelPane.java
  33. 5
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java
  34. 21
      designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterLineTypePane.java
  35. 9
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java
  36. 4
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java
  37. 2
      designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java
  38. 10
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java
  39. 5
      designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java
  40. 4
      designer-realize/src/main/java/com/fr/design/actions/server/StyleManagerPane.java
  41. 41
      designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java
  42. 4
      designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java

10
designer-base/src/main/java/com/fr/design/gui/UILookAndFeel.java

@ -29,11 +29,11 @@ import com.fr.design.gui.itoolbar.UIToolBarBorder;
import com.fr.design.gui.itoolbar.UIToolBarSeparatorUI; import com.fr.design.gui.itoolbar.UIToolBarSeparatorUI;
import com.fr.design.gui.itooltip.UIToolTipBorder; import com.fr.design.gui.itooltip.UIToolTipBorder;
import com.fr.design.gui.itree.UITreeUI; import com.fr.design.gui.itree.UITreeUI;
import com.fr.design.i18n.Toolkit;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import javax.swing.ImageIcon; import javax.swing.*;
import javax.swing.UIDefaults;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import javax.swing.plaf.BorderUIResource; import javax.swing.plaf.BorderUIResource;
@ -52,6 +52,12 @@ import java.net.URL;
*/ */
public class UILookAndFeel extends MetalLookAndFeel { public class UILookAndFeel extends MetalLookAndFeel {
static {
UIManager.put("ProgressMonitor.progressText", Toolkit.i18nText("Fine-Design_Basic_ProgressBar_Title"));
UIManager.put("OptionPane.cancelButtonText", Toolkit.i18nText("Fine-Design_Basic_Cancel"));
}
public static boolean CONTROL_PANEL_INSTANTIATED = false; public static boolean CONTROL_PANEL_INSTANTIATED = false;

10
designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java

@ -229,6 +229,16 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
cellBorderStyle.setVerticalStyle(verticalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); cellBorderStyle.setVerticalStyle(verticalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE);
cellBorderStyle.setHorizontalColor(lineColor); cellBorderStyle.setHorizontalColor(lineColor);
cellBorderStyle.setHorizontalStyle(horizontalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); cellBorderStyle.setHorizontalStyle(horizontalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE);
if (leftToggleButton.isSelected() && bottomToggleButton.isSelected() && rightToggleButton.isSelected() && topToggleButton.isSelected()) {
outerToggleButton.setSelected(true);
} else {
outerToggleButton.setSelected(false);
}
if (verticalToggleButton.isSelected() && horizontalToggleButton.isSelected()) {
innerToggleButton.setSelected(true);
} else {
innerToggleButton.setSelected(false);
}
return cellBorderStyle; return cellBorderStyle;
} }

46
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java

@ -1,6 +1,10 @@
package com.fr.design.mainframe.chart.info; package com.fr.design.mainframe.chart.info;
import com.fr.base.io.BaseBook; import com.fr.base.io.BaseBook;
import com.fr.chartx.attr.ChartProvider;
import com.fr.chartx.config.info.AbstractConfig;
import com.fr.chartx.config.info.ChartConfigInfo;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.config.MarketConfig; import com.fr.config.MarketConfig;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -26,7 +30,7 @@ import java.util.Map;
public class ChartInfo extends AbstractPointInfo { public class ChartInfo extends AbstractPointInfo {
public static final String XML_TAG = "ChartInfo"; public static final String XML_TAG = "ChartInfo";
private static final String CHART_CONSUMING_URL = CloudCenter.getInstance().acquireUrlByKind("chartinfo.consuming") + "/single"; private static final String CHART_CONSUMING_URL = CloudCenter.getInstance().acquireUrlByKind("chartinfo.consuming") + "/single";
private static final String CHART_FUNCTION_URL = CloudCenter.getInstance().acquireUrlByKind("chart.info.function") + "/single";
private static final String XML_CHART_CONSUMING_MAP = "chartConsumingMap"; private static final String XML_CHART_CONSUMING_MAP = "chartConsumingMap";
private static final String ATTR_TEST_TEMPLATE = "testTemplate"; private static final String ATTR_TEST_TEMPLATE = "testTemplate";
@ -59,6 +63,8 @@ public class ChartInfo extends AbstractPointInfo {
private Map<String, String> chartConsumingMap = new HashMap<>(); private Map<String, String> chartConsumingMap = new HashMap<>();
private ChartConfigInfo chartConfigInfo = new ChartConfigInfo();
private BaseBook book; private BaseBook book;
private boolean testTemplate; private boolean testTemplate;
@ -93,7 +99,6 @@ public class ChartInfo extends AbstractPointInfo {
this.chartConsumingMap.put(ATTR_TEMPLATE_ID, templateId); this.chartConsumingMap.put(ATTR_TEMPLATE_ID, templateId);
} }
public BaseBook getBook() { public BaseBook getBook() {
return book; return book;
} }
@ -117,17 +122,19 @@ public class ChartInfo extends AbstractPointInfo {
return chartInfo; return chartInfo;
} }
public static ChartInfo newInstance(String chartId, String chartType) { public static ChartInfo newInstance(ChartProvider chartProvider) {
return newInstance(chartId, chartType, null, false, false); return newInstance(chartProvider, null, false, false);
} }
public static ChartInfo newInstance(String chartId, String chartType, String createTime, boolean isNew, boolean isReuse) { public static ChartInfo newInstance(ChartProvider chartProvider, String createTime, boolean isNew, boolean isReuse) {
HashMap<String, String> chartConsumingMap = new HashMap<>(); HashMap<String, String> chartConsumingMap = new HashMap<>();
String username = MarketConfig.getInstance().getBbsUsername(); String username = MarketConfig.getInstance().getBbsUsername();
String userId = String.valueOf(MarketConfig.getInstance().getBbsUid()); String userId = String.valueOf(MarketConfig.getInstance().getBbsUid());
String uuid = DesignerEnvManager.getEnvManager().getUUID(); String uuid = DesignerEnvManager.getEnvManager().getUUID();
String activityKey = DesignerEnvManager.getEnvManager().getActivationKey(); String activityKey = DesignerEnvManager.getEnvManager().getActivationKey();
String chartId = chartProvider.getChartUuid();
String chartType = chartProvider.getID();
BaseBook book = DesignModelAdapter.getCurrentModelAdapter().getBook(); BaseBook book = DesignModelAdapter.getCurrentModelAdapter().getBook();
String templateId = book.getTemplateID(); String templateId = book.getTemplateID();
@ -160,6 +167,7 @@ public class ChartInfo extends AbstractPointInfo {
ChartInfo chartInfo = new ChartInfo(chartId, templateId, book); ChartInfo chartInfo = new ChartInfo(chartId, templateId, book);
chartInfo.chartConsumingMap = chartConsumingMap; chartInfo.chartConsumingMap = chartConsumingMap;
chartProvider.initChartConfigInfo(chartInfo.chartConfigInfo);
return chartInfo; return chartInfo;
} }
@ -196,6 +204,8 @@ public class ChartInfo extends AbstractPointInfo {
writer.attr(ATTR_IS_NEW, chartConsumingMap.get(ATTR_IS_NEW)); writer.attr(ATTR_IS_NEW, chartConsumingMap.get(ATTR_IS_NEW));
writer.attr(ATTR_IS_REUSE, chartConsumingMap.get(ATTR_IS_REUSE)); writer.attr(ATTR_IS_REUSE, chartConsumingMap.get(ATTR_IS_REUSE));
writer.end(); writer.end();
chartConfigInfo.writeXML(writer);
writer.end(); writer.end();
} }
@ -230,6 +240,9 @@ public class ChartInfo extends AbstractPointInfo {
chartConsumingMap.put(ATTR_IS_NEW, reader.getAttrAsString(ATTR_IS_NEW, StringUtils.EMPTY)); chartConsumingMap.put(ATTR_IS_NEW, reader.getAttrAsString(ATTR_IS_NEW, StringUtils.EMPTY));
chartConsumingMap.put(ATTR_IS_REUSE, reader.getAttrAsString(ATTR_IS_REUSE, StringUtils.EMPTY)); chartConsumingMap.put(ATTR_IS_REUSE, reader.getAttrAsString(ATTR_IS_REUSE, StringUtils.EMPTY));
} }
if (ChartConfigInfo.XML_TAG.equals(name)) {
this.chartConfigInfo = (ChartConfigInfo) reader.readXMLObject(new ChartConfigInfo());
}
} }
} }
@ -243,9 +256,17 @@ public class ChartInfo extends AbstractPointInfo {
public Map<String, String> getSendInfo() { public Map<String, String> getSendInfo() {
Map<String, String> sendMap = new HashMap<>(); Map<String, String> sendMap = new HashMap<>();
sendMap.put(CHART_CONSUMING_URL, new JSONObject(chartConsumingMap).toString()); sendMap.put(CHART_CONSUMING_URL, new JSONObject(chartConsumingMap).toString());
sendMap.put(CHART_FUNCTION_URL, getFunctionJson());
return sendMap; return sendMap;
} }
private String getFunctionJson() {
JSONObject jsonObject = JSONObject.create();
jsonObject.put("chartID", this.chartId);
chartConfigInfo.toJSONObject(jsonObject);
return jsonObject.toString();
}
public void updatePropertyTime() { public void updatePropertyTime() {
String propertyTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss"); String propertyTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
@ -255,22 +276,32 @@ public class ChartInfo extends AbstractPointInfo {
chartConsumingMap.put(ATTR_CHART_PROPERTY_END_TIME, propertyTime); chartConsumingMap.put(ATTR_CHART_PROPERTY_END_TIME, propertyTime);
} }
public void updateChartType(String chartType) { public void updateChartType(ChartProvider chartProvider) {
String typeTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss"); String typeTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
chartConsumingMap.put(ATTR_CHART_TYPE_TIME, typeTime); chartConsumingMap.put(ATTR_CHART_TYPE_TIME, typeTime);
chartConsumingMap.put(ATTR_CHART_TYPE, chartType); chartConsumingMap.put(ATTR_CHART_TYPE, chartProvider.getID());
chartConsumingMap.put(ATTR_CHART_PROPERTY_FIRST_TIME, ""); chartConsumingMap.put(ATTR_CHART_PROPERTY_FIRST_TIME, "");
chartConsumingMap.put(ATTR_CHART_PROPERTY_END_TIME, ""); chartConsumingMap.put(ATTR_CHART_PROPERTY_END_TIME, "");
String count = chartConsumingMap.get(ATTR_OVER_CHART_TYPE_COUNT); String count = chartConsumingMap.get(ATTR_OVER_CHART_TYPE_COUNT);
count = StringUtils.isEmpty(count) ? "1" : String.valueOf(Integer.parseInt(count) + 1); count = StringUtils.isEmpty(count) ? "1" : String.valueOf(Integer.parseInt(count) + 1);
chartConsumingMap.put(ATTR_OVER_CHART_TYPE_COUNT, count); chartConsumingMap.put(ATTR_OVER_CHART_TYPE_COUNT, count);
resetChartConfigInfo(chartProvider);
}
public void resetChartConfigInfo(ChartProvider chartProvider) {
chartConfigInfo.reset();
chartProvider.initChartConfigInfo(chartConfigInfo);
} }
public void updateFirstType(String chartType) { public void updateFirstType(String chartType) {
chartConsumingMap.put(ATTR_FIRST_CHART_TYPE, chartType); chartConsumingMap.put(ATTR_FIRST_CHART_TYPE, chartType);
} }
public void updateChartConfig(ConfigType configType, AbstractConfig config) {
chartConfigInfo.updateChartConfig(configType, config);
}
@Override @Override
public ChartInfo clone() { public ChartInfo clone() {
@ -284,6 +315,7 @@ public class ChartInfo extends AbstractPointInfo {
chartConsumingMap.put(entry.getKey(), entry.getValue()); chartConsumingMap.put(entry.getKey(), entry.getValue());
} }
chartInfo.chartConsumingMap = chartConsumingMap; chartInfo.chartConsumingMap = chartConsumingMap;
chartInfo.chartConfigInfo = chartConfigInfo.clone();
return chartInfo; return chartInfo;
} }
} }

68
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java

@ -2,6 +2,8 @@ package com.fr.design.mainframe.chart.info;
import com.fr.base.io.BaseBook; import com.fr.base.io.BaseBook;
import com.fr.chartx.attr.ChartProvider; import com.fr.chartx.attr.ChartProvider;
import com.fr.chartx.config.info.AbstractConfig;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.mainframe.burying.point.AbstractPointCollector; import com.fr.design.mainframe.burying.point.AbstractPointCollector;
import com.fr.design.mainframe.template.info.TemplateInfo; import com.fr.design.mainframe.template.info.TemplateInfo;
import com.fr.design.mainframe.template.info.TemplateProcessInfo; import com.fr.design.mainframe.template.info.TemplateProcessInfo;
@ -55,63 +57,89 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
collection(chartProvider, createTime, false); collection(chartProvider, createTime, false);
} }
public void collection(ChartProvider chartProvider, String createTime, boolean isReuse) {
collection(chartProvider.getChartUuid(), chartProvider.getID(), createTime, isReuse);
}
/** /**
* 新建图表保存状态 * 新建图表保存状态
*/ */
public void collection(String chartId, String chartType, String createTime, boolean isReuse) { public void collection(ChartProvider chartProvider, String createTime, boolean isReuse) {
String chartId = chartProvider.getChartUuid();
if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) { if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) {
return; return;
} }
ChartInfo chartInfo = ChartInfo.newInstance(chartId, chartType, createTime, true, isReuse); ChartInfo chartInfo = ChartInfo.newInstance(chartProvider, createTime, true, isReuse);
chartInfoCacheMap.put(chartId, chartInfo); chartInfoCacheMap.put(chartId, chartInfo);
} }
/**
* 图表编辑更新编辑时间
*/
public void updateChartPropertyTime(ChartProvider chartProvider) { public void updateChartPropertyTime(ChartProvider chartProvider) {
updateChartPropertyTime(chartProvider.getChartUuid(), chartProvider.getID()); if (!shouldCollectInfo() || StringUtils.isEmpty(chartProvider.getChartUuid())) {
return;
}
ChartInfo chartInfo = getOrCreateChartInfo(chartProvider);
//更新编辑时间
chartInfo.updatePropertyTime();
//重置计数
chartInfo.resetIdleDayCount();
} }
/** /**
* 图表编辑更新编辑时间 * 图表编辑更新编辑时间
*/ */
public void updateChartPropertyTime(String chartId, String chartType) { public void updateChartConfig(ChartProvider chartProvider, ConfigType configType, AbstractConfig config) {
if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) { if (!shouldCollectInfo() || StringUtils.isEmpty(chartProvider.getChartUuid())) {
return; return;
} }
ChartInfo chartInfo = getOrCreateChartInfo(chartId, chartType, null); ChartInfo chartInfo = getOrCreateChartInfo(chartProvider);
//更新编辑时间 //更新对应的配置
chartInfo.updatePropertyTime(); chartInfo.updateChartConfig(configType, config);
//重置计数 //重置计数
chartInfo.resetIdleDayCount(); chartInfo.resetIdleDayCount();
} }
public void updateChartTypeTime(ChartProvider chartProvider, String oldType) { /**
updateChartTypeTime(chartProvider.getChartUuid(), chartProvider.getID(), oldType); * 图表子类型更新
*/
public void updateChartMiniType(ChartProvider chartProvider) {
if (!shouldCollectInfo() || StringUtils.isEmpty(chartProvider.getChartUuid())) {
return;
}
ChartInfo chartInfo = getOrCreateChartInfo(chartProvider);
//图表子类型更新
chartInfo.resetChartConfigInfo(chartProvider);
//重置计数
chartInfo.resetIdleDayCount();
} }
/** /**
* 图表类型变化更新类型和类型确认时间 * 图表类型变化更新类型和类型确认时间
*/ */
public void updateChartTypeTime(String chartId, String chartType, String oldType) { public void updateChartTypeTime(ChartProvider chartProvider, String oldType) {
if (!shouldCollectInfo() || StringUtils.isEmpty(chartId)) { if (!shouldCollectInfo() || StringUtils.isEmpty(chartProvider.getChartUuid())) {
return; return;
} }
ChartInfo chartInfo = getOrCreateChartInfo(chartId, chartType, oldType); ChartInfo chartInfo = getOrCreateChartInfo(chartProvider, oldType);
//更新类型确认时间和类型 //更新类型确认时间和类型
chartInfo.updateChartType(chartType); chartInfo.updateChartType(chartProvider);
//重置计数 //重置计数
chartInfo.resetIdleDayCount(); chartInfo.resetIdleDayCount();
} }
private ChartInfo getOrCreateChartInfo(String chartId, String chartType, String oldType) { private ChartInfo getOrCreateChartInfo(ChartProvider chartProvider) {
return getOrCreateChartInfo(chartProvider, null);
}
private ChartInfo getOrCreateChartInfo(ChartProvider chartProvider, String oldType) {
String chartId = chartProvider.getChartUuid();
//缓存中有从缓存中拿 //缓存中有从缓存中拿
if (chartInfoCacheMap.containsKey(chartId)) { if (chartInfoCacheMap.containsKey(chartId)) {
return chartInfoCacheMap.get(chartId); return chartInfoCacheMap.get(chartId);
@ -123,7 +151,7 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
return chartInfo; return chartInfo;
} }
//都没有的话创建一个并加入到缓存中 //都没有的话创建一个并加入到缓存中
ChartInfo chartInfo = ChartInfo.newInstance(chartId, chartType); ChartInfo chartInfo = ChartInfo.newInstance(chartProvider);
if (StringUtils.isNotEmpty(oldType)) { if (StringUtils.isNotEmpty(oldType)) {
chartInfo.updateFirstType(oldType); chartInfo.updateFirstType(oldType);
} }

2
designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java

@ -88,7 +88,7 @@ public enum SupportOSImpl implements SupportOS {
NON_GUARDIAN_START { NON_GUARDIAN_START {
@Override @Override
public boolean support() { public boolean support() {
return OperatingSystem.isLinux() || Arch.getArch() == Arch.ARM; return OperatingSystem.isLinux() || Arch.getArch() == Arch.ARM || OperatingSystem.isMacos();
} }
}, },

18
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe.chart.gui;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.GisMapPlot; import com.fr.chart.chartattr.GisMapPlot;
import com.fr.chart.chartattr.MapPlot; import com.fr.chart.chartattr.MapPlot;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.chart.report.GisMapDataPane; import com.fr.design.chart.report.GisMapDataPane;
import com.fr.design.chart.report.MapDataPane; import com.fr.design.chart.report.MapDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
@ -10,6 +11,9 @@ import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.data.DataContentsPane; import com.fr.design.mainframe.chart.gui.data.DataContentsPane;
import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -106,8 +110,20 @@ public class ChartDataPane extends AbstractChartAttrPane {
* 保存 数据界面内容 * 保存 数据界面内容
*/ */
public void update(ChartCollection collection) { public void update(ChartCollection collection) {
if(contentsPane != null) { if (contentsPane != null) {
contentsPane.update(collection); contentsPane.update(collection);
updateBuryingPoint(collection);
}
}
protected void updateBuryingPoint(ChartCollection collection){
VanChart vanchart = collection.getSelectedChartProvider(VanChart.class);
if (vanchart != null) {
VanChartPlot plot = vanchart.getPlot();
if( !plot.isInCustom()) {
ChartInfoCollector.getInstance().updateChartConfig(vanchart, ConfigType.DATA,
vanchart.getBuryingPointDataConfig());
}
} }
} }

8
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe.chart.gui;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -11,11 +12,12 @@ import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.other.ChartConditionAttrPane; import com.fr.design.mainframe.chart.gui.other.ChartConditionAttrPane;
import com.fr.design.mainframe.chart.gui.other.ChartInteractivePane; import com.fr.design.mainframe.chart.gui.other.ChartInteractivePane;
import com.fr.design.mainframe.chart.gui.type.ChartTabPane; import com.fr.design.mainframe.chart.gui.type.ChartTabPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import javax.swing.*; import javax.swing.JPanel;
import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.awt.BorderLayout;
public class ChartOtherPane extends AbstractChartAttrPane { public class ChartOtherPane extends AbstractChartAttrPane {
private static final long serialVersionUID = -5612046386597783406L; private static final long serialVersionUID = -5612046386597783406L;
@ -121,6 +123,8 @@ public class ChartOtherPane extends AbstractChartAttrPane {
if (ChartOtherPane.this.isHaveCondition()) { if (ChartOtherPane.this.isHaveCondition()) {
conditionAttrPane.updateBean(chart); conditionAttrPane.updateBean(chart);
} }
//特效埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.EFFECT, chart.getBuryingPointEffectConfig());
} }
/** /**

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ChartSeriesPane.java

@ -2,9 +2,11 @@ package com.fr.design.mainframe.chart.gui.style.series;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.van.chart.designer.AbstractVanChartScrollPane; import com.fr.van.chart.designer.AbstractVanChartScrollPane;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -60,6 +62,8 @@ public class ChartSeriesPane extends AbstractVanChartScrollPane<Chart> {
if(seriesStyleContentPane != null) { if(seriesStyleContentPane != null) {
seriesStyleContentPane.setCurrentChart(chart); seriesStyleContentPane.setCurrentChart(chart);
seriesStyleContentPane.updateBean(chart.getPlot()); seriesStyleContentPane.updateBean(chart.getPlot());
//系列埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.SERIES, chart.getPlot().getBuryingPointSeriesConfig());
} }
} }

1
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java

@ -62,6 +62,7 @@ public class VanChartCustomDataPane extends ChartDataPane {
public void update(ChartCollection collection){ public void update(ChartCollection collection){
if(contentsTabPane != null) { if(contentsTabPane != null) {
contentsTabPane.updateBean(collection); contentsTabPane.updateBean(collection);
updateBuryingPoint(collection);
} }
} }
} }

4
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java

@ -14,7 +14,7 @@ import com.fr.van.chart.custom.component.VanChartDataPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -118,7 +118,7 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
} }
try { try {
Map<CustomPlotType, TopDefinitionProvider> definitionMap = new HashMap<CustomPlotType, TopDefinitionProvider>(); Map<CustomPlotType, TopDefinitionProvider> definitionMap = new LinkedHashMap<CustomPlotType, TopDefinitionProvider>();
//已经有的数据配置不允许重置 //已经有的数据配置不允许重置

3
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java

@ -29,6 +29,7 @@ import com.fr.van.chart.designer.type.AbstractVanChartTypePane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JSeparator; import javax.swing.JSeparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import java.awt.CardLayout; import java.awt.CardLayout;
import java.awt.Component; import java.awt.Component;
@ -192,7 +193,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
return; return;
} }
Map<CustomPlotType, TopDefinitionProvider> newDefinitionMap = new HashMap<CustomPlotType, TopDefinitionProvider>(); Map<CustomPlotType, TopDefinitionProvider> newDefinitionMap = new LinkedHashMap<CustomPlotType, TopDefinitionProvider>();
VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot(); VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot();
for (int i = 0; i < customPlot.getCustomPlotList().size(); i++) { for (int i = 0; i < customPlot.getCustomPlotList().size(); i++) {

5
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotAxisPane.java

@ -7,6 +7,7 @@ import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; import com.fr.plugin.chart.base.AttrSeriesStackAndAxis;
import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.custom.CustomPlotDesignerPaneFactory; import com.fr.van.chart.custom.CustomPlotDesignerPaneFactory;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.axis.VanChartAxisPane; import com.fr.van.chart.designer.style.axis.VanChartAxisPane;
@ -52,4 +53,8 @@ public class VanChartCustomPlotAxisPane extends VanChartAxisPane {
} }
} }
} }
@Override
protected void updateBuryingPoint(VanChart chart) {
}
} }

4
designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomAxisPane.java

@ -1,8 +1,10 @@
package com.fr.van.chart.custom.style; package com.fr.van.chart.custom.style;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
@ -63,6 +65,8 @@ public class VanChartCustomAxisPane extends BasicScrollPane<Chart> {
} }
VanChartCustomPlot plot = (VanChartCustomPlot) chart.getPlot(); VanChartCustomPlot plot = (VanChartCustomPlot) chart.getPlot();
axisPane.updateBean(plot); axisPane.updateBean(plot);
//坐标轴埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.AXIS, chart.getBuryingPointAxisConfig());
} }
@Override @Override

4
designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomLabelPane.java

@ -2,8 +2,10 @@ package com.fr.van.chart.custom.style;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
@ -63,6 +65,8 @@ public class VanChartCustomLabelPane extends BasicScrollPane<Chart> {
} }
labelPane.updateBean((VanChartCustomPlot)chart.getPlot()); labelPane.updateBean((VanChartCustomPlot)chart.getPlot());
//标签埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getBuryingPointLabelConfig());
} }
@Override @Override

4
designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomSeriesPane.java

@ -1,10 +1,12 @@
package com.fr.van.chart.custom.style; package com.fr.van.chart.custom.style;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane; import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.van.chart.designer.component.VanChartBeautyPane; import com.fr.van.chart.designer.component.VanChartBeautyPane;
@ -112,6 +114,8 @@ public class VanChartCustomSeriesPane extends ChartSeriesPane {
if (seriesPane != null){ if (seriesPane != null){
plotSeriesPane.updateBean(plot); plotSeriesPane.updateBean(plot);
} }
//系列埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.SERIES, chart.getBuryingPointSeriesConfig());
} }
/** /**

6
designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomTooltipPane.java

@ -1,8 +1,9 @@
package com.fr.van.chart.custom.style; package com.fr.van.chart.custom.style;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.custom.VanChartCustomPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
@ -63,7 +64,8 @@ public class VanChartCustomTooltipPane extends BasicScrollPane<Chart> {
} }
tooltipPane.updateBean((VanChartCustomPlot)chart.getPlot()); tooltipPane.updateBean((VanChartCustomPlot)chart.getPlot());
//提示埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getBuryingPointTooltipConfig());
} }
@Override @Override

4
designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java

@ -59,10 +59,10 @@ public class LineTypeComboBox extends UIComboBox {
FontMetrics fm = GraphHelper.getFontMetrics(rfont); FontMetrics fm = GraphHelper.getFontMetrics(rfont);
GraphHelper.drawString(g2d, Toolkit.i18nText("Fine-Design_Report_None"), 4, (d.height - fm.getHeight()) / 2 + fm.getAscent()); GraphHelper.drawString(g2d, Toolkit.i18nText("Fine-Design_Report_None"), 4, (d.height - fm.getHeight()) / 2 + fm.getAscent());
break; break;
case NORMAL: case SOLID:
GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2); GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2);
break; break;
case DASH: case DASHED:
GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2, Constants.LINE_DASH); GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2, Constants.LINE_DASH);
break; break;
default: default:

54
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java

@ -2,7 +2,6 @@ package com.fr.van.chart.designer.component;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -13,8 +12,6 @@ import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.base.VanChartAttrLine; import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.type.LineStyle; import com.fr.plugin.chart.type.LineStyle;
import com.fr.plugin.chart.type.LineType; import com.fr.plugin.chart.type.LineType;
import com.fr.stable.Constants;
import com.fr.stable.CoreConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -30,8 +27,10 @@ import java.util.Arrays;
public class VanChartLineTypePane extends BasicPane { public class VanChartLineTypePane extends BasicPane {
private static final long serialVersionUID = -6581862503009962973L; private static final long serialVersionUID = -6581862503009962973L;
//线型支持虚线 恢复用注释。下面1行删除。
protected LineComboBox lineWidth;//线型 private static final double LINE_WIDTH_MIN_VALUE = 0.5;
private static final double LINE_WIDTH_DIERTA_VALUE = 0.5;
private static final double LINE_WIDTH_DEFAULT_VALUE = 2;
private LineTypeComboBox lineTypeComboBox;//线型 private LineTypeComboBox lineTypeComboBox;//线型
private UISpinner lineWidthSpinner;//线宽 private UISpinner lineWidthSpinner;//线宽
@ -42,14 +41,14 @@ public class VanChartLineTypePane extends BasicPane {
private JPanel lineStylePane; private JPanel lineStylePane;
public VanChartLineTypePane() { public VanChartLineTypePane() {
//线型支持虚线 恢复用注释。下面1行删除。
lineWidth = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
JPanel typeAndWidthPane = createTypeAndWidthPane(); JPanel typeAndWidthPane = createTypeAndWidthPane();
createLineStyle(); createLineStyle();
nullValueBreak = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Open"), Toolkit.i18nText("Fine-Design_Chart_Close")}); nullValueBreak = new UIButtonGroup(new String[]{
Toolkit.i18nText("Fine-Design_Chart_Open"),
Toolkit.i18nText("Fine-Design_Chart_Close")});
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
@ -67,16 +66,15 @@ public class VanChartLineTypePane extends BasicPane {
lineStylePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); lineStylePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
this.setLayout(new BorderLayout(0, 6)); this.setLayout(new BorderLayout(0, 6));
//线型支持虚线 恢复用注释。取消注释。 this.add(typeAndWidthPane, BorderLayout.NORTH);
//this.add(typeAndWidthPane, BorderLayout.NORTH);
this.add(lineStylePane, BorderLayout.CENTER); this.add(lineStylePane, BorderLayout.CENTER);
} }
private JPanel createTypeAndWidthPane() { private JPanel createTypeAndWidthPane() {
lineTypeComboBox = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.NORMAL, LineType.DASH}); lineTypeComboBox = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
lineWidthSpinner = new UISpinner(0.5, Integer.MAX_VALUE, 0.5, 2); lineWidthSpinner = new UISpinner(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE);
lineTypeComboBox.addActionListener(new ActionListener() { lineTypeComboBox.addActionListener(new ActionListener() {
@Override @Override
@ -117,12 +115,6 @@ public class VanChartLineTypePane extends BasicPane {
protected Component[][] createContentComponent(Component[] lineStyleComponent, Component[] nullValueBreakComponent) { protected Component[][] createContentComponent(Component[] lineStyleComponent, Component[] nullValueBreakComponent) {
return new Component[][]{ return new Component[][]{
//线型支持虚线 恢复用注释。下面5行删除。
new Component[]{null, null},
new Component[]{
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(lineWidth)
},
lineStyleComponent, lineStyleComponent,
nullValueBreakComponent nullValueBreakComponent
}; };
@ -141,16 +133,10 @@ public class VanChartLineTypePane extends BasicPane {
} }
public void checkLarge(boolean large) { public void checkLarge(boolean large) {
//线型支持虚线 恢复用注释。下面4行删除。
if (large) { if (large) {
lineWidth.setSelectedLineStyle(Constants.LINE_NONE); lineTypeComboBox.setSelectedItem(LineType.NONE);
} }
lineWidth.setEnabled(!large); lineTypeComboBox.setEnabled(!large);
//线型支持虚线 恢复用注释。取消注释。
// if (large) {
// lineTypeComboBox.setSelectedItem(LineType.NONE);
// }
// lineTypeComboBox.setEnabled(!large);
lineStyle.setEnabled(!large); lineStyle.setEnabled(!large);
} }
@ -162,11 +148,8 @@ public class VanChartLineTypePane extends BasicPane {
if (line == null) { if (line == null) {
line = initVanChartAttrLine(); line = initVanChartAttrLine();
} }
//线型支持虚线 恢复用注释。下面1行删除。 lineTypeComboBox.setSelectedItem(line.getLineType());
lineWidth.setSelectedLineStyle(line.getLineWidth()); lineWidthSpinner.setValue(line.getLineWidth());
//线型支持虚线 恢复用注释。取消注释。
// lineTypeComboBox.setSelectedItem(line.getLineType());
// lineWidthSpinner.setValue(line.getLineWidth());
lineStyle.setSelectedItem(line.getLineStyle()); lineStyle.setSelectedItem(line.getLineStyle());
nullValueBreak.setSelectedIndex(line.isNullValueBreak() ? 0 : 1); nullValueBreak.setSelectedIndex(line.isNullValueBreak() ? 0 : 1);
} }
@ -177,11 +160,8 @@ public class VanChartLineTypePane extends BasicPane {
public VanChartAttrLine update() { public VanChartAttrLine update() {
VanChartAttrLine line = new VanChartAttrLine(); VanChartAttrLine line = new VanChartAttrLine();
//线型支持虚线 恢复用注释。下面1行删除。 line.setLineType((LineType) lineTypeComboBox.getSelectedItem());
line.setLineWidth(lineWidth.getSelectedLineStyle()); line.setLineWidth(lineWidthSpinner.getValue());
//线型支持虚线 恢复用注释。取消注释。
// line.setLineType((LineType) lineTypeComboBox.getSelectedItem());
// line.setLineWidth(lineWidthSpinner.getValue());
line.setLineStyle(lineStyle.getSelectedItem()); line.setLineStyle(lineStyle.getSelectedItem());
line.setNullValueBreak(nullValueBreak.getSelectedIndex() == 0); line.setNullValueBreak(nullValueBreak.getSelectedIndex() == 0);
return line; return line;

6
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineWidthPane.java

@ -1,8 +1,5 @@
package com.fr.van.chart.designer.component; package com.fr.van.chart.designer.component;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import java.awt.Component; import java.awt.Component;
/** /**
@ -14,9 +11,6 @@ public class VanChartLineWidthPane extends VanChartLineTypePane {
@Override @Override
protected Component[][] createContentComponent(Component[] lineStyleComponent, Component[] nullValueBreakComponent) { protected Component[][] createContentComponent(Component[] lineStyleComponent, Component[] nullValueBreakComponent) {
return new Component[][]{ return new Component[][]{
//线型支持虚线 恢复用注释。下面2行删除。
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), lineWidth},
nullValueBreakComponent nullValueBreakComponent
}; };
} }

88
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java

@ -4,7 +4,6 @@ import com.fr.chart.base.AttrColor;
import com.fr.chart.base.AttrLineStyle; import com.fr.chart.base.AttrLineStyle;
import com.fr.chart.base.LineStyleInfo; import com.fr.chart.base.LineStyleInfo;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
@ -17,7 +16,6 @@ import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.base.TrendLineType; import com.fr.plugin.chart.base.TrendLineType;
import com.fr.plugin.chart.base.VanChartAttrTrendLine; import com.fr.plugin.chart.base.VanChartAttrTrendLine;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.type.LineType; import com.fr.plugin.chart.type.LineType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -34,14 +32,15 @@ import java.awt.event.ActionListener;
public class VanChartTrendLinePane extends BasicPane{ public class VanChartTrendLinePane extends BasicPane{
private static final TrendLineType[] TYPES = new TrendLineType[] {TrendLineType.EXP, TrendLineType.LINE, TrendLineType.LOG, TrendLineType.POLY}; private static final TrendLineType[] TYPES = new TrendLineType[] {TrendLineType.EXP, TrendLineType.LINE, TrendLineType.LOG, TrendLineType.POLY};
private static final int PREFERRED_WIDTH = 100;
private static final double LINE_WIDTH_MIN_VALUE = 0.5;
private static final double LINE_WIDTH_DIERTA_VALUE = 0.5;
private static final double LINE_WIDTH_DEFAULT_VALUE = 2;
private UITextField trendLineName; private UITextField trendLineName;
private ColorSelectBox trendLineColor; private ColorSelectBox trendLineColor;
private LineTypeComboBox trendLineStyle;//线型
//线型支持虚线 恢复用注释。下面1行删除。 private UISpinner lineWidthSpinner;//线宽
private LineComboBox trendLineStyle;//线型
//线型支持虚线 恢复用注释。取消注释。
// private LineTypeComboBox trendLineStyle;//线型
// private UISpinner lineWidthSpinner;//线宽
private UIComboBox trendLineType;//趋势线函数类型 private UIComboBox trendLineType;//趋势线函数类型
private UISpinner prePeriod; private UISpinner prePeriod;
@ -58,15 +57,11 @@ public class VanChartTrendLinePane extends BasicPane{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = {p, p, p, p, p, p};
double[] col = {f, e}; double[] col = {f, e};
trendLineName = new UITextField(); trendLineName = new UITextField();
trendLineColor = new ColorSelectBox(100); trendLineColor = new ColorSelectBox(PREFERRED_WIDTH);
//线型支持虚线 恢复用注释。下面1行删除。 trendLineStyle = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
trendLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE); lineWidthSpinner = new UISpinner(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE);
//线型支持虚线 恢复用注释。取消注释。
// trendLineStyle = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.NORMAL, LineType.DASH});
// lineWidthSpinner = new UISpinner(0.5, Integer.MAX_VALUE, 0.5, 2);
trendLineType = new UIComboBox(TYPES); trendLineType = new UIComboBox(TYPES);
prePeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0); prePeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
afterPeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0); afterPeriod = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
@ -82,42 +77,26 @@ public class VanChartTrendLinePane extends BasicPane{
UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Period")); UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Period"));
label.setVerticalAlignment(SwingConstants.TOP); label.setVerticalAlignment(SwingConstants.TOP);
//线型支持虚线 恢复用注释。开始删除。
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Name")), trendLineName}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Name")), trendLineName},
new Component[]{ new Component[]{
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
UIComponentUtils.wrapWithBorderLayoutPane(trendLineStyle) UIComponentUtils.wrapWithBorderLayoutPane(trendLineStyle)
}, }
};
Component[][] componentsMayHide = new Component[][]{
new Component[]{
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width")),
UIComponentUtils.wrapWithBorderLayoutPane(lineWidthSpinner)},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), trendLineColor}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), trendLineColor},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Type")), trendLineType}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Type")), trendLineType},
new Component[]{label, periodPane} new Component[]{label, periodPane}
}; };
//线型支持虚线 恢复用注释。结束删除。
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p,p,p}, col);
//线型支持虚线 恢复用注释。取消注释。 trendLineHidePane = TableLayout4VanChartHelper.createGapTableLayoutPane(componentsMayHide, new double[]{p,p,p,p}, col);
// Component[][] components = new Component[][]{
// new Component[]{null, null},
// new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Name")), trendLineName},
// new Component[]{
// FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")),
// UIComponentUtils.wrapWithBorderLayoutPane(trendLineStyle)
// }
// };
//
// Component[][] componentsMayHide = new Component[][]{
// new Component[]{
// FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width")),
// UIComponentUtils.wrapWithBorderLayoutPane(lineWidthSpinner)},
// new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), trendLineColor},
// new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Type")), trendLineType},
// new Component[]{label, periodPane}
// };
// trendLineHidePane = TableLayout4VanChartHelper.createGapTableLayoutPane(componentsMayHide, row, col);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
trendLineStyle.addActionListener(new ActionListener() { trendLineStyle.addActionListener(new ActionListener() {
@Override @Override
@ -129,8 +108,7 @@ public class VanChartTrendLinePane extends BasicPane{
checkHidePaneVisible(); checkHidePaneVisible();
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
//线型支持虚线 恢复用注释。取消注释。 this.add(trendLineHidePane, BorderLayout.SOUTH);
//this.add(trendLineHidePane, BorderLayout.SOUTH);
} }
protected String title4PopupWindow(){ protected String title4PopupWindow(){
@ -142,12 +120,14 @@ public class VanChartTrendLinePane extends BasicPane{
if(trendLine != null){ if(trendLine != null){
trendLineName.setText(trendLine.getTrendLineName()); trendLineName.setText(trendLine.getTrendLineName());
LineStyleInfo lineStyleInfo = trendLine.getLineStyleInfo(); LineStyleInfo lineStyleInfo = trendLine.getLineStyleInfo();
AttrLineStyle attrLineStyle = lineStyleInfo.getAttrLineStyle();
if (attrLineStyle != null) {
trendLineStyle.setSelectedItem(attrLineStyle.getLineType());
lineWidthSpinner.setValue(attrLineStyle.getLineWidth());
}
trendLineColor.setSelectObject(lineStyleInfo.getAttrLineColor().getSeriesColor()); trendLineColor.setSelectObject(lineStyleInfo.getAttrLineColor().getSeriesColor());
//线型支持虚线 恢复用注释。下面1行删除。
trendLineStyle.setSelectedLineStyle(lineStyleInfo.getAttrLineStyle().getLineStyle());
//线型支持虚线 恢复用注释。取消注释。
// trendLineStyle.setSelectedItem(lineStyleInfo.getAttrLineStyle().getLineType());
// lineWidthSpinner.setValue(lineStyleInfo.getAttrLineStyle().getLineWidth());
trendLineType.setSelectedItem(trendLine.getTrendLineType()); trendLineType.setSelectedItem(trendLine.getTrendLineType());
prePeriod.setValue(trendLine.getPrePeriod()); prePeriod.setValue(trendLine.getPrePeriod());
afterPeriod.setValue(trendLine.getAfterPeriod()); afterPeriod.setValue(trendLine.getAfterPeriod());
@ -159,11 +139,13 @@ public class VanChartTrendLinePane extends BasicPane{
trendLine.setTrendLineName(trendLineName.getText()); trendLine.setTrendLineName(trendLineName.getText());
LineStyleInfo lineStyleInfo = trendLine.getLineStyleInfo(); LineStyleInfo lineStyleInfo = trendLine.getLineStyleInfo();
//线型支持虚线 恢复用注释。下面1行删除。 AttrLineStyle attrLineStyle = lineStyleInfo.getAttrLineStyle();
lineStyleInfo.setAttrLineStyle(new AttrLineStyle(trendLineStyle.getSelectedLineStyle()));
//线型支持虚线 恢复用注释。取消注释。 if (attrLineStyle != null) {
// lineStyleInfo.getAttrLineStyle().setLineWidth(lineWidthSpinner.getValue()); attrLineStyle.setLineWidth(lineWidthSpinner.getValue());
// lineStyleInfo.getAttrLineStyle().setLineType((LineType) trendLineStyle.getSelectedItem()); attrLineStyle.setLineType((LineType) trendLineStyle.getSelectedItem());
}
lineStyleInfo.setAttrLineColor(new AttrColor(trendLineColor.getSelectObject())); lineStyleInfo.setAttrLineColor(new AttrColor(trendLineColor.getSelectObject()));
trendLine.setTrendLineType((TrendLineType) trendLineType.getSelectedItem()); trendLine.setTrendLineType((TrendLineType) trendLineType.getSelectedItem());

5
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java

@ -2,7 +2,9 @@ package com.fr.van.chart.designer.style;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.attr.VanChartLegend; import com.fr.plugin.chart.attr.VanChartLegend;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.AbstractVanChartScrollPane; import com.fr.van.chart.designer.AbstractVanChartScrollPane;
@ -52,6 +54,9 @@ public class VanChartLegendPane extends AbstractVanChartScrollPane<VanChart> {
} }
VanChartLegend legend = (VanChartLegend) plot.getLegend(); VanChartLegend legend = (VanChartLegend) plot.getLegend();
legendContent.updateBean(legend); legendContent.updateBean(legend);
//图例埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LEGEND, chart.getBuryingPointLegendConfig());
} }
@Override @Override

5
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -5,6 +5,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.base.TextAttr; import com.fr.chart.base.TextAttr;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UIBubbleFloatPane; import com.fr.design.gui.frpane.UIBubbleFloatPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
@ -16,6 +17,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.plugin.chart.attr.VanChartTitle; import com.fr.plugin.chart.attr.VanChartTitle;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
@ -362,6 +364,9 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
title.setFloatPercentY(customFloatPositionPane.getFloatPosition_y()); title.setFloatPercentY(customFloatPositionPane.getFloatPosition_y());
textAttrPane.update(textAttr); textAttrPane.update(textAttr);
backgroundPane.update(title); backgroundPane.update(title);
//标题埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TITLE, chart.getBuryingPointTitleConfig());
} }
} }

12
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPane.java

@ -3,8 +3,10 @@ package com.fr.van.chart.designer.style.axis;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot; import com.fr.plugin.chart.attr.plot.VanChartAxisPlot;
@ -16,12 +18,12 @@ import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.axis.component.VanChartAxisButtonPane; import com.fr.van.chart.designer.style.axis.component.VanChartAxisButtonPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.awt.BorderLayout;
import java.awt.CardLayout;
/** /**
* 样式-坐标轴界面 * 样式-坐标轴界面
@ -237,6 +239,12 @@ public class VanChartAxisPane extends BasicBeanPane<VanChart> {
updateBean(plot); updateBean(plot);
updateBuryingPoint(chart);
}
protected void updateBuryingPoint(VanChart chart) {
//坐标轴埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.AXIS, chart.getBuryingPointAxisConfig());
} }
public void updateBean(Plot plot){ public void updateBean(Plot plot){

134
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java

@ -2,12 +2,15 @@ package com.fr.van.chart.designer.style.background;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.base.AttrColor;
import com.fr.chart.base.AttrLineStyle;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.design.gui.style.FRFontPane; import com.fr.design.gui.style.FRFontPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -18,9 +21,10 @@ import com.fr.general.FRFont;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.plugin.chart.attr.axis.VanChartAlertValue;
import com.fr.plugin.chart.base.VanChartConstants; import com.fr.plugin.chart.type.LineType;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.van.chart.designer.component.LineTypeComboBox;
import javax.swing.BoxLayout; import javax.swing.BoxLayout;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -39,13 +43,16 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
private static final int VALUE_WD = 100; private static final int VALUE_WD = 100;
private static final int TEXT_WD = 200; private static final int TEXT_WD = 200;
private static final long serialVersionUID = -1208941770684286439L; private static final long serialVersionUID = -1208941770684286439L;
private static final int PREFERRED_WIDTH = 100;
private static final double LINE_WIDTH_MIN_VALUE = 0.5;
private static final double LINE_WIDTH_DIERTA_VALUE = 0.5;
private static final double LINE_WIDTH_DEFAULT_VALUE = 2;
private UIButtonGroup alertAxis; private UIButtonGroup alertAxis;
protected TinyFormulaPane alertValue; protected TinyFormulaPane alertValue;
//线型支持虚线 恢复用注释。下面1行删除。 protected LineTypeComboBox alertLineStyle;//线型
protected LineComboBox alertLineStyle; private UISpinner lineWidthSpinner;//线宽
//线型支持虚线 恢复用注释。取消注释。
// protected LineTypeComboBox alertLineStyle;//线型
// private UISpinner lineWidthSpinner;//线宽
protected ColorSelectBox alertLineColor; protected ColorSelectBox alertLineColor;
private UIButtonGroup alertTextPosition; private UIButtonGroup alertTextPosition;
@ -56,23 +63,20 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
private VanChartAlertValue chartAlertValue; private VanChartAlertValue chartAlertValue;
public VanChartAlertValuePane(){ public VanChartAlertValuePane() {
initComponents(); initComponents();
} }
private void initComponents(){ private void initComponents() {
alertValue = new TinyFormulaPane(); alertValue = new TinyFormulaPane();
//設置大小,防止文本過長導致界面“變形” //設置大小,防止文本過長導致界面“變形”
alertValue.setPreferredSize(new Dimension(VALUE_WD, HT)); alertValue.setPreferredSize(new Dimension(VALUE_WD, HT));
//线型支持虚线 恢复用注释。下面1行删除。 alertLineStyle = new LineTypeComboBox(new LineType[]{LineType.SOLID, LineType.DASHED});
alertLineStyle = new LineComboBox(VanChartConstants.ALERT_LINE_STYLE); lineWidthSpinner = new UISpinner(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE);
//线型支持虚线 恢复用注释。取消注释。 alertLineColor = new ColorSelectBox(PREFERRED_WIDTH);
// alertLineStyle = new LineTypeComboBox(new LineType[]{LineType.NORMAL, LineType.DASH}); alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")});
// lineWidthSpinner = new UISpinner(0.5, Integer.MAX_VALUE, 0.5, 2);
alertLineColor = new ColorSelectBox(100);
alertTextPosition = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Top"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")});
alertText = new TinyFormulaPane(); alertText = new TinyFormulaPane();
//設置大小,防止文本過長導致界面“變形” //設置大小,防止文本過長導致界面“變形”
alertText.setPreferredSize(new Dimension(TEXT_WD, HT)); alertText.setPreferredSize(new Dimension(TEXT_WD, HT));
@ -83,26 +87,25 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
} }
private void doLayoutPane(){ private void doLayoutPane() {
this.removeAll(); this.removeAll();
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
//警戒线设置 //警戒线设置
JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(top); this.add(top);
top.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Set") + ":", null)); top.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Set") + ":", null));
top.add(createTopPane()); top.add(createTopPane());
//提示文字 //提示文字
JPanel bottom = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel bottom = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(bottom); this.add(bottom);
bottom.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Text") + ":", null)); bottom.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Text") + ":", null));
bottom.add(createBottomPane()); bottom.add(createBottomPane());
} }
protected JPanel createTopPane() protected JPanel createTopPane() {
{
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {p,p}; double[] columnSize = {p, p};
double[] rowSize = {p,p,p,p,p}; double[] rowSize = {p, p, p, p, p};
Component[][] components = getTopPaneComponents(); Component[][] components = getTopPaneComponents();
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -110,26 +113,25 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
protected Component[][] getTopPaneComponents() { protected Component[][] getTopPaneComponents() {
return new Component[][]{ return new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position")),alertAxis}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), alertAxis},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value")),alertValue}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Use_Value")), alertValue},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),alertLineStyle}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), alertLineStyle},
//线型支持虚线 恢复用注释。取消注释。 new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width")), lineWidthSpinner},
//new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Width")), lineWidthSpinner}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), alertLineColor},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),alertLineColor},
}; };
} }
private JPanel createBottomPane(){ private JPanel createBottomPane() {
alertTextPosition.setSelectedIndex(0); alertTextPosition.setSelectedIndex(0);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double[] columnSize = {p,p}; double[] columnSize = {p, p};
double[] rowSize = {p,p,p,p,p}; double[] rowSize = {p, p, p, p, p};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position")),alertTextPosition}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), alertTextPosition},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content")),alertText}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Content")), alertText},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font")),fontName}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Form_Font")), fontName},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FRFont_Size")),fontSize}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Form_FRFont_Size")), fontSize},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),fontColor}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), fontColor},
}; };
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
@ -137,20 +139,20 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
private void checkPositionPane() { private void checkPositionPane() {
boolean selectXAxis = VanChartAttrHelper.isXAxis(alertAxis.getSelectedItem().toString()); boolean selectXAxis = VanChartAttrHelper.isXAxis(alertAxis.getSelectedItem().toString());
if(selectXAxis){ if (selectXAxis) {
alertTextPosition = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Top"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")}); alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")});
} else { } else {
alertTextPosition = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Left"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Right")}); alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Alert_Left"), Toolkit.i18nText("Fine-Design_Chart_Alert_Right")});
} }
doLayoutPane(); doLayoutPane();
} }
protected String title4PopupWindow(){ protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Alert_Line"); return Toolkit.i18nText("Fine-Design_Chart_Alert_Line");
} }
public void populateBean(VanChartAlertValue chartAlertValue){ public void populateBean(VanChartAlertValue chartAlertValue) {
this.chartAlertValue =chartAlertValue; this.chartAlertValue = chartAlertValue;
alertAxis = new UIButtonGroup(chartAlertValue.getAxisNamesArray(), chartAlertValue.getAxisNamesArray()); alertAxis = new UIButtonGroup(chartAlertValue.getAxisNamesArray(), chartAlertValue.getAxisNamesArray());
alertAxis.setSelectedItem(chartAlertValue.getAxisName()); alertAxis.setSelectedItem(chartAlertValue.getAxisName());
alertAxis.addChangeListener(new ChangeListener() { alertAxis.addChangeListener(new ChangeListener() {
@ -163,14 +165,20 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
checkPositionPane(); checkPositionPane();
alertValue.populateBean(Utils.objectToString(chartAlertValue.getAlertValueFormula())); alertValue.populateBean(Utils.objectToString(chartAlertValue.getAlertValueFormula()));
//线型支持虚线 恢复用注释。下面1行删除。
alertLineStyle.setSelectedLineStyle(chartAlertValue.getLineStyle().getLineStyle()); AttrColor attrColor = chartAlertValue.getLineColor();
//线型支持虚线 恢复用注释。取消注释。 AttrLineStyle attrLineStyle = chartAlertValue.getLineStyle();
// alertLineStyle.setSelectedItem(chartAlertValue.getLineStyle().getLineType());
// lineWidthSpinner.setValue(chartAlertValue.getLineStyle().getLineWidth()); if (attrColor != null) {
alertLineColor.setSelectObject(chartAlertValue.getLineColor().getSeriesColor()); alertLineColor.setSelectObject(attrColor.getSeriesColor());
}
if(VanChartAttrHelper.isXAxis(chartAlertValue.getAxisName())){
if (attrLineStyle != null) {
alertLineStyle.setSelectedItem(attrLineStyle.getLineType());
lineWidthSpinner.setValue(attrLineStyle.getLineWidth());
}
if (VanChartAttrHelper.isXAxis(chartAlertValue.getAxisName())) {
alertTextPosition.setSelectedIndex(chartAlertValue.getAlertPosition() == Constants.BOTTOM ? 1 : 0); alertTextPosition.setSelectedIndex(chartAlertValue.getAlertPosition() == Constants.BOTTOM ? 1 : 0);
} else { } else {
alertTextPosition.setSelectedIndex(chartAlertValue.getAlertPosition() == Constants.LEFT ? 0 : 1); alertTextPosition.setSelectedIndex(chartAlertValue.getAlertPosition() == Constants.LEFT ? 0 : 1);
@ -186,16 +194,22 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
fontColor.setSelectObject(chartAlertValue.getAlertFont().getForeground()); fontColor.setSelectObject(chartAlertValue.getAlertFont().getForeground());
} }
public VanChartAlertValue updateBean(){ public VanChartAlertValue updateBean() {
chartAlertValue.setAxisName(alertAxis.getSelectedItem().toString()); chartAlertValue.setAxisName(alertAxis.getSelectedItem().toString());
chartAlertValue.setAlertValueFormula(BaseFormula.createFormulaBuilder().build(alertValue.updateBean())); chartAlertValue.setAlertValueFormula(BaseFormula.createFormulaBuilder().build(alertValue.updateBean()));
chartAlertValue.getLineColor().setSeriesColor(alertLineColor.getSelectObject());
//线型支持虚线 恢复用注释。下面1行删除。 AttrColor attrColor = chartAlertValue.getLineColor();
chartAlertValue.getLineStyle().setLineStyle(alertLineStyle.getSelectedLineStyle()); AttrLineStyle attrLineStyle = chartAlertValue.getLineStyle();
//线型支持虚线 恢复用注释。取消注释。
// chartAlertValue.getLineStyle().setLineType((LineType) alertLineStyle.getSelectedItem()); if (attrColor != null) {
// chartAlertValue.getLineStyle().setLineWidth(lineWidthSpinner.getValue()); attrColor.setSeriesColor(alertLineColor.getSelectObject());
}
if (attrLineStyle != null) {
attrLineStyle.setLineType((LineType) alertLineStyle.getSelectedItem());
attrLineStyle.setLineWidth(lineWidthSpinner.getValue());
}
String contentString = alertText.updateBean(); String contentString = alertText.updateBean();
Object contentObj; Object contentObj;
@ -210,7 +224,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
int size = Utils.objectToNumber(fontSize.getSelectedItem(), true).intValue(); int size = Utils.objectToNumber(fontSize.getSelectedItem(), true).intValue();
Color color = fontColor.getSelectObject(); Color color = fontColor.getSelectObject();
chartAlertValue.setAlertFont(FRFont.getInstance(name, Font.PLAIN, size, color)); chartAlertValue.setAlertFont(FRFont.getInstance(name, Font.PLAIN, size, color));
if(VanChartAttrHelper.isXAxis(Utils.objectToString(alertAxis.getSelectedItem()))){ if (VanChartAttrHelper.isXAxis(Utils.objectToString(alertAxis.getSelectedItem()))) {
chartAlertValue.setAlertPosition(alertTextPosition.getSelectedIndex() == 0 ? Constants.TOP : Constants.BOTTOM); chartAlertValue.setAlertPosition(alertTextPosition.getSelectedIndex() == 0 ? Constants.TOP : Constants.BOTTOM);
} else { } else {
chartAlertValue.setAlertPosition(alertTextPosition.getSelectedIndex() == 0 ? Constants.LEFT : Constants.RIGHT); chartAlertValue.setAlertPosition(alertTextPosition.getSelectedIndex() == 0 ? Constants.LEFT : Constants.RIGHT);

8
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java

@ -1,20 +1,22 @@
package com.fr.van.chart.designer.style.background; package com.fr.van.chart.designer.style.background;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ThirdTabPane; import com.fr.design.mainframe.chart.gui.style.ThirdTabPane;
import com.fr.design.mainframe.chart.gui.style.legend.AutoSelectedPane; import com.fr.design.mainframe.chart.gui.style.legend.AutoSelectedPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
/** /**
* 属性表, 图表样式-背景界面. * 属性表, 图表样式-背景界面.
@ -94,6 +96,8 @@ public class VanChartAreaPane extends ThirdTabPane<VanChart> implements AutoSele
public void updateBean(VanChart chart) { public void updateBean(VanChart chart) {
areaPane.updateBean(chart); areaPane.updateBean(chart);
plotPane.updateBean(chart); plotPane.updateBean(chart);
//背景埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.BACKGROUND, chart.getBuryingPointBackGroundConfig());
} }
/** /**

186
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java

@ -10,8 +10,11 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox; import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.type.LineType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.LineTypeComboBox;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -20,7 +23,6 @@ import java.awt.CardLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.Arrays;
/** /**
* 样式-背景-绘图区背景-坐标轴图表特有间隔背景网格线警戒线 * 样式-背景-绘图区背景-坐标轴图表特有间隔背景网格线警戒线
@ -28,6 +30,8 @@ import java.util.Arrays;
public class VanChartAxisAreaPane extends BasicBeanPane<Plot> { public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
private static final long serialVersionUID = -1880497996650835504L; private static final long serialVersionUID = -1880497996650835504L;
private static final int PREFERRED_WIDTH = 100;
protected ColorSelectBox horizontalGridLine; protected ColorSelectBox horizontalGridLine;
protected ColorSelectBox verticalGridLine; protected ColorSelectBox verticalGridLine;
@ -40,22 +44,20 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
private ColorSelectBox verticalColorBackground; private ColorSelectBox verticalColorBackground;
protected BackgroundListControlPane customIntervalBackground; protected BackgroundListControlPane customIntervalBackground;
//线型支持虚线 恢复用注释。取消注释。 private LineTypeComboBox horizonLineType;//横向线型
// private LineTypeComboBox horizonLineType;//横向线型 private LineTypeComboBox verticalLineType;//纵向线型
// private LineTypeComboBox verticalLineType;//纵向线型 private JPanel horizontalColorPane;
// private JPanel horizontalColorPane; private JPanel verticalColorPane;
// private JPanel verticalColorPane;
public VanChartAxisAreaPane() { public VanChartAxisAreaPane() {
initComponents(); initComponents();
} }
protected void initComponents() { protected void initComponents() {
horizontalGridLine = new ColorSelectBox(100); horizontalGridLine = new ColorSelectBox(PREFERRED_WIDTH);
verticalGridLine = new ColorSelectBox(100); verticalGridLine = new ColorSelectBox(PREFERRED_WIDTH);
//线型支持虚线 恢复用注释。取消注释。 horizonLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
// horizonLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.NORMAL, LineType.DASH}); verticalLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
// verticalLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.NORMAL, LineType.DASH});
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
@ -74,78 +76,58 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
} }
//线型支持虚线 恢复用注释。删除下面方法。
protected JPanel createGridLinePane() { protected JPanel createGridLinePane() {
horizontalGridLine = new ColorSelectBox(100);
verticalGridLine = new ColorSelectBox(100); Component[][] upComponent = new Component[][]{
Component[][] components = new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal")), horizontalGridLine}, new Component[]{null, horizontalGridLine}
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical")), verticalGridLine},
}; };
double p = TableLayout.PREFERRED; horizontalColorPane = TableLayout4VanChartHelper.createGapTableLayoutPane(upComponent);
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; Component[][] downComponent = new Component[][]{
double[] row = new double[components.length]; new Component[]{null, null},
Arrays.fill(row, p); new Component[]{null, verticalGridLine}
double[] col = {f, e}; };
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); verticalColorPane = TableLayout4VanChartHelper.createGapTableLayoutPane(downComponent);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
horizonLineType.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (horizontalGridLine == null || horizonLineType == null) {
return;
}
horizontalColorPane.setVisible(horizonLineType.getSelectedItem() != LineType.NONE);
}
});
verticalLineType.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (verticalGridLine == null || verticalLineType == null) {
return;
} }
verticalColorPane.setVisible(verticalLineType.getSelectedItem() != LineType.NONE);
}
});
checkColorBoxVisible();
JPanel horizonLineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), horizonLineType);
JPanel horizontal = new JPanel(new BorderLayout());
horizontal.add(horizonLineTypePane, BorderLayout.NORTH);
horizontal.add(horizontalColorPane, BorderLayout.CENTER);
//线型支持虚线 恢复用注释。取消注释。 JPanel verticalLineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"), verticalLineType);
// protected JPanel createGridLinePane() { JPanel vertical = new JPanel(new BorderLayout());
// vertical.add(verticalLineTypePane, BorderLayout.NORTH);
// Component[][] upComponent = new Component[][]{ vertical.add(verticalColorPane, BorderLayout.CENTER);
// new Component[]{null, null},
// new Component[]{null, horizontalGridLine} JPanel panel = new JPanel(new BorderLayout(0, 4));
// }; panel.add(horizontal, BorderLayout.NORTH);
// horizontalColorPane = TableLayout4VanChartHelper.createGapTableLayoutPane(upComponent); panel.add(vertical, BorderLayout.CENTER);
//
// Component[][] downComponent = new Component[][]{ return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
// new Component[]{null,null}, }
// new Component[]{null, verticalGridLine}
// };
// verticalColorPane = TableLayout4VanChartHelper.createGapTableLayoutPane(downComponent);
//
// horizonLineType.addActionListener(new ActionListener() {
// @Override
// public void actionPerformed(ActionEvent e) {
// if (horizontalGridLine == null || horizonLineType == null){
// return;
// }
// horizontalColorPane.setVisible(horizonLineType.getSelectedItem() != LineType.NONE);
// }
// });
//
// verticalLineType.addActionListener(new ActionListener() {
// @Override
// public void actionPerformed(ActionEvent e) {
// if (verticalGridLine == null || verticalLineType == null){
// return;
// }
// verticalColorPane.setVisible(verticalLineType.getSelectedItem() != LineType.NONE);
// }
// });
//
// checkColorBoxVisible();
//
// JPanel horizonLineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), horizonLineType);
// JPanel horizontal = new JPanel(new BorderLayout());
// horizontal.add(horizonLineTypePane, BorderLayout.NORTH);
// horizontal.add(horizontalColorPane, BorderLayout.CENTER);
//
// JPanel verticalLineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"), verticalLineType);
// JPanel vertical = new JPanel(new BorderLayout());
// vertical.add(verticalLineTypePane, BorderLayout.NORTH);
// vertical.add(verticalColorPane, BorderLayout.CENTER);
//
// JPanel panel = new JPanel(new BorderLayout(0, 4));
// panel.add(horizontal, BorderLayout.NORTH);
// panel.add(vertical, BorderLayout.CENTER);
//
// return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
// }
protected JPanel createAlertLinePane() { protected JPanel createAlertLinePane() {
alertLine = getAlertLinePane(); alertLine = getAlertLinePane();
@ -227,13 +209,19 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
} }
private void populateGridLine(VanChartRectanglePlot rectanglePlot) { private void populateGridLine(VanChartRectanglePlot rectanglePlot) {
horizontalGridLine.setSelectObject(rectanglePlot.getDefaultYAxis().getMainGridColor()); VanChartAxis defaultXAxis = rectanglePlot.getDefaultXAxis();
verticalGridLine.setSelectObject(rectanglePlot.getDefaultXAxis().getMainGridColor()); VanChartAxis defaultYAxis = rectanglePlot.getDefaultYAxis();
//线型支持虚线 恢复用注释。取消注释。
// horizonLineType.setSelectedItem(rectanglePlot.getDefaultYAxis().getGridLineType()); if (defaultXAxis != null) {
// verticalLineType.setSelectedItem(rectanglePlot.getDefaultXAxis().getGridLineType()); verticalGridLine.setSelectObject(defaultXAxis.getMainGridColor());
verticalLineType.setSelectedItem(defaultXAxis.getGridLineType());
} }
if (defaultYAxis != null) {
horizontalGridLine.setSelectObject(defaultYAxis.getMainGridColor());
horizonLineType.setSelectedItem(defaultYAxis.getGridLineType());
}
}
public void updateBean(Plot plot) { public void updateBean(Plot plot) {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
@ -254,11 +242,18 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
} }
private void updateGirdLine(VanChartRectanglePlot rectanglePlot) { private void updateGirdLine(VanChartRectanglePlot rectanglePlot) {
rectanglePlot.getDefaultYAxis().setMainGridColor(horizontalGridLine.getSelectObject()); VanChartAxis defaultXAxis = rectanglePlot.getDefaultXAxis();
rectanglePlot.getDefaultXAxis().setMainGridColor(verticalGridLine.getSelectObject()); VanChartAxis defaultYAxis = rectanglePlot.getDefaultYAxis();
//线型支持虚线 恢复用注释。取消注释。
// rectanglePlot.getDefaultYAxis().setGridLineType((LineType)horizonLineType.getSelectedItem()); if (defaultXAxis != null) {
// rectanglePlot.getDefaultXAxis().setGridLineType((LineType)verticalLineType.getSelectedItem()); defaultXAxis.setMainGridColor(verticalGridLine.getSelectObject());
defaultXAxis.setGridLineType((LineType) verticalLineType.getSelectedItem());
}
if (defaultYAxis != null) {
defaultYAxis.setMainGridColor(horizontalGridLine.getSelectObject());
defaultYAxis.setGridLineType((LineType) horizonLineType.getSelectedItem());
}
} }
/** /**
@ -278,13 +273,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
} }
private void checkColorBoxVisible() { private void checkColorBoxVisible() {
//线型支持虚线 恢复用注释。取消注释。 if (horizontalColorPane != null && horizonLineType != null) {
// if (horizontalColorPane != null && horizonLineType != null){ horizontalColorPane.setVisible(horizonLineType.getSelectedItem() != LineType.NONE);
// horizontalColorPane.setVisible(horizonLineType.getSelectedItem() != LineType.NONE); }
// }
// if (verticalColorPane != null && verticalLineType != null) {
// if (verticalColorPane != null && verticalLineType != null){ verticalColorPane.setVisible(verticalLineType.getSelectedItem() != LineType.NONE);
// verticalColorPane.setVisible(verticalLineType.getSelectedItem() != LineType.NONE); }
// }
} }
} }

6
designer-chart/src/main/java/com/fr/van/chart/designer/style/datasheet/VanChartDataSheetPane.java

@ -4,15 +4,16 @@ import com.fr.base.FRContext;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.DataSheet; import com.fr.chart.chartglyph.DataSheet;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.style.FormatPane; import com.fr.design.gui.style.FormatPane;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.VanChartAttrHelper;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.VanChartConstants; import com.fr.plugin.chart.base.VanChartConstants;
@ -135,6 +136,9 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane<Chart> {
if(isShowDataSheet.isSelected()){ if(isShowDataSheet.isSelected()){
update(dataSheet); update(dataSheet);
} }
//数据表埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.DATA_TABLE, chart.getBuryingPointDataTableConfig());
// plot.setDataSheet2PlotList(); // plot.setDataSheet2PlotList();
} }

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartLabelPane.java

@ -4,7 +4,9 @@ import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.base.AttrLabel;
import com.fr.van.chart.designer.AbstractVanChartScrollPane; import com.fr.van.chart.designer.AbstractVanChartScrollPane;
@ -70,6 +72,8 @@ public class VanChartLabelPane extends AbstractVanChartScrollPane<Chart> {
if (attrLabel != null) { if (attrLabel != null) {
attrList.addDataSeriesCondition(attrLabel); attrList.addDataSeriesCondition(attrLabel);
} }
//标签埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getBuryingPointLabelConfig());
} }
@Override @Override

5
designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartTooltipPane.java

@ -4,7 +4,8 @@ import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.AttrTooltip; import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.van.chart.designer.AbstractVanChartScrollPane; import com.fr.van.chart.designer.AbstractVanChartScrollPane;
@ -67,6 +68,8 @@ public class VanChartTooltipPane extends AbstractVanChartScrollPane<Chart> {
if (attrTooltip != null) { if (attrTooltip != null) {
attrList.addDataSeriesCondition(attrTooltip); attrList.addDataSeriesCondition(attrTooltip);
} }
//提示埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getBuryingPointTooltipConfig());
} }
@Override @Override

2
designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java

@ -105,6 +105,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Cha
cloneOldPlot2New(oldPlot, newPlot); cloneOldPlot2New(oldPlot, newPlot);
chart.setPlot(newPlot); chart.setPlot(newPlot);
resetChartAttr4SamePlot(chart); resetChartAttr4SamePlot(chart);
ChartInfoCollector.getInstance().updateChartMiniType(chart);
} else if(!samePlot){ } else if(!samePlot){
//不同的图表类型切換 //不同的图表类型切換
resetChartAttr(chart, newPlot); resetChartAttr(chart, newPlot);
@ -112,7 +113,6 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane<Cha
newPlot.setCategoryNum(oldPlot.getCategoryNum()); newPlot.setCategoryNum(oldPlot.getCategoryNum());
//切换类型埋点 //切换类型埋点
ChartInfoCollector.getInstance().updateChartTypeTime(chart, oldPlot.getPlotID()); ChartInfoCollector.getInstance().updateChartTypeTime(chart, oldPlot.getPlotID());
} }
if(chart instanceof VanChart if(chart instanceof VanChart
&& !acceptDefinition(((VanChart) chart).getChartDataDefinition(), newPlot)) { && !acceptDefinition(((VanChart) chart).getChartDataDefinition(), newPlot)) {

25
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java

@ -1,9 +1,13 @@
package com.fr.van.chart.map.designer.data; package com.fr.van.chart.map.designer.data;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.chartx.config.info.DataConfig;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.map.data.VanMapDefinition; import com.fr.plugin.chart.map.data.VanMapDefinition;
import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.MapType;
@ -116,6 +120,27 @@ public class VanChartMapDataPane extends ChartDataPane {
vanMapDefinition.setLineDefinition(lineClone.getSelectedChart().getFilterDefinition()); vanMapDefinition.setLineDefinition(lineClone.getSelectedChart().getFilterDefinition());
collection.getSelectedChart().setFilterDefinition(vanMapDefinition); collection.getSelectedChart().setFilterDefinition(vanMapDefinition);
updateBuryingPoint(collection, vanMapDefinition);
} }
} }
private void updateBuryingPoint(ChartCollection collection, VanMapDefinition vanMapDefinition) {
ChartProvider chart = collection.getSelectedChartProvider(ChartProvider.class);
DataConfig dataConfig;
switch (mapType) {
case AREA:
dataConfig = vanMapDefinition.getAreaDefinition().getBuryingPointDataConfig();
break;
case POINT:
dataConfig = vanMapDefinition.getPointDefinition().getBuryingPointDataConfig();
break;
case LINE:
dataConfig = vanMapDefinition.getLineDefinition().getBuryingPointDataConfig();
break;
default:
dataConfig = vanMapDefinition.getBuryingPointDataConfig();
break;
}
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.DATA, dataConfig);
}
} }

5
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelPane.java

@ -3,7 +3,9 @@ package com.fr.van.chart.map.designer.style.label;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.attr.AttrMapLabel; import com.fr.plugin.chart.map.attr.AttrMapLabel;
import com.fr.van.chart.designer.AbstractVanChartScrollPane; import com.fr.van.chart.designer.AbstractVanChartScrollPane;
@ -116,6 +118,9 @@ public class VanChartMapLabelPane extends AbstractVanChartScrollPane<Chart> {
} }
defaultAttr.addDataSeriesCondition(attrMapLabel); defaultAttr.addDataSeriesCondition(attrMapLabel);
//标签埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.LABEL, chart.getBuryingPointLabelConfig());
} }
@Override @Override

5
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipPane.java

@ -3,7 +3,8 @@ package com.fr.van.chart.map.designer.style.tooltip;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.attr.AttrMapTooltip; import com.fr.plugin.chart.map.attr.AttrMapTooltip;
import com.fr.van.chart.designer.AbstractVanChartScrollPane; import com.fr.van.chart.designer.AbstractVanChartScrollPane;
@ -119,6 +120,8 @@ public class VanChartMapTooltipPane extends AbstractVanChartScrollPane<Chart> {
attrMapTooltip.setLineTooltip(lineTooltipPane.update()); attrMapTooltip.setLineTooltip(lineTooltipPane.update());
} }
defaultAttr.addDataSeriesCondition(attrMapTooltip); defaultAttr.addDataSeriesCondition(attrMapTooltip);
//提示埋点
ChartInfoCollector.getInstance().updateChartConfig(chart, ConfigType.TOOLTIP, chart.getBuryingPointTooltipConfig());
} }
@Override @Override

21
designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterLineTypePane.java

@ -1,11 +1,10 @@
package com.fr.van.chart.scatter.component; package com.fr.van.chart.scatter.component;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.base.VanChartAttrLine; import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.type.LineStyle; import com.fr.plugin.chart.type.LineStyle;
import com.fr.stable.Constants; import com.fr.plugin.chart.type.LineType;
import com.fr.design.i18n.Toolkit;
import com.fr.van.chart.designer.component.VanChartLineTypePane; import com.fr.van.chart.designer.component.VanChartLineTypePane;
import java.awt.Component; import java.awt.Component;
@ -17,17 +16,16 @@ public class VanChartScatterLineTypePane extends VanChartLineTypePane {
@Override @Override
protected void createLineStyle() { protected void createLineStyle() {
String[] textArray = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Normal_Line"), String[] textArray = new String[]{
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_CurveLine")}; Toolkit.i18nText("Fine-Design_Chart_Normal_Line"),
lineStyle = new UIButtonGroup<LineStyle>(textArray, new LineStyle[]{LineStyle.NORMAL, LineStyle.CURVE}); Toolkit.i18nText("Fine-Design_Chart_CurveLine")};
lineStyle = new UIButtonGroup<>(textArray, new LineStyle[]{LineStyle.NORMAL, LineStyle.CURVE});
} }
@Override @Override
protected Component[][] createContentComponent(Component[] lineStyleComponent, Component[] nullValueBreakComponent) { protected Component[][] createContentComponent(Component[] lineStyleComponent, Component[] nullValueBreakComponent) {
return new Component[][]{ return new Component[][]{
//线型支持虚线 恢复用注释。下面2行删除。
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), lineWidth},
lineStyleComponent lineStyleComponent
}; };
} }
@ -36,10 +34,7 @@ public class VanChartScatterLineTypePane extends VanChartLineTypePane {
protected VanChartAttrLine initVanChartAttrLine() { protected VanChartAttrLine initVanChartAttrLine() {
VanChartAttrLine attrLine = new VanChartAttrLine(); VanChartAttrLine attrLine = new VanChartAttrLine();
//默认为无线型,且默認空值不斷開 //默认为无线型,且默認空值不斷開
//线型支持虚线 恢复用注释。下面1行删除。 attrLine.setLineType(LineType.NONE);
attrLine.setLineWidth(Constants.LINE_NONE);
//线型支持虚线 恢复用注释。取消注释。
//attrLine.setLineType(LineType.NONE);
attrLine.setNullValueBreak(false); attrLine.setNullValueBreak(false);
return attrLine; return attrLine;
} }

9
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java

@ -514,13 +514,4 @@ public class XWCardMainBorderLayout extends XWBorderLayout {
public boolean isSupportShared() { public boolean isSupportShared() {
return true; return true;
} }
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
if (FormDesignerUtils.isAppRelayout(WidgetPropertyPane.getInstance().getEditingFormDesigner())) {
return new WidgetPropertyUIProvider[] {new MobileBooKMarkUsePropertyUI(this)};
} else {
return super.getWidgetPropertyUIProviders();
}
}
} }

4
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java

@ -593,12 +593,8 @@ public class XWTabFitLayout extends XWFitLayout {
*/ */
@Override @Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
if (FormDesignerUtils.isAppRelayout(WidgetPropertyPane.getInstance().getEditingFormDesigner())) {
return new WidgetPropertyUIProvider[] {new MobileBookMarkPropertyUI(this), new MobileBooKMarkUsePropertyUI(this)};
} else {
return new WidgetPropertyUIProvider[0]; return new WidgetPropertyUIProvider[0];
} }
}
@Override @Override
public void firePropertyChange(){ public void firePropertyChange(){

2
designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java

@ -181,7 +181,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
if (selection != null && xCreator != null) { if (selection != null && xCreator != null) {
embeddedPropertyUIProviders = selection.getSelectedCreator().getWidgetPropertyUIProviders(); embeddedPropertyUIProviders = selection.getSelectedCreator().getWidgetPropertyUIProviders();
if(!designer.getDesignerMode().isFormParameterEditor()) { if(!designer.getDesignerMode().isFormParameterEditor()) {
if (!xCreator.acceptType(XWAbsoluteLayout.class, XWFitLayout.class, XWCardTagLayout.class, XWCardMainBorderLayout.class) && FormDesignerUtils.isAppRelayout(designer)) { if (!xCreator.acceptType(XWAbsoluteLayout.class, XWFitLayout.class, XWCardTagLayout.class) && FormDesignerUtils.isAppRelayout(designer)) {
embeddedPropertyUIProviders = ArrayUtils.insert(0, embeddedPropertyUIProviders, new MobileBookMarkPropertyUI(xCreator)); embeddedPropertyUIProviders = ArrayUtils.insert(0, embeddedPropertyUIProviders, new MobileBookMarkPropertyUI(xCreator));
} }
if (xCreator.supportMobileStyle()) { if (xCreator.supportMobileStyle()) {

10
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java

@ -34,7 +34,6 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
private MobileComponentMarginPane marginPane; private MobileComponentMarginPane marginPane;
private MobileComponentLayoutIntervalPane intervalPane; private MobileComponentLayoutIntervalPane intervalPane;
private MobileBookMarkUsePane mobileBookMarkUsePane; private MobileBookMarkUsePane mobileBookMarkUsePane;
private MobileAdvanceInnerPane mobileAdvanceInnerPane;
public TabMobileWidgetDefinePane(XCreator xCreator) { public TabMobileWidgetDefinePane(XCreator xCreator) {
this.xCreator = xCreator; this.xCreator = xCreator;
@ -72,10 +71,7 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
intervalPane = new MobileComponentLayoutIntervalPane(FormTabPaddingAttrMark.XML_TAG); intervalPane = new MobileComponentLayoutIntervalPane(FormTabPaddingAttrMark.XML_TAG);
if (FormDesignerUtils.isAppRelayout(designer)) { if (FormDesignerUtils.isAppRelayout(designer)) {
mobileBookMarkUsePane = new MobileBookMarkUsePane(); mobileBookMarkUsePane = new MobileBookMarkUsePane();
mobileAdvanceInnerPane = new MobileAdvanceInnerPane(xCreator);
innerAdvancePane.add(mobileBookMarkUsePane, BorderLayout.CENTER); innerAdvancePane.add(mobileBookMarkUsePane, BorderLayout.CENTER);
innerAdvancePane.add(mobileAdvanceInnerPane, BorderLayout.SOUTH);
} }
innerAdvancePane.add(marginPane, BorderLayout.NORTH); innerAdvancePane.add(marginPane, BorderLayout.NORTH);
UIExpandablePane advancePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, innerAdvancePane); UIExpandablePane advancePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, innerAdvancePane);
@ -105,9 +101,6 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
if (mobileBookMarkUsePane != null) { if (mobileBookMarkUsePane != null) {
mobileBookMarkUsePane.populate(xCreator); mobileBookMarkUsePane.populate(xCreator);
} }
if (mobileAdvanceInnerPane != null) {
mobileAdvanceInnerPane.populate();
}
} }
@Override @Override
@ -124,8 +117,5 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
if (mobileBookMarkUsePane != null) { if (mobileBookMarkUsePane != null) {
mobileBookMarkUsePane.update(xCreator); mobileBookMarkUsePane.update(xCreator);
} }
if (mobileAdvanceInnerPane != null) {
this.mobileAdvanceInnerPane.update();
}
} }
} }

5
designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java

@ -40,10 +40,13 @@ public class StyleListAction extends UpdateAction {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
final StyleManagerPane styleListPane = new StyleManagerPane(); final StyleManagerPane styleListPane = new StyleManagerPane();
BasicDialog styleListDialog = styleListPane.showWindow(designerFrame); final BasicDialog styleListDialog = styleListPane.showWindow(designerFrame);
styleListDialog.addDialogActionListener(new DialogActionAdapter() { styleListDialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
if (!styleListPane.isNamePermitted()) {
styleListDialog.setDoOKSucceed(false);
}
Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) { Configurations.modify(new WorkerFacade(ServerPreferenceConfig.class) {
@Override @Override
public void run() { public void run() {

4
designer-realize/src/main/java/com/fr/design/actions/server/StyleManagerPane.java

@ -34,4 +34,8 @@ public class StyleManagerPane extends BasicPane {
public void update(ServerPreferenceConfig configManager) { public void update(ServerPreferenceConfig configManager) {
this.styleArrayPane.update(configManager); this.styleArrayPane.update(configManager);
} }
public boolean isNamePermitted() {
return styleArrayPane.isNamePermitted();
}
} }

41
designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java

@ -3,26 +3,31 @@ package com.fr.design.present;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.config.StyleMap; import com.fr.config.StyleMap;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.controlpane.AbstractNameableCreator; import com.fr.design.gui.controlpane.AbstractNameableCreator;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.UnrepeatedNameHelper; import com.fr.design.gui.controlpane.UnrepeatedNameHelper;
import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.ModNameActionListener; import com.fr.design.gui.ilist.ModNameActionListener;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.i18n.Toolkit;
import com.fr.design.style.StylePane; import com.fr.design.style.StylePane;
import com.fr.general.ComparatorUtils;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.transaction.Configurations; import com.fr.stable.StringUtils;
import com.fr.transaction.WorkerAdaptor;
import javax.swing.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
public class StyleArrayPane extends JListControlPane { public class StyleArrayPane extends JListControlPane {
private boolean namePermitted = true;
/** /**
* Constructor. * Constructor.
*/ */
@ -30,11 +35,37 @@ public class StyleArrayPane extends JListControlPane {
super(); super();
this.addModNameActionListener(new ModNameActionListener() { this.addModNameActionListener(new ModNameActionListener() {
public void nameModed(int index, String oldName, String newName) { public void nameModed(int index, String oldName, String newName) {
if (ComparatorUtils.equals(oldName, newName)) {
return;
}
namePermitted = true;
String[] allNames = nameableList.getAllNames();
allNames[index] = StringUtils.EMPTY;
if (StringUtils.isEmpty(newName)) {
showTipDialogAndReset(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Empty_Name"), index);
return;
}
if (isNameRepeated(new List[] {Arrays.asList(allNames)}, newName)) {
showTipDialogAndReset(Toolkit.i18nText("Fine-Design_Basic_Predefined_Style_Duplicate_Name", newName), index);
return;
}
populateSelectedValue(); populateSelectedValue();
} }
}); });
} }
private void showTipDialogAndReset(String content, int index) {
nameableList.stopEditing();
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(StyleArrayPane.this),
content,
Toolkit.i18nText("Fine-Design_Basic_Alert"),
JOptionPane.WARNING_MESSAGE);
setIllegalIndex(index);
namePermitted = false;
}
/** /**
* 创建样式设置组件 * 创建样式设置组件
* *
@ -105,4 +136,8 @@ public class StyleArrayPane extends JListControlPane {
configManager.setStyleMap(styleMap); configManager.setStyleMap(styleMap);
} }
public boolean isNamePermitted() {
return namePermitted;
}
} }

4
designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java

@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit;
public class DesignerSuperListener { public class DesignerSuperListener {
private static final DesignerSuperListener INSTANCE = new DesignerSuperListener(); private static final DesignerSuperListener INSTANCE = new DesignerSuperListener();
private static final int ONCE_DELAY = 90; private static final int ONCE_DELAY = 180;
private static final int FIXED_DELAY = 0; private static final int FIXED_DELAY = 0;
private static final int FIXED_FREQ = 2; private static final int FIXED_FREQ = 2;
@ -116,6 +116,7 @@ public class DesignerSuperListener {
@Override @Override
protected void okEvent() { protected void okEvent() {
dispose(); dispose();
DesignerLauncher.getInstance().exit();
} }
@Override @Override
@ -125,7 +126,6 @@ public class DesignerSuperListener {
} }
}; };
dialog.setVisible(true); dialog.setVisible(true);
DesignerLauncher.getInstance().exit();
} }
private void startFallBackListener() { private void startFallBackListener() {

Loading…
Cancel
Save