From e35e8f5e6dc4c1a8083ec7b6131a5fb453419ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 2 Mar 2020 09:49:49 +0800 Subject: [PATCH 01/14] =?UTF-8?q?CHART-11090=20=E5=9C=B0=E5=9B=BE=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chartx/component/MapAreaMatchPane.java | 2 +- .../chart/gui/data/NormalChartDataPane.java | 13 ++- .../chart/gui/data/TableDataPane.java | 9 ++ .../table/AbstractTableDataContentPane.java | 12 ++- .../designer/data/comp/DrillMapDataPane.java | 10 ++- .../designer/data/comp/DrillMapLayerPane.java | 13 ++- .../comp/EachLayerDataDefinitionPane.java | 7 +- .../comp/SingleLayerDataDefinitionPane.java | 5 ++ .../type/VanChartDrillMapPlotPane.java | 23 +++++ .../fr/van/chart/map/VanMapChartTypeUI.java | 6 +- .../designer/data/VanChartMapDataPane.java | 32 +++++-- .../VanAreaMapPlotTableDataContentPane.java | 7 +- .../VanLineMapPlotTableDataContentPane.java | 60 ++++++++++++- .../table/VanMapTableDataContentPane.java | 90 +++++++++++++++++++ .../VanPointMapPlotTableDataContentPane.java | 31 ++++++- .../designer/type/VanChartMapPlotPane.java | 16 ++++ 16 files changed, 305 insertions(+), 31 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java index 708b99365..f37a01c22 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java @@ -196,7 +196,7 @@ public class MapAreaMatchPane extends BasicBeanPane { //先取保存的数据集名称和区域名,若不存在,就取数据集面板配置的数据集名称和区域名 matchResultTable.populateBean(matchResult); - if (matchResult != null && matchResult.getTableName() != null) { + if (matchResult != null && StringUtils.isNotEmpty(matchResult.getTableName())) { tableName = matchResult.getTableName(); areaName = matchResult.getColumnName(); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index 1277ae463..42cf782c3 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -8,16 +8,15 @@ import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.utils.gui.GUICoreUtils; - import com.fr.van.chart.designer.AbstractVanChartScrollPane; import javax.swing.BorderFactory; import javax.swing.JPanel; +import java.util.ArrayList; +import java.util.List; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; -import java.util.ArrayList; -import java.util.List; /** * 一般数据界面 @@ -133,6 +132,14 @@ public class NormalChartDataPane extends DataContentsPane { tableDataPane.checkBoxUse(); } + /** + * 钻取地图需要同时更新层级 + */ + public void populate(ChartCollection collection, int level) { + populate(collection); + tableDataPane.refreshLevel(level); + } + /** * 保存 数据界面内容 */ diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java index 7f22a03a6..f8092b859 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java @@ -15,6 +15,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.utils.gui.UIComponentUtils; +import com.fr.van.chart.map.designer.data.contentpane.table.VanMapTableDataContentPane; import javax.swing.BorderFactory; import java.awt.BorderLayout; @@ -75,6 +76,7 @@ public class TableDataPane extends FurtherBasicBeanPane{ } if(dataContentPane != null) { dataContentPane.onSelectTableData(dataWrap); + dataContentPane.setTableName(dataWrap.getTableDataName()); } } @@ -124,6 +126,13 @@ public class TableDataPane extends FurtherBasicBeanPane{ add(dataContentPane, BorderLayout.CENTER); } } + + public void refreshLevel(int level){ + if(dataContentPane instanceof VanMapTableDataContentPane) { + ((VanMapTableDataContentPane) dataContentPane).setLevel(level); + } + } + /** * 更新界面属性 */ diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java index df5d99fbd..1bfb9657c 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java @@ -6,16 +6,26 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.gui.icombobox.UIComboBox; import javax.swing.JSeparator; +import java.util.List; import java.awt.Dimension; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.util.List; public abstract class AbstractTableDataContentPane extends BasicBeanPane{ protected static final double COMPONENT_WIDTH = 124; private boolean isNeedSummaryCaculateMethod = true; + + public String tableName; + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } public abstract void updateBean(ChartCollection ob); diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapDataPane.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapDataPane.java index 5b441f7db..4ac2b2528 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapDataPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapDataPane.java @@ -8,12 +8,15 @@ import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.plugin.chart.drillmap.data.DrillMapDefinition; +import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.VanChartMapPlot; +import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import com.fr.plugin.chart.type.MapType; import com.fr.van.chart.map.designer.data.MapDataPaneHelper; -import java.awt.BorderLayout; import java.util.ArrayList; import java.util.List; +import java.awt.BorderLayout; /** * Created by Mitisky on 16/6/20. @@ -76,8 +79,11 @@ public class DrillMapDataPane extends BasicBeanPane { dataDefinitionType.setSelectedIndex(MapDataPaneHelper.isFromBottomData(ob) ? 0 : 1); + MapMatchResult matchResult = ((VanChartMapPlot) ob.getSelectedChartProvider(Chart.class).getPlot()).getMatchResult(); ChartCollection bottomDataChartCollection = MapDataPaneHelper.getBottomDataDrillMapChartCollection(ob); - bottomDataDefinitionPane.populateBean(bottomDataChartCollection); + ((VanChartMapPlot)bottomDataChartCollection.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); + + bottomDataDefinitionPane.populateBean(bottomDataChartCollection, ChartGEOJSONHelper.BOTTOM_LEVEL); eachLayerDataDefinitionPane.populateBean(ob); parent.initAllListeners(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java index 6fd6ecabb..a01aed4cd 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java @@ -7,9 +7,9 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.ComparatorUtils; - import com.fr.plugin.chart.drillmap.DrillMapHelper; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; +import com.fr.plugin.chart.map.MapMatchResult; import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper; import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.ZoomLevel; @@ -19,10 +19,11 @@ import com.fr.van.chart.map.designer.type.VanChartMapSourceChoosePane; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.tree.DefaultMutableTreeNode; -import java.awt.BorderLayout; -import java.awt.Component; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; +import java.awt.BorderLayout; +import java.awt.Component; /** * Created by Mitisky on 16/6/20. @@ -125,6 +126,7 @@ public class DrillMapLayerPane extends BasicScrollPane { if (drillMapPlot != null) { java.util.List levelList = drillMapPlot.getLayerLevelList(); java.util.List mapTypeList = drillMapPlot.getLayerMapTypeList(); + List matchResultList = drillMapPlot.getMatchResultList(); if (detailComps == null || drillMapPlot.getMapType() != oldMapType || !ComparatorUtils.equals(drillMapPlot.getGeoUrl(), oldGeoUrl)) { oldMapType = drillMapPlot.getMapType(); @@ -151,6 +153,11 @@ public class DrillMapLayerPane extends BasicScrollPane { mapTypeList.add(mapType); } + int matchSize = matchResultList.size(); + for (int k = matchSize; k < depth; k++) { + matchResultList.add(new MapMatchResult()); + } + for (int i = 0; i < depth; i++) { Component[] components = detailComps[i + 1]; if (components != null) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java index 26f8c42c3..16d989829 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java @@ -11,14 +11,15 @@ import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.drillmap.DrillMapHelper; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.data.DrillMapDefinition; +import com.fr.plugin.chart.map.MapMatchResult; import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper; import com.fr.plugin.chart.type.MapType; import com.fr.van.chart.map.designer.data.MapDataPaneHelper; import javax.swing.tree.DefaultMutableTreeNode; -import java.awt.CardLayout; import java.util.ArrayList; import java.util.List; +import java.awt.CardLayout; /** * Created by Mitisky on 16/6/20. @@ -90,12 +91,14 @@ public class EachLayerDataDefinitionPane extends MultiTabPane { } private void populatePaneList(ChartCollection chartCollection) { + List matchResultList = ((VanChartDrillMapPlot) chartCollection.getSelectedChartProvider(Chart.class).getPlot()).getMatchResultList(); for (int i = 0, len = paneList.size(); i < len; i++) { BasicPane basicPane = paneList.get(i); MapType mapType = oldMapList.get(i); if (basicPane instanceof SingleLayerDataDefinitionPane) { ChartCollection clone = MapDataPaneHelper.getLayerChartCollection(chartCollection, i, mapType); - ((SingleLayerDataDefinitionPane) basicPane).populateBean(clone); + ((VanChartDrillMapPlot)clone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResultList(matchResultList); + ((SingleLayerDataDefinitionPane) basicPane).populateBean(clone, i); } } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/SingleLayerDataDefinitionPane.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/SingleLayerDataDefinitionPane.java index 1aca1a32d..16906845e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/SingleLayerDataDefinitionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/SingleLayerDataDefinitionPane.java @@ -78,6 +78,11 @@ public class SingleLayerDataDefinitionPane extends FurtherBasicBeanPane newMatchResultList = new ArrayList<>(); + List matchResultList = ((VanChartDrillMapPlot) oldPlot).getMatchResultList(); + if (matchResultList != null) { + for (MapMatchResult matchResult : matchResultList) { + newMatchResultList.add((MapMatchResult) matchResult.clone()); + } + } + ((VanChartDrillMapPlot) newPlot).setMatchResultList(newMatchResultList); + } catch (CloneNotSupportedException e) { + FineLoggerFactory.getLogger().error("Error in change plot"); + } + } protected Chart[] getDefaultCharts() { return DrillMapIndependentVanChart.DrillMapVanCharts; diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/VanMapChartTypeUI.java b/designer-chart/src/main/java/com/fr/van/chart/map/VanMapChartTypeUI.java index 07cb2cbd6..50636ad28 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/VanMapChartTypeUI.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/VanMapChartTypeUI.java @@ -21,6 +21,7 @@ import com.fr.van.chart.map.designer.data.contentpane.report.VanLineMapPlotRepor import com.fr.van.chart.map.designer.data.contentpane.report.VanPointMapPlotReportDataContentPane; import com.fr.van.chart.map.designer.data.contentpane.table.VanAreaMapPlotTableDataContentPane; import com.fr.van.chart.map.designer.data.contentpane.table.VanLineMapPlotTableDataContentPane; +import com.fr.van.chart.map.designer.data.contentpane.table.VanMapTableDataContentPane; import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane; import com.fr.van.chart.map.designer.other.VanChartMapOtherPane; import com.fr.van.chart.map.designer.other.condition.pane.VanChartMapConditionPane; @@ -77,9 +78,12 @@ public class VanMapChartTypeUI extends AbstractIndependentVanChartUI { //图表数据结构 恢复用注释。删除下面5个方法 getTableDataSourcePane getReportDataSourcePane getChartDataPane areaPlot linePlot。 public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { - return areaPlot(plot) ? new VanAreaMapPlotTableDataContentPane(parent) + VanMapTableDataContentPane vanMapTableDataContentPane = areaPlot(plot) ? new VanAreaMapPlotTableDataContentPane(parent) : linePlot(plot) ? new VanLineMapPlotTableDataContentPane(parent) : new VanPointMapPlotTableDataContentPane(parent); + + vanMapTableDataContentPane.setPlot((VanChartMapPlot)plot); + return vanMapTableDataContentPane; } public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java index a6fdd49ce..e7a222bf9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java @@ -1,9 +1,12 @@ package com.fr.van.chart.map.designer.data; +import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; +import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.data.VanMapDefinition; import com.fr.plugin.chart.type.MapType; @@ -54,26 +57,37 @@ public class VanChartMapDataPane extends ChartDataPane { repeatLayout(collection); + MapMatchResult matchResult = ((VanChartMapPlot) collection.getSelectedChartProvider(Chart.class).getPlot()).getMatchResult(); + + ChartCollection areaClone; + ChartCollection pointClone; + ChartCollection lineClone; switch (mapType) { case AREA: - ChartCollection areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection); + areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection); + ((VanChartMapPlot)areaClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); contentsPane.populate(areaClone); break; case POINT: - ChartCollection pointClone = MapDataPaneHelper.getPointMapChartCollection(collection); + pointClone = MapDataPaneHelper.getPointMapChartCollection(collection); + ((VanChartMapPlot)pointClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); contentsPane.populate(pointClone); break; case LINE: - ChartCollection lineClone = MapDataPaneHelper.getLineMapChartCollection(collection); + lineClone = MapDataPaneHelper.getLineMapChartCollection(collection); + ((VanChartMapPlot)lineClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); contentsPane.populate(lineClone); break; case CUSTOM: - ChartCollection areaClone1 = MapDataPaneHelper.getAreaMapChartCollection(collection); - ChartCollection pointClone1 = MapDataPaneHelper.getPointMapChartCollection(collection); - ChartCollection lineClone1 = MapDataPaneHelper.getLineMapChartCollection(collection); - ((CustomMapChartDataContentsPane) contentsPane).populateAreaMap(areaClone1); - ((CustomMapChartDataContentsPane) contentsPane).populatePointMap(pointClone1); - ((CustomMapChartDataContentsPane) contentsPane).populateLineMap(lineClone1); + areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection); + pointClone = MapDataPaneHelper.getPointMapChartCollection(collection); + lineClone = MapDataPaneHelper.getLineMapChartCollection(collection); + ((VanChartMapPlot)areaClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); + ((VanChartMapPlot)pointClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); + ((VanChartMapPlot)lineClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); + ((CustomMapChartDataContentsPane) contentsPane).populateAreaMap(areaClone); + ((CustomMapChartDataContentsPane) contentsPane).populatePointMap(pointClone); + ((CustomMapChartDataContentsPane) contentsPane).populateLineMap(lineClone); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java index b8c1d3a75..86bc0c6d0 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java @@ -8,7 +8,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartDataPane; -import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.van.chart.map.designer.data.component.SeriesTypeUseComboxPaneWithOutFilter; @@ -16,17 +15,17 @@ import com.fr.van.chart.map.designer.data.component.SeriesTypeUseComboxPaneWithO import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.JSeparator; +import java.util.List; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.util.List; /** * Created by Mitisky on 16/5/16. */ -public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContentPane { +public class VanAreaMapPlotTableDataContentPane extends VanMapTableDataContentPane { private UIComboBox areaNameCom; protected SeriesTypeUseComboxPaneWithOutFilter seriesTypeUseComboxPane; @@ -72,7 +71,7 @@ public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContent double[] rowSize = {p}; Component[][] components = new Component[][]{ - new Component[]{label, areaNameCom}, + new Component[]{label, createAreaPanel(areaNameCom)}, }; return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java index abbddc732..dd50492f2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java @@ -1,10 +1,15 @@ package com.fr.van.chart.map.designer.data.contentpane.table; +import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.van.chart.map.designer.data.component.table.AbstractLongLatAreaPane; +import com.fr.van.chart.map.designer.data.component.table.AreaPane; import com.fr.van.chart.map.designer.data.component.table.LineMapAreaPane; import com.fr.van.chart.map.designer.data.component.table.LineMapLongLatAreaPane; +import com.fr.van.chart.map.designer.data.component.table.LongLatAreaPane; + +import java.awt.Component; /** @@ -16,10 +21,61 @@ public class VanLineMapPlotTableDataContentPane extends VanPointMapPlotTableData } protected AbstractLongLatAreaPane createAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) { - return new LineMapAreaPane(longLatAreaTableComboPane); + return new LineMapAreaPane(longLatAreaTableComboPane) { + @Override + protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { + areaPane = new AreaPane(parentPane) { + @Override + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), VanLineMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} + }; + } + }; + } + @Override + protected void initEndAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { + endAreaPane = new AreaPane(parentPane) { + @Override + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")), VanLineMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} + }; + } + }; + } + }; } protected AbstractLongLatAreaPane createLongLatAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) { - return new LineMapLongLatAreaPane(longLatAreaTableComboPane); + return new LineMapLongLatAreaPane(longLatAreaTableComboPane){ + @Override + protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { + areaPane = new LongLatAreaPane(parentPane) { + @Override + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Longitude")), longitudeCom}, + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Latitude")), latitudeCom}, + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), VanLineMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} + }; + } + }; + } + + @Override + protected void initEndAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { + endAreaPane = new LongLatAreaPane(parentPane){ + @Override + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Longitude")), longitudeCom}, + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Latitude")), latitudeCom}, + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")), VanLineMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} + }; + } + }; + } + }; } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java new file mode 100644 index 000000000..a8cae03c9 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java @@ -0,0 +1,90 @@ +package com.fr.van.chart.map.designer.data.contentpane.table; + +import com.fr.base.BaseUtils; +import com.fr.base.Utils; +import com.fr.chartx.TwoTuple; +import com.fr.design.chartx.component.MapAreaMatchPane; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.DialogActionListener; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.VanChartMapPlot; +import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.tree.DefaultMutableTreeNode; +import java.util.Set; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * @author Bjorn + * @version 10.0 + * Created by Bjorn on 2019-12-25 + */ +public abstract class VanMapTableDataContentPane extends AbstractTableDataContentPane { + + private VanChartMapPlot plot; + + //钻取地图有层级,默认-1代表无层级关系 + private int level = ChartGEOJSONHelper.DEFAULT_LEVEL; + + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } + + public VanChartMapPlot getPlot() { + return plot; + } + + public void setPlot(VanChartMapPlot plot) { + this.plot = plot; + } + + public JPanel createAreaPanel(final UIComboBox areaBox) { + JPanel areaPanel = new JPanel(new BorderLayout(4, 0)); + areaBox.setPreferredSize(new Dimension(70, 20)); + areaPanel.add(areaBox, BorderLayout.CENTER); + UIButton uiButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/config.png")); + uiButton.addActionListener(new ActionListener() { + private TwoTuple> treeNodeAndItems; + + @Override + public void actionPerformed(ActionEvent e) { + if (treeNodeAndItems == null) { + treeNodeAndItems = ChartGEOJSONHelper.getTreeNodeAndItems(plot.getGeoUrl(), level); + } + final MapAreaMatchPane pane = new MapAreaMatchPane(treeNodeAndItems); + + String nameTable = getTableName(); + final MapMatchResult matchResult = plot.getMatchResult(level); + + pane.populateBean(matchResult, nameTable, Utils.objectToString(areaBox.getSelectedItem())); + BasicDialog dialog = pane.showWindow(new JFrame()); + dialog.addDialogActionListener(new DialogActionListener() { + @Override + public void doOk() { + pane.updateBean(matchResult); + } + + @Override + public void doCancel() { + + } + }); + dialog.setVisible(true); + } + }); + areaPanel.add(uiButton, BorderLayout.EAST); + return areaPanel; + } +} \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java index 724da2675..cbb418b8d 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java @@ -2,12 +2,15 @@ package com.fr.van.chart.map.designer.data.contentpane.table; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.van.chart.map.designer.data.component.table.AbstractLongLatAreaPane; +import com.fr.van.chart.map.designer.data.component.table.AreaPane; +import com.fr.van.chart.map.designer.data.component.table.LongLatAreaPane; import com.fr.van.chart.map.designer.data.component.table.PointMapAreaPane; import com.fr.van.chart.map.designer.data.component.table.PointMapLongLatAreaPane; @@ -15,11 +18,11 @@ import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import java.util.List; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Component; import java.awt.Dimension; -import java.util.List; /** * Created by Mitisky on 16/5/17. @@ -214,11 +217,33 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData } protected AbstractLongLatAreaPane createAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) { - return new PointMapAreaPane(longLatAreaTableComboPane); + return new PointMapAreaPane(longLatAreaTableComboPane) { + protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { + areaPane = new AreaPane(parentPane) { + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), VanPointMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} + }; + } + }; + } + }; } protected AbstractLongLatAreaPane createLongLatAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) { - return new PointMapLongLatAreaPane(longLatAreaTableComboPane); + return new PointMapLongLatAreaPane(longLatAreaTableComboPane) { + protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { + areaPane = new LongLatAreaPane(parentPane) { + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Longitude")), longitudeCom}, + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Latitude")), latitudeCom}, + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name")), VanPointMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} + }; + } + }; + } + }; } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java index 8f44c0a9b..b9cdaad46 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java @@ -10,6 +10,7 @@ import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.map.MapIndependentVanChart; +import com.fr.plugin.chart.map.MapMatchResult; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.data.VanMapDefinition; import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; @@ -90,6 +91,21 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane { } } + /** + * 同一个地图, 类型之间切换 + */ + @Override + protected void cloneOldPlot2New(Plot oldPlot, Plot newPlot) { + super.cloneOldPlot2New(oldPlot, newPlot); + try { + if (((VanChartMapPlot) oldPlot).getMatchResult() != null) { + ((VanChartMapPlot) newPlot).setMatchResult((MapMatchResult) ((VanChartMapPlot) oldPlot).getMatchResult().clone()); + } + } catch (CloneNotSupportedException e) { + FineLoggerFactory.getLogger().error("Error in change plot"); + } + } + /** * 不同地图类型的超链不需要复制 * From 8b7302459583ab5acd89ff2b0d346e4d65b268dd Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 2 Mar 2020 14:35:31 +0800 Subject: [PATCH 02/14] =?UTF-8?q?CHART-12810=20//=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9A=84tab=E9=9D=9E=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81,=20?= =?UTF-8?q?=E5=8E=9F=E4=B8=BA=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?tab=E4=BF=9D=E6=8C=81=E9=80=89=E4=B8=AD=E4=B8=8D=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/chart/gui/ChartTypeButtonPane.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 1fbb87c42..4d7673b3e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -503,6 +503,13 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen if (this.isSelected()) { indexList.get(0).setSelected(true); changeCollectionSelected(indexList.get(0).getButtonName()); + } else {//删除的tab非选中状态, 原为选中状态的tab保持选中不变 + for (ChartChangeButton button : indexList) { + if (button.isSelected()) { + changeCollectionSelected(button.getButtonName()); + break; + } + } } } From ff7e4b8cc2dcda07f27d2a8c20390d81872bb3b2 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 3 Mar 2020 15:53:06 +0800 Subject: [PATCH 03/14] =?UTF-8?q?MOBILE-25437=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=BF=AB=E9=80=9F=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E5=8A=9F=E8=83=BD=E4=BE=A7=E8=BE=B9=E6=A0=8F?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/MobileBookMarkStyleDefinePane.java | 6 +- .../mobile/ui/MobileBookMarkStylePane.java | 16 +- ...arMobileBookMarkStyleCustomDefinePane.java | 387 ++++++++++++++++++ .../SidebarMobileBookMarkStyleProvider.java | 30 ++ 4 files changed, 436 insertions(+), 3 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java create mode 100644 designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleProvider.java diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileBookMarkStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileBookMarkStyleDefinePane.java index 0a480d99a..7812e8f32 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileBookMarkStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileBookMarkStyleDefinePane.java @@ -30,11 +30,15 @@ public class MobileBookMarkStyleDefinePane extends BasicBeanPane { + public static final int LEFT_PANEL_WIDTH = 140; + public static final int LEFT_PANEL_HEIGHT = 565; + public static final int RIGHT_PANEL_WIDTH = 510; + public static final int RIGHT_PANEL_HEIGHT = 565; + public static ListCellRenderer renderer = new DefaultListCellRenderer() { @Override @@ -48,6 +55,7 @@ public class MobileBookMarkStylePane extends BasicBeanPane private void initComponent() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); this.listModel = new DefaultListModel<>(); this.card = new CardLayout(); this.rightPane = FRGUIPaneFactory.createCardLayout_S_Pane(); @@ -79,14 +87,16 @@ public class MobileBookMarkStylePane extends BasicBeanPane } }); JPanel leftPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); + leftPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); leftPanel.add(bookMarkList, BorderLayout.CENTER); - leftPanel.setPreferredSize(new Dimension(100, 500)); + leftPanel.setPreferredSize(new Dimension(LEFT_PANEL_WIDTH, LEFT_PANEL_HEIGHT)); this.add(leftPanel, BorderLayout.WEST); } private void initRightPanel() { JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - centerPane.setPreferredSize(new Dimension(500, 500)); + centerPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + centerPane.setPreferredSize(new Dimension(RIGHT_PANEL_WIDTH, RIGHT_PANEL_HEIGHT)); centerPane.add(rightPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER); } @@ -94,10 +104,12 @@ public class MobileBookMarkStylePane extends BasicBeanPane private List getMobileBookMarkStyleProvider() { DefaultMobileBookMarkStyleProvider defaultMobileBookMarkStyleProvider = new DefaultMobileBookMarkStyleProvider(); + SidebarMobileBookMarkStyleProvider sidebarMobileBookMarkStyleProvider = new SidebarMobileBookMarkStyleProvider(); Set mobileBookMarkStyleProviders = ExtraDesignClassManager.getInstance().getArray( MobileBookMarkStyleProvider.XML_TAG); List list = new ArrayList<>(); list.add(defaultMobileBookMarkStyleProvider); + list.add(sidebarMobileBookMarkStyleProvider); list.addAll(mobileBookMarkStyleProviders); return Collections.unmodifiableList(list); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java new file mode 100644 index 000000000..79bab33df --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java @@ -0,0 +1,387 @@ +package com.fr.design.mainframe.mobile.ui; + +import com.fr.base.BaseUtils; +import com.fr.base.Utils; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.ibutton.UIColorButton; +import com.fr.design.gui.ibutton.UIToggleButton; +import com.fr.design.gui.icombobox.LineComboBox; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UnsignedIntUISpinner; +import com.fr.design.gui.style.FRFontPane; +import com.fr.design.gui.style.NumberDragBar; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.form.ui.mobile.MobileBookMarkStyle; +import com.fr.form.ui.mobile.impl.SidebarMobileBookMarkStyle; +import com.fr.stable.CoreConstants; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; + +/** + * @author Starryi + * @version 10.0 + * Created by Starryi on 2020/02/28 + */ +public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane { + private static final long serialVersionUID = 1L; + + private static final int COLUMN_WIDTH = 160; + + private UnsignedIntUISpinner buttonWidthSpinner; + private UnsignedIntUISpinner buttonHeightSpinner; + private UnsignedIntUISpinner buttonGapSpinner; + private UnsignedIntUISpinner buttonBorderRadiusSpinner; + + private ColorSelectBox normalBackgroundColorBox; + private NumberDragBar normalOpacityDragBar; + private UnsignedIntUISpinner normalOpacitySpinner; + private LineComboBox normalBorderWidthComBox; + private ColorSelectBox normalBorderColorBox; + private UIComboBox normalFontNameComboBox; + private UIComboBox normalFontSizeComboBox; + private UIColorButton normalFontColorButton; + private UIToggleButton normalFontItalicButton; + private UIToggleButton normalFontBoldButton; + + private ColorSelectBox selectedBackgroundColorBox; + private NumberDragBar selectedOpacityDragBar; + private UnsignedIntUISpinner selectedOpacitySpinner; + private LineComboBox selectedBorderWidthComBox; + private ColorSelectBox selectedBorderColorBox; + private UIComboBox selectedFontNameComboBox; + private UIComboBox selectedFontSizeComboBox; + private UIColorButton selectedFontColorButton; + private UIToggleButton selectedFontItalicButton; + private UIToggleButton selectedFontBoldButton; + + private SidebarMobileBookMarkStyle DEFAULT_STYLE = new SidebarMobileBookMarkStyle(); + + public SidebarMobileBookMarkStyleCustomDefinePane() { + this.initComponent(); + } + + private void initComponent() { + this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); + this.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); + + this.add(this.createNavButtonStylePanel()); + this.add(this.createNormalStateStylePanel()); + this.add(this.createSelectedStateStylePanel()); + } + + private JPanel createNavButtonStylePanel() { + + buttonWidthSpinner = new UnsignedIntUISpinner(20, 150, 1, DEFAULT_STYLE.getWidth()); + buttonHeightSpinner = new UnsignedIntUISpinner(20, 100, 1, DEFAULT_STYLE.getHeight()); + buttonGapSpinner = new UnsignedIntUISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_STYLE.getGap()); + buttonBorderRadiusSpinner = new UnsignedIntUISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_STYLE.getBorderRadius()); + + UILabel sizeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Size") + ":", + SwingConstants.RIGHT); + JPanel sizePane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0); + sizePane.add(buttonWidthSpinner); + sizePane.add(buttonHeightSpinner); + + JPanel sizeTipsPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0); + sizeTipsPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Width"), + SwingConstants.CENTER)); + sizeTipsPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Height"), + SwingConstants.CENTER)); + + UILabel gapLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Gap") + ":", + SwingConstants.RIGHT); + UILabel borderRadiusLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Border_Radius") + ":", + SwingConstants.RIGHT); + + double p = TableLayout.PREFERRED; + double[] rowSize = {p, p, p, p}; + double[] columnSize = {p, COLUMN_WIDTH}; + double[] verticalGaps = {0, 10, 10}; + + JPanel navButtonSettingsPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{ + {sizeLabel, sizePane}, + {null, sizeTipsPane}, + {gapLabel, buttonGapSpinner}, + {borderRadiusLabel, buttonBorderRadiusSpinner}, + }, rowSize, columnSize, 5, verticalGaps); + + navButtonSettingsPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); + + JPanel containerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + containerPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Style"), + Color.decode("#2F8EF1"))); + containerPane.add(navButtonSettingsPanel); + + return containerPane; + } + + private JPanel createNormalStateStylePanel() { + double p = TableLayout.PREFERRED; + + normalBackgroundColorBox = new ColorSelectBox(COLUMN_WIDTH); + normalBackgroundColorBox.setSelectObject(DEFAULT_STYLE.getBackgroundColor()); + normalOpacityDragBar = new NumberDragBar(0, 100); + normalOpacityDragBar.setValue(DEFAULT_STYLE.getOpacity()); + normalOpacityDragBar.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + normalOpacitySpinner.setValue(normalOpacityDragBar.getValue()); + } + }); + normalOpacitySpinner = new UnsignedIntUISpinner(0, 100, 1, DEFAULT_STYLE.getOpacity()); + normalOpacitySpinner.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + normalOpacityDragBar.setValue((int) normalOpacitySpinner.getValue()); + } + }); + normalBorderWidthComBox = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); + normalBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getBorderWidth()); + normalBorderColorBox = new ColorSelectBox(COLUMN_WIDTH); + normalBorderColorBox.setSelectObject(DEFAULT_STYLE.getBorderColor()); + normalFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + normalFontNameComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontFamily()); + normalFontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES); + normalFontSizeComboBox.setSelectedItem(DEFAULT_STYLE.getFontSize()); + normalFontColorButton = new UIColorButton(); + normalFontColorButton.setColor(DEFAULT_STYLE.getFontColor()); + normalFontItalicButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); + normalFontItalicButton.setSelected(DEFAULT_STYLE.isFontItalic()); + normalFontBoldButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); + normalFontBoldButton.setSelected(DEFAULT_STYLE.isFontBold()); + + JPanel opacityPane = new JPanel(new BorderLayout(0, 0)); + JPanel jp = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0); + jp.add(normalOpacityDragBar); + jp.add(normalOpacitySpinner); + opacityPane.add(jp, BorderLayout.CENTER); + + JPanel fontExtraPane = TableLayoutHelper.createGapTableLayoutPane( + new JComponent[][]{{normalFontSizeComboBox, normalFontColorButton, normalFontItalicButton, normalFontBoldButton}}, + new double[]{p}, + new double[]{p, p, p, p}, + 0, 5 + ); + + double[] rowSize = {p, p, p, p, p}; + double[] columnSize = {p, COLUMN_WIDTH, p}; + + JPanel normalStateStyleSettingsPanel = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{ + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Background_Color") + ":", SwingConstants.RIGHT), + normalBackgroundColorBox + }, + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Opacity") + ":", SwingConstants.RIGHT), + opacityPane, + new UILabel("%") + }, + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Border_Width") + ":", SwingConstants.RIGHT), + normalBorderWidthComBox + }, + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Border_Color") + ":", SwingConstants.RIGHT), + normalBorderColorBox + }, + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Font") + ":", SwingConstants.RIGHT), + normalFontNameComboBox, + fontExtraPane + } + }, rowSize, columnSize, 5, 10); + normalStateStyleSettingsPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); + + JPanel containerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + containerPane.setBorder( + GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Normal_Style"), + Color.decode("#2F8EF1")) + ); + containerPane.add(normalStateStyleSettingsPanel); + + return containerPane; + } + + private JPanel createSelectedStateStylePanel() { + double p = TableLayout.PREFERRED; + + selectedBackgroundColorBox = new ColorSelectBox(COLUMN_WIDTH); + selectedBackgroundColorBox.setSelectObject(DEFAULT_STYLE.getSelectedBackgroundColor()); + selectedOpacityDragBar = new NumberDragBar(0, 100); + selectedOpacityDragBar.setValue(DEFAULT_STYLE.getSelectedOpacity()); + selectedOpacityDragBar.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + selectedOpacitySpinner.setValue(selectedOpacityDragBar.getValue()); + } + }); + selectedOpacitySpinner = new UnsignedIntUISpinner(0, 100, 1, DEFAULT_STYLE.getSelectedOpacity()); + selectedOpacitySpinner.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + selectedOpacityDragBar.setValue((int) selectedOpacitySpinner.getValue()); + } + }); + selectedBorderWidthComBox = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); + selectedBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getSelectedBorderWidth()); + selectedBorderColorBox = new ColorSelectBox(COLUMN_WIDTH); + selectedBorderColorBox.setSelectObject(DEFAULT_STYLE.getSelectedBorderColor()); + selectedFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + selectedFontNameComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontFamily()); + selectedFontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES); + selectedFontSizeComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontSize()); + selectedFontColorButton = new UIColorButton(); + selectedFontColorButton.setColor(DEFAULT_STYLE.getSelectedFontColor()); + selectedFontItalicButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); + selectedFontItalicButton.setSelected(DEFAULT_STYLE.isSelectedFontItalic()); + selectedFontBoldButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); + selectedFontBoldButton.setSelected(DEFAULT_STYLE.isSelectedFontBold()); + + JPanel opacityPane = new JPanel(new BorderLayout(0, 0)); + JPanel jp = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0); + jp.add(selectedOpacityDragBar); + jp.add(selectedOpacitySpinner); + opacityPane.add(jp, BorderLayout.CENTER); + + JPanel fontExtraPane = TableLayoutHelper.createGapTableLayoutPane( + new JComponent[][]{{selectedFontSizeComboBox, selectedFontColorButton, selectedFontItalicButton, selectedFontBoldButton}}, + new double[]{p}, + new double[]{p, p, p, p}, + 0, 5 + ); + + double[] rowSize = {p, p, p, p, p}; + double[] columnSize = {p, COLUMN_WIDTH, p}; + + JPanel selectedStateStyleSettingsPanel = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{ + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Background_Color") + ":", SwingConstants.RIGHT), + selectedBackgroundColorBox + }, + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Opacity") + ":", SwingConstants.RIGHT), + opacityPane, + new UILabel("%") + }, + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Border_Width") + ":", SwingConstants.RIGHT), + selectedBorderWidthComBox + }, + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Border_Color") + ":", SwingConstants.RIGHT), + selectedBorderColorBox + }, + { + new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Font") + ":", SwingConstants.RIGHT), + selectedFontNameComboBox, + fontExtraPane + } + }, rowSize, columnSize, 5, 10); + selectedStateStyleSettingsPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); + + JPanel containerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + containerPane.setBorder( + GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Selected_Style"), + Color.decode("#2F8EF1")) + ); + containerPane.add(selectedStateStyleSettingsPanel); + + return containerPane; + } + + @Override + public void populateBean(MobileBookMarkStyle ob) { + SidebarMobileBookMarkStyle style = null; + if (ob instanceof SidebarMobileBookMarkStyle) { + style = (SidebarMobileBookMarkStyle) ob; + } + if (style == null) { + return; + } + + buttonWidthSpinner.setValue(style.getWidth()); + buttonHeightSpinner.setValue(style.getHeight()); + buttonGapSpinner.setValue(style.getGap()); + buttonBorderRadiusSpinner.setValue(style.getBorderRadius()); + + normalBackgroundColorBox.setSelectObject(style.getBackgroundColor()); + normalOpacityDragBar.setValue(style.getOpacity()); + normalOpacitySpinner.setValue(style.getOpacity()); + normalBorderWidthComBox.setSelectedLineStyle(style.getBorderWidth()); + normalBorderColorBox.setSelectObject(style.getBorderColor()); + normalFontNameComboBox.setSelectedItem(style.getFontFamily()); + normalFontSizeComboBox.setSelectedItem(style.getFontSize()); + normalFontColorButton.setColor(style.getFontColor()); + normalFontItalicButton.setSelected(style.isFontItalic()); + normalFontBoldButton.setSelected(style.isFontBold()); + + selectedBackgroundColorBox.setSelectObject(style.getSelectedBackgroundColor()); + selectedOpacityDragBar.setValue(style.getSelectedOpacity()); + selectedOpacitySpinner.setValue(style.getSelectedOpacity()); + selectedBorderWidthComBox.setSelectedLineStyle(style.getSelectedBorderWidth()); + selectedBorderColorBox.setSelectObject(style.getSelectedBorderColor()); + selectedFontNameComboBox.setSelectedItem(style.getSelectedFontFamily()); + selectedFontSizeComboBox.setSelectedItem(style.getSelectedFontSize()); + selectedFontColorButton.setColor(style.getSelectedFontColor()); + selectedFontItalicButton.setSelected(style.isSelectedFontItalic()); + selectedFontBoldButton.setSelected(style.isSelectedFontBold()); + } + + @Override + public MobileBookMarkStyle updateBean() { + SidebarMobileBookMarkStyle style = new SidebarMobileBookMarkStyle(); + + style.setWidth((int) buttonWidthSpinner.getValue()); + style.setHeight((int) buttonHeightSpinner.getValue()); + style.setGap((int) buttonGapSpinner.getValue()); + style.setBorderRadius((int) buttonBorderRadiusSpinner.getValue()); + + if (normalBackgroundColorBox.getSelectObject() != null) { + style.setBackgroundColor(normalBackgroundColorBox.getSelectObject()); + } + style.setOpacity((int) normalOpacitySpinner.getValue()); + style.setBorderWidth(normalBorderWidthComBox.getSelectedLineStyle()); + style.setBorderColor(normalBorderColorBox.getSelectObject()); + if (normalFontNameComboBox.getSelectedItem() != null) { + style.setFontFamily((String) normalFontNameComboBox.getSelectedItem()); + } + if (normalFontSizeComboBox.getSelectedItem() != null) { + style.setFontSize((Integer) normalFontSizeComboBox.getSelectedItem()); + } + style.setFontColor(normalFontColorButton.getColor()); + style.setFontItalic(normalFontItalicButton.isSelected()); + style.setFontBold(normalFontBoldButton.isSelected()); + + if (selectedBackgroundColorBox.getSelectObject() != null) { + style.setSelectedBackgroundColor(selectedBackgroundColorBox.getSelectObject()); + } + style.setSelectedOpacity((int) selectedOpacitySpinner.getValue()); + style.setSelectedBorderWidth(selectedBorderWidthComBox.getSelectedLineStyle()); + style.setSelectedBorderColor(selectedBorderColorBox.getSelectObject()); + if (selectedFontNameComboBox.getSelectedItem() != null) { + style.setSelectedFontFamily((String) selectedFontNameComboBox.getSelectedItem()); + } + if (selectedFontSizeComboBox.getSelectedItem() != null) { + style.setSelectedFontSize((Integer) selectedFontSizeComboBox.getSelectedItem()); + } + style.setSelectedFontColor(selectedFontColorButton.getColor()); + style.setSelectedFontItalic(selectedFontItalicButton.isSelected()); + style.setSelectedFontBold(selectedFontBoldButton.isSelected()); + + return style; + } + + @Override + protected String title4PopupWindow() { + return null; + } +} diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleProvider.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleProvider.java new file mode 100644 index 000000000..7c9202f3f --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleProvider.java @@ -0,0 +1,30 @@ +package com.fr.design.mainframe.mobile.ui; + +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.fun.impl.AbstractMobileBookMarkStyleProvider; +import com.fr.design.i18n.Toolkit; +import com.fr.form.ui.mobile.MobileBookMarkStyle; +import com.fr.form.ui.mobile.impl.SidebarMobileBookMarkStyle; + +/** + * @author Starryi + * @version 10.0 + * Created by Starryi on 2020/02/28 + */ +public class SidebarMobileBookMarkStyleProvider extends AbstractMobileBookMarkStyleProvider { + + @Override + public Class classForMobileBookMarkStyle() { + return SidebarMobileBookMarkStyle.class; + } + + @Override + public Class> classForMobileBookMarkStyleAppearance() { + return SidebarMobileBookMarkStyleCustomDefinePane.class; + } + + @Override + public String displayName() { + return Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar"); + } +} From 138114a6644091542708b044b3eeeaf8788bfd9b Mon Sep 17 00:00:00 2001 From: lucian Date: Wed, 4 Mar 2020 10:38:29 +0800 Subject: [PATCH 04/14] =?UTF-8?q?REPORT-25688=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5war=E5=8C=85=E9=83=A8=E7=BD=B2=E7=9A=84?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=EF=BC=8C=E8=BF=9E=E6=8E=A5=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E6=8F=90=E7=A4=BAwar=E5=8C=85=E9=83=A8?= =?UTF-8?q?=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/EnvChangeEntrance.java | 5 ++ .../com/fr/design/env/RemoteWorkspace.java | 10 +++- .../fr/design/env/RemoteWorkspaceTest.java | 54 +++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 designer-base/src/test/java/com/fr/design/env/RemoteWorkspaceTest.java diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index eca98c8be..3a0d66774 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -131,6 +131,11 @@ public class EnvChangeEntrance { } } }); + // REPORT-25688如果是war包部署的服务器,给与提示 + if (WorkContext.getCurrent().isWarDeploy()) { + FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Basic_War_Deploy_Tip"), + Toolkit.i18nText("Fine-Design_Basic_Message"), JOptionPane.INFORMATION_MESSAGE); + } //REPORT-13810如果只是添加了工作目录,没有切换,这里ToolArea也是要显示新建的工作目录 JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); if (template != null) { diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java index cc7b02c7b..735c1a5bd 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java @@ -2,6 +2,9 @@ package com.fr.design.env; import com.fr.cluster.engine.base.FineClusterConfig; import com.fr.design.i18n.Toolkit; +import com.fr.invoke.ReflectException; +import com.fr.log.FineLoggerFactory; +import com.fr.base.operator.common.CommonOperator; import com.fr.rpc.ExceptionHandler; import com.fr.stable.AssistUtils; import com.fr.workspace.WorkContext; @@ -49,7 +52,12 @@ public class RemoteWorkspace implements Workspace { @Override public boolean isWarDeploy() { - return false; + try { + return WorkContext.getCurrent().get(CommonOperator.class).isWarDeploy(); + } catch (ReflectException e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + return false; + } } @Override diff --git a/designer-base/src/test/java/com/fr/design/env/RemoteWorkspaceTest.java b/designer-base/src/test/java/com/fr/design/env/RemoteWorkspaceTest.java new file mode 100644 index 000000000..fe7f365e6 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/env/RemoteWorkspaceTest.java @@ -0,0 +1,54 @@ +package com.fr.design.env; + +import com.fr.base.operator.common.CommonOperator; +import com.fr.invoke.ReflectException; +import com.fr.workspace.WorkContext; +import com.fr.workspace.Workspace; +import com.fr.workspace.connect.WorkspaceConnectionInfo; +import org.easymock.EasyMock; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.powermock.api.easymock.PowerMock; +import org.powermock.core.classloader.annotations.PrepareForTest; +import org.powermock.modules.junit4.PowerMockRunner; + +/** + * @author Lucian.Chen + * @version 10.0 + * Created by Lucian.Chen on 2020/1/2 + */ +@RunWith(PowerMockRunner.class) +@PrepareForTest({WorkContext.class}) +public class RemoteWorkspaceTest { + @Test + public void testIsWarDeploy() { + + Workspace workspace = EasyMock.mock(Workspace.class); + PowerMock.mockStatic(WorkContext.class); + EasyMock.expect(WorkContext.getCurrent()).andReturn(workspace).anyTimes(); + + CommonOperator operator = EasyMock.createMock(CommonOperator.class); + EasyMock.expect(workspace.get(CommonOperator.class)).andReturn(operator).anyTimes(); + + EasyMock.expect(operator.isWarDeploy()).andReturn(true).once(); + EasyMock.expect(operator.isWarDeploy()).andReturn(false).once(); + EasyMock.expect(operator.isWarDeploy()).andThrow(new ReflectException()).once(); + + EasyMock.replay(workspace, operator); + PowerMock.replayAll(); + + WorkspaceConnectionInfo info = new WorkspaceConnectionInfo("url", "username", "password", "certPath", "certSecretKey"); + + RemoteWorkspace remoteWorkspace= new RemoteWorkspace(null, info); + + Assert.assertTrue(remoteWorkspace.isWarDeploy()); + Assert.assertFalse(remoteWorkspace.isWarDeploy()); + Assert.assertFalse(remoteWorkspace.isWarDeploy()); + + EasyMock.verify(workspace, operator); + PowerMock.verifyAll(); + + + } +} \ No newline at end of file From 801c6b801545167010101808dd269199f9c4b0a0 Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Wed, 4 Mar 2020 11:57:59 +0800 Subject: [PATCH 05/14] =?UTF-8?q?REPORT-27411=20=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E4=B8=AD=E8=A2=AB=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=96=87=E6=9C=AC=E5=A4=B1=E5=8E=BB=E7=84=A6?= =?UTF-8?q?=E7=82=B9=E5=90=8E=E8=A2=AB=E6=A0=B7=E5=BC=8F=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E4=BA=86=EF=BC=88=E8=A2=AB=E9=80=89=E4=B8=AD=E6=97=B6=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=E6=98=BE=E7=A4=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/report/RichTextEditingPane.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java b/designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java index 0406abffb..39061a4b6 100644 --- a/designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java @@ -14,9 +14,14 @@ import com.fr.log.FineLoggerFactory; import com.fr.report.cell.cellattr.core.RichText; import com.fr.report.cell.cellattr.core.RichTextConverter; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; +import javax.swing.text.DefaultHighlighter; import javax.swing.text.Element; +import javax.swing.text.Highlighter; import javax.swing.text.StyledDocument; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -44,6 +49,7 @@ public class RichTextEditingPane extends UITextPane{ */ public RichTextEditingPane() { this.addMouseListener(doubleClickFormulaListener); + this.addFocusListener(focusListener); } /** @@ -195,4 +201,34 @@ public class RichTextEditingPane extends UITextPane{ } } }; + + private FocusListener focusListener = new FocusAdapter() { + /** + * 移除高亮,重新选中文本 + * @param e + */ + public void focusGained(FocusEvent e) { + RichTextEditingPane richTextPane = RichTextEditingPane.this; + richTextPane.getHighlighter().removeAllHighlights(); + richTextPane.select(richTextPane.getSelectionStart(), richTextPane.getSelectionEnd()); + } + + /** + * 失去焦点时,被选中的文本保持着被选中时的样式 + * @param e + */ + public void focusLost(FocusEvent e) { + RichTextEditingPane richTextPane = RichTextEditingPane.this; + int start = richTextPane.getSelectionStart(); + int end = richTextPane.getSelectionEnd(); + richTextPane.select(start, end); + Highlighter highlighter = richTextPane.getHighlighter(); + richTextPane.getHighlighter().removeAllHighlights(); + try { + highlighter.addHighlight(start, end, DefaultHighlighter.DefaultPainter); + } catch (BadLocationException exception) { + FineLoggerFactory.getLogger().error(exception.getMessage(), exception); + } + } + }; } \ No newline at end of file From d51e251b926dbd7d993a846c39c6d099d22583f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 4 Mar 2020 16:24:31 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=20CHART-11090=20=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chartx/component/MapAreaMatchPane.java | 2 +- .../chartx/component/MatchAreaTable.java | 4 +-- .../mainframe/chart/gui/ChartDataPane.java | 1 + .../chart/gui/data/TableDataPane.java | 5 +-- .../table/AbstractTableDataContentPane.java | 4 +++ .../designer/data/comp/DrillMapDataPane.java | 4 --- .../comp/EachLayerDataDefinitionPane.java | 3 -- .../type/VanChartDrillMapPlotPane.java | 24 -------------- .../designer/data/VanChartMapDataPane.java | 6 ---- .../VanAreaMapPlotTableDataContentPane.java | 3 ++ .../VanLineMapPlotTableDataContentPane.java | 31 +------------------ .../table/VanMapTableDataContentPane.java | 29 ++++++++++++----- .../VanPointMapPlotTableDataContentPane.java | 17 ++-------- .../designer/type/VanChartMapPlotPane.java | 17 ---------- 14 files changed, 37 insertions(+), 113 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java index f37a01c22..f2c4d7bd2 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java @@ -261,7 +261,7 @@ public class MapAreaMatchPane extends BasicBeanPane { private void populateMatchData(Object[] columnData) { Set geoAreas = matchAreaTable.getItems(); - Map resultMap = ChartGEOJSONHelper.matchArea(columnData, geoAreas, matchResultTable.getCustomResult()); + Map resultMap = ChartGEOJSONHelper.matchAreaList(columnData, geoAreas, matchResultTable.getCustomResult()); Object[][] data = new Object[resultMap.size()][2]; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java index e8f98f2a3..2d808e893 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java @@ -1,5 +1,6 @@ package com.fr.design.chartx.component; +import com.fr.base.Utils; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.general.GeneralUtils; @@ -80,8 +81,7 @@ public class MatchAreaTable extends JTable { return; } int index = areaNameIndex.get(areaName); - Map resultMap = ChartGEOJSONHelper.matchArea(new Object[]{areaName}, items); - String result = resultMap.get(areaName); + String result = ChartGEOJSONHelper.matchArea(Utils.objectToString(areaName), items); getColumnModel().getColumn(1).getCellEditor().stopCellEditing(); this.setValueAt(result, index, 1); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java index ad549c5af..aea7142b5 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java @@ -27,6 +27,7 @@ public class ChartDataPane extends AbstractChartAttrPane { public ChartDataPane(AttributeChangeListener listener) { super(); this.listener = listener; + this.addAttributeChangeListener(listener); } @Override diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java index f8092b859..886397774 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java @@ -15,7 +15,6 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.utils.gui.UIComponentUtils; -import com.fr.van.chart.map.designer.data.contentpane.table.VanMapTableDataContentPane; import javax.swing.BorderFactory; import java.awt.BorderLayout; @@ -128,9 +127,7 @@ public class TableDataPane extends FurtherBasicBeanPane{ } public void refreshLevel(int level){ - if(dataContentPane instanceof VanMapTableDataContentPane) { - ((VanMapTableDataContentPane) dataContentPane).setLevel(level); - } + dataContentPane.refreshLevel(level); } /** diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java index 1bfb9657c..710b2a421 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/AbstractTableDataContentPane.java @@ -139,4 +139,8 @@ public abstract class AbstractTableDataContentPane extends BasicBeanPane { dataDefinitionType.setSelectedIndex(MapDataPaneHelper.isFromBottomData(ob) ? 0 : 1); - MapMatchResult matchResult = ((VanChartMapPlot) ob.getSelectedChartProvider(Chart.class).getPlot()).getMatchResult(); ChartCollection bottomDataChartCollection = MapDataPaneHelper.getBottomDataDrillMapChartCollection(ob); - ((VanChartMapPlot)bottomDataChartCollection.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); bottomDataDefinitionPane.populateBean(bottomDataChartCollection, ChartGEOJSONHelper.BOTTOM_LEVEL); eachLayerDataDefinitionPane.populateBean(ob); diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java index 16d989829..37e7f823f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java @@ -11,7 +11,6 @@ import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.drillmap.DrillMapHelper; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.data.DrillMapDefinition; -import com.fr.plugin.chart.map.MapMatchResult; import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper; import com.fr.plugin.chart.type.MapType; import com.fr.van.chart.map.designer.data.MapDataPaneHelper; @@ -91,13 +90,11 @@ public class EachLayerDataDefinitionPane extends MultiTabPane { } private void populatePaneList(ChartCollection chartCollection) { - List matchResultList = ((VanChartDrillMapPlot) chartCollection.getSelectedChartProvider(Chart.class).getPlot()).getMatchResultList(); for (int i = 0, len = paneList.size(); i < len; i++) { BasicPane basicPane = paneList.get(i); MapType mapType = oldMapList.get(i); if (basicPane instanceof SingleLayerDataDefinitionPane) { ChartCollection clone = MapDataPaneHelper.getLayerChartCollection(chartCollection, i, mapType); - ((VanChartDrillMapPlot)clone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResultList(matchResultList); ((SingleLayerDataDefinitionPane) basicPane).populateBean(clone, i); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/type/VanChartDrillMapPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/type/VanChartDrillMapPlotPane.java index 993b27758..c4a803134 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/type/VanChartDrillMapPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/type/VanChartDrillMapPlotPane.java @@ -3,20 +3,17 @@ package com.fr.van.chart.drillmap.designer.type; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chartx.data.ChartDataDefinitionProvider; -import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.drillmap.DrillMapIndependentVanChart; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.data.DrillMapDefinition; -import com.fr.plugin.chart.map.MapMatchResult; import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.ZoomLevel; import com.fr.van.chart.map.designer.type.VanChartMapPlotPane; import com.fr.van.chart.map.designer.type.VanChartMapSourceChoosePane; import java.util.ArrayList; -import java.util.List; /** * Created by Mitisky on 16/6/20. @@ -52,27 +49,6 @@ public class VanChartDrillMapPlotPane extends VanChartMapPlotPane { return tools; } - /** - * 同一个钻取地图, 类型之间切换 - */ - @Override - protected void cloneOldPlot2New(Plot oldPlot, Plot newPlot) { - super.cloneOldPlot2New(oldPlot, newPlot); - - try { - List newMatchResultList = new ArrayList<>(); - List matchResultList = ((VanChartDrillMapPlot) oldPlot).getMatchResultList(); - if (matchResultList != null) { - for (MapMatchResult matchResult : matchResultList) { - newMatchResultList.add((MapMatchResult) matchResult.clone()); - } - } - ((VanChartDrillMapPlot) newPlot).setMatchResultList(newMatchResultList); - } catch (CloneNotSupportedException e) { - FineLoggerFactory.getLogger().error("Error in change plot"); - } - } - protected Chart[] getDefaultCharts() { return DrillMapIndependentVanChart.DrillMapVanCharts; } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java index e7a222bf9..87143268f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java @@ -65,26 +65,20 @@ public class VanChartMapDataPane extends ChartDataPane { switch (mapType) { case AREA: areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection); - ((VanChartMapPlot)areaClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); contentsPane.populate(areaClone); break; case POINT: pointClone = MapDataPaneHelper.getPointMapChartCollection(collection); - ((VanChartMapPlot)pointClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); contentsPane.populate(pointClone); break; case LINE: lineClone = MapDataPaneHelper.getLineMapChartCollection(collection); - ((VanChartMapPlot)lineClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); contentsPane.populate(lineClone); break; case CUSTOM: areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection); pointClone = MapDataPaneHelper.getPointMapChartCollection(collection); lineClone = MapDataPaneHelper.getLineMapChartCollection(collection); - ((VanChartMapPlot)areaClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); - ((VanChartMapPlot)pointClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); - ((VanChartMapPlot)lineClone.getSelectedChartProvider(Chart.class).getPlot()).setMatchResult(matchResult); ((CustomMapChartDataContentsPane) contentsPane).populateAreaMap(areaClone); ((CustomMapChartDataContentsPane) contentsPane).populatePointMap(pointClone); ((CustomMapChartDataContentsPane) contentsPane).populateLineMap(lineClone); diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java index 86bc0c6d0..bd7e9e45a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java @@ -31,6 +31,7 @@ public class VanAreaMapPlotTableDataContentPane extends VanMapTableDataContentPa protected SeriesTypeUseComboxPaneWithOutFilter seriesTypeUseComboxPane; public VanAreaMapPlotTableDataContentPane(ChartDataPane parent) { + super(parent); this.setLayout(new BorderLayout(0, 4)); initAreaNameCom(); @@ -139,6 +140,7 @@ public class VanAreaMapPlotTableDataContentPane extends VanMapTableDataContentPa TopDefinitionProvider topDefinitionProvider = collection.getSelectedChart().getFilterDefinition(); if (topDefinitionProvider instanceof VanMapTableDefinitionProvider) { VanMapTableDefinitionProvider mapTableDefinitionProvider = (VanMapTableDefinitionProvider) topDefinitionProvider; + mapTableDefinitionProvider.setMatchResult(this.getMatchResult()); updateDefinition(mapTableDefinitionProvider); } } @@ -156,6 +158,7 @@ public class VanAreaMapPlotTableDataContentPane extends VanMapTableDataContentPa TopDefinitionProvider topDefinitionProvider = collection.getSelectedChart().getFilterDefinition(); if (topDefinitionProvider instanceof VanMapTableDefinitionProvider) { VanMapTableDefinitionProvider mapTableDefinitionProvider = (VanMapTableDefinitionProvider) topDefinitionProvider; + this.setMatchResult(mapTableDefinitionProvider.getMatchResult()); populateDefinition(mapTableDefinitionProvider); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java index dd50492f2..141b2eb2e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanLineMapPlotTableDataContentPane.java @@ -7,7 +7,6 @@ import com.fr.van.chart.map.designer.data.component.table.AbstractLongLatAreaPan import com.fr.van.chart.map.designer.data.component.table.AreaPane; import com.fr.van.chart.map.designer.data.component.table.LineMapAreaPane; import com.fr.van.chart.map.designer.data.component.table.LineMapLongLatAreaPane; -import com.fr.van.chart.map.designer.data.component.table.LongLatAreaPane; import java.awt.Component; @@ -48,34 +47,6 @@ public class VanLineMapPlotTableDataContentPane extends VanPointMapPlotTableData } protected AbstractLongLatAreaPane createLongLatAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) { - return new LineMapLongLatAreaPane(longLatAreaTableComboPane){ - @Override - protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { - areaPane = new LongLatAreaPane(parentPane) { - @Override - protected Component[][] getComponent () { - return new Component[][]{ - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Longitude")), longitudeCom}, - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Latitude")), latitudeCom}, - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), VanLineMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} - }; - } - }; - } - - @Override - protected void initEndAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { - endAreaPane = new LongLatAreaPane(parentPane){ - @Override - protected Component[][] getComponent () { - return new Component[][]{ - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Longitude")), longitudeCom}, - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Latitude")), latitudeCom}, - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")), VanLineMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} - }; - } - }; - } - }; + return new LineMapLongLatAreaPane(longLatAreaTableComboPane); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java index a8cae03c9..d73b0b590 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java @@ -8,6 +8,7 @@ import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.plugin.chart.map.MapMatchResult; import com.fr.plugin.chart.map.VanChartMapPlot; @@ -29,27 +30,36 @@ import java.awt.event.ActionListener; */ public abstract class VanMapTableDataContentPane extends AbstractTableDataContentPane { + private ChartDataPane parent; + private VanChartMapPlot plot; //钻取地图有层级,默认-1代表无层级关系 private int level = ChartGEOJSONHelper.DEFAULT_LEVEL; - public int getLevel() { - return level; + private MapMatchResult matchResult = new MapMatchResult(); + + + public VanMapTableDataContentPane(ChartDataPane parent){ + this.parent = parent; } public void setLevel(int level) { this.level = level; } - public VanChartMapPlot getPlot() { - return plot; - } - public void setPlot(VanChartMapPlot plot) { this.plot = plot; } + public MapMatchResult getMatchResult() { + return matchResult; + } + + public void setMatchResult(MapMatchResult matchResult) { + this.matchResult = matchResult; + } + public JPanel createAreaPanel(final UIComboBox areaBox) { JPanel areaPanel = new JPanel(new BorderLayout(4, 0)); areaBox.setPreferredSize(new Dimension(70, 20)); @@ -66,7 +76,6 @@ public abstract class VanMapTableDataContentPane extends AbstractTableDataConten final MapAreaMatchPane pane = new MapAreaMatchPane(treeNodeAndItems); String nameTable = getTableName(); - final MapMatchResult matchResult = plot.getMatchResult(level); pane.populateBean(matchResult, nameTable, Utils.objectToString(areaBox.getSelectedItem())); BasicDialog dialog = pane.showWindow(new JFrame()); @@ -74,6 +83,7 @@ public abstract class VanMapTableDataContentPane extends AbstractTableDataConten @Override public void doOk() { pane.updateBean(matchResult); + parent.attributeChanged(); } @Override @@ -87,4 +97,9 @@ public abstract class VanMapTableDataContentPane extends AbstractTableDataConten areaPanel.add(uiButton, BorderLayout.EAST); return areaPanel; } + + @Override + public void refreshLevel(int level) { + this.setLevel(level); + } } \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java index cbb418b8d..2e25e1bc2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java @@ -10,7 +10,6 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.van.chart.map.designer.data.component.table.AbstractLongLatAreaPane; import com.fr.van.chart.map.designer.data.component.table.AreaPane; -import com.fr.van.chart.map.designer.data.component.table.LongLatAreaPane; import com.fr.van.chart.map.designer.data.component.table.PointMapAreaPane; import com.fr.van.chart.map.designer.data.component.table.PointMapLongLatAreaPane; @@ -222,7 +221,7 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData areaPane = new AreaPane(parentPane) { protected Component[][] getComponent () { return new Component[][]{ - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name")), VanPointMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} + new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name")), VanPointMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} }; } }; @@ -231,19 +230,7 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData } protected AbstractLongLatAreaPane createLongLatAreaPane(LongLatAreaTableComboPane longLatAreaTableComboPane) { - return new PointMapLongLatAreaPane(longLatAreaTableComboPane) { - protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { - areaPane = new LongLatAreaPane(parentPane) { - protected Component[][] getComponent () { - return new Component[][]{ - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Longitude")), longitudeCom}, - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Latitude")), latitudeCom}, - new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name")), VanPointMapPlotTableDataContentPane.this.createAreaPanel(areaNameCom)} - }; - } - }; - } - }; + return new PointMapLongLatAreaPane(longLatAreaTableComboPane); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java index b9cdaad46..004ac81b3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java @@ -10,7 +10,6 @@ import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.map.MapIndependentVanChart; -import com.fr.plugin.chart.map.MapMatchResult; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.data.VanMapDefinition; import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; @@ -90,22 +89,6 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane { } } } - - /** - * 同一个地图, 类型之间切换 - */ - @Override - protected void cloneOldPlot2New(Plot oldPlot, Plot newPlot) { - super.cloneOldPlot2New(oldPlot, newPlot); - try { - if (((VanChartMapPlot) oldPlot).getMatchResult() != null) { - ((VanChartMapPlot) newPlot).setMatchResult((MapMatchResult) ((VanChartMapPlot) oldPlot).getMatchResult().clone()); - } - } catch (CloneNotSupportedException e) { - FineLoggerFactory.getLogger().error("Error in change plot"); - } - } - /** * 不同地图类型的超链不需要复制 * From 8012b0afc4fa19a21dce1a108c23da03f1a998ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 4 Mar 2020 16:29:08 +0800 Subject: [PATCH 07/14] CHART-11090 --- .../designer/data/VanChartMapDataPane.java | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java index 87143268f..a6fdd49ce 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/VanChartMapDataPane.java @@ -1,12 +1,9 @@ package com.fr.van.chart.map.designer.data; -import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; -import com.fr.plugin.chart.map.MapMatchResult; -import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.data.VanMapDefinition; import com.fr.plugin.chart.type.MapType; @@ -57,31 +54,26 @@ public class VanChartMapDataPane extends ChartDataPane { repeatLayout(collection); - MapMatchResult matchResult = ((VanChartMapPlot) collection.getSelectedChartProvider(Chart.class).getPlot()).getMatchResult(); - - ChartCollection areaClone; - ChartCollection pointClone; - ChartCollection lineClone; switch (mapType) { case AREA: - areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection); + ChartCollection areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection); contentsPane.populate(areaClone); break; case POINT: - pointClone = MapDataPaneHelper.getPointMapChartCollection(collection); + ChartCollection pointClone = MapDataPaneHelper.getPointMapChartCollection(collection); contentsPane.populate(pointClone); break; case LINE: - lineClone = MapDataPaneHelper.getLineMapChartCollection(collection); + ChartCollection lineClone = MapDataPaneHelper.getLineMapChartCollection(collection); contentsPane.populate(lineClone); break; case CUSTOM: - areaClone = MapDataPaneHelper.getAreaMapChartCollection(collection); - pointClone = MapDataPaneHelper.getPointMapChartCollection(collection); - lineClone = MapDataPaneHelper.getLineMapChartCollection(collection); - ((CustomMapChartDataContentsPane) contentsPane).populateAreaMap(areaClone); - ((CustomMapChartDataContentsPane) contentsPane).populatePointMap(pointClone); - ((CustomMapChartDataContentsPane) contentsPane).populateLineMap(lineClone); + ChartCollection areaClone1 = MapDataPaneHelper.getAreaMapChartCollection(collection); + ChartCollection pointClone1 = MapDataPaneHelper.getPointMapChartCollection(collection); + ChartCollection lineClone1 = MapDataPaneHelper.getLineMapChartCollection(collection); + ((CustomMapChartDataContentsPane) contentsPane).populateAreaMap(areaClone1); + ((CustomMapChartDataContentsPane) contentsPane).populatePointMap(pointClone1); + ((CustomMapChartDataContentsPane) contentsPane).populateLineMap(lineClone1); } } From 072977d0e5288cd5a67f124cbda8b77b1108ca6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 4 Mar 2020 17:48:20 +0800 Subject: [PATCH 08/14] =?UTF-8?q?CHART-11090=20=E4=BB=A3=E7=A0=81=E8=B4=A8?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/chartx/component/MatchAreaTable.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java index 2d808e893..4dc6ad024 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchAreaTable.java @@ -1,6 +1,5 @@ package com.fr.design.chartx.component; -import com.fr.base.Utils; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.general.GeneralUtils; @@ -81,7 +80,7 @@ public class MatchAreaTable extends JTable { return; } int index = areaNameIndex.get(areaName); - String result = ChartGEOJSONHelper.matchArea(Utils.objectToString(areaName), items); + String result = ChartGEOJSONHelper.matchArea(GeneralUtils.objectToString(areaName), items); getColumnModel().getColumn(1).getCellEditor().stopCellEditing(); this.setValueAt(result, index, 1); } From fdab3f9d81e5e0d3a89977605ea660122dc063de Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 4 Mar 2020 18:46:30 +0800 Subject: [PATCH 09/14] REPORT-27510 && REPORT-27462 --- .../src/main/java/com/fr/start/DesignerLauncher.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java b/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java index fa1cd969f..8be938717 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java @@ -3,6 +3,7 @@ package com.fr.start; import com.fr.process.FineProcess; import com.fr.process.engine.FineJavaProcessFactory; import com.fr.process.engine.core.FineProcessContext; +import com.fr.stable.StableUtils; /** * @author hades @@ -32,6 +33,7 @@ public class DesignerLauncher { inheritJvmSettings(). jvmSettings(DesignerJavaRuntime.getInstance().getJvmOptions()). arguments(args). + directory(StableUtils.getInstallHome()). startProcess(DesignerProcessType.INSTANCE); DesignerSuperListener.getInstance().start(); } From 122fec07dce4e66d1befeac1c04f48c67ced12f9 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 5 Mar 2020 09:45:29 +0800 Subject: [PATCH 10/14] =?UTF-8?q?fix=20=E8=B0=83=E6=95=B4=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/DesignerLauncher.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java b/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java index 8be938717..0777d699f 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java @@ -5,6 +5,8 @@ import com.fr.process.engine.FineJavaProcessFactory; import com.fr.process.engine.core.FineProcessContext; import com.fr.stable.StableUtils; +import java.io.File; + /** * @author hades * @version 10.0 @@ -12,6 +14,9 @@ import com.fr.stable.StableUtils; */ public class DesignerLauncher { + private static final String BIN_HOME = ".".equals(StableUtils.getInstallHome()) ? + "." : StableUtils.getInstallHome() + File.separator + "bin"; + private static final DesignerLauncher INSTANCE = new DesignerLauncher(); private String[] args; @@ -33,7 +38,7 @@ public class DesignerLauncher { inheritJvmSettings(). jvmSettings(DesignerJavaRuntime.getInstance().getJvmOptions()). arguments(args). - directory(StableUtils.getInstallHome()). + directory(BIN_HOME). startProcess(DesignerProcessType.INSTANCE); DesignerSuperListener.getInstance().start(); } From bec9f421edb454ad286ea1596464ccb3cbfe069b Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 5 Mar 2020 09:57:48 +0800 Subject: [PATCH 11/14] =?UTF-8?q?fix=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/DesignerLauncher.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java b/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java index 0777d699f..d0633ac6a 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerLauncher.java @@ -14,8 +14,9 @@ import java.io.File; */ public class DesignerLauncher { - private static final String BIN_HOME = ".".equals(StableUtils.getInstallHome()) ? - "." : StableUtils.getInstallHome() + File.separator + "bin"; + private static final String BIN = "bin"; + private static final String DOT ="."; + private static final String BIN_HOME = generateBinHome(); private static final DesignerLauncher INSTANCE = new DesignerLauncher(); @@ -25,6 +26,11 @@ public class DesignerLauncher { } + private static String generateBinHome() { + return DOT.equals(StableUtils.getInstallHome()) ? + DOT : StableUtils.getInstallHome() + File.separator + BIN; + } + public static DesignerLauncher getInstance() { return INSTANCE; } From cd6655a4b827289f1cbd5f17cbd15129e7362a74 Mon Sep 17 00:00:00 2001 From: lucian Date: Thu, 5 Mar 2020 10:44:32 +0800 Subject: [PATCH 12/14] =?UTF-8?q?REPORT-27473=20Linux=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=97=A0=E6=B3=95=E5=90=AF=E7=94=A8=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/PreferencePane.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 207bdf36d..3fc03f438 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -38,6 +38,7 @@ import com.fr.general.log.Log4jConfig; import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.stable.Constants; +import com.fr.stable.os.OperatingSystem; import com.fr.third.apache.log4j.Level; import com.fr.transaction.Configurations; import com.fr.transaction.Worker; @@ -218,10 +219,12 @@ public class PreferencePane extends BasicPane { oracleSpace = new UICheckBox(i18nText("Fine-Design_Basic_Show_All_Oracle_Tables")); oraclePane.add(oracleSpace); - JPanel upmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Update_Plugin_Manager")); - useOptimizedUPMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_New_Update_Plugin_Manager")); - upmSelectorPane.add(useOptimizedUPMCheckbox); - advancePane.add(upmSelectorPane); + if (!OperatingSystem.isLinux()) { + JPanel upmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Update_Plugin_Manager")); + useOptimizedUPMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_New_Update_Plugin_Manager")); + upmSelectorPane.add(useOptimizedUPMCheckbox); + advancePane.add(upmSelectorPane); + } JPanel dbmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Database_Manager")); useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager")); @@ -711,7 +714,9 @@ public class PreferencePane extends BasicPane { this.portEditor.setValue(new Integer(designerEnvManager.getEmbedServerPort())); - useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM()); + if (useOptimizedUPMCheckbox != null) { + useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM()); + } useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM()); @@ -832,7 +837,9 @@ public class PreferencePane extends BasicPane { Configurations.update(new Worker() { @Override public void run() { - ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected()); + if (useOptimizedUPMCheckbox != null) { + ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected()); + } ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected()); } From 8062954213369c301214555e39e1b26e049a93fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Thu, 5 Mar 2020 11:31:27 +0800 Subject: [PATCH 13/14] =?UTF-8?q?CHART-11090=20=E8=B0=83=E6=95=B4=E4=BA=86?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/chartx/component/MapAreaMatchPane.java | 2 +- .../java/com/fr/design/chartx/component/MatchResultTable.java | 2 +- .../com/fr/design/chartx/data/drillMap/DrillMapLayerPane.java | 2 +- .../com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java | 2 +- .../chart/drillmap/designer/data/comp/DrillMapLayerPane.java | 2 +- .../data/contentpane/table/VanMapTableDataContentPane.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java index f2c4d7bd2..750abf97c 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java @@ -24,7 +24,7 @@ import com.fr.design.parameter.ParameterInputPane; import com.fr.general.GeneralUtils; import com.fr.general.data.DataModel; import com.fr.general.data.TableDataException; -import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.data.MapMatchResult; import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import com.fr.script.Calculator; import com.fr.stable.ArrayUtils; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchResultTable.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchResultTable.java index 55287f00a..8a85c84a4 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MatchResultTable.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MatchResultTable.java @@ -5,7 +5,7 @@ import com.fr.base.Utils; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.i18n.Toolkit; import com.fr.general.ComparatorUtils; -import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.data.MapMatchResult; import com.fr.stable.StringUtils; import javax.swing.AbstractCellEditor; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapLayerPane.java b/designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapLayerPane.java index 975faffca..1102f7a64 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapLayerPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/data/drillMap/DrillMapLayerPane.java @@ -8,7 +8,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; -import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.data.MapMatchResult; import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper; import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.ZoomLevel; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java index bec4e78b7..e445a07ef 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java @@ -9,7 +9,7 @@ import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; -import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.data.MapMatchResult; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import com.fr.plugin.chart.vanchart.VanChart; diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java index a01aed4cd..0c6fcc1e4 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapLayerPane.java @@ -9,7 +9,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.drillmap.DrillMapHelper; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; -import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.data.MapMatchResult; import com.fr.plugin.chart.map.server.CompatibleGeoJSONTreeHelper; import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.type.ZoomLevel; diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java index d73b0b590..f39c69aeb 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java @@ -10,7 +10,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; -import com.fr.plugin.chart.map.MapMatchResult; +import com.fr.plugin.chart.map.data.MapMatchResult; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; From 6e8a9aff02949d82ec35009706bdbb3bf418a71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Thu, 5 Mar 2020 15:21:36 +0800 Subject: [PATCH 14/14] =?UTF-8?q?CHART-11090=20=E5=8E=BB=E6=8E=89=E4=BA=86?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E7=9A=84=E7=9B=91=E5=90=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/chart/gui/ChartDataPane.java | 1 - .../table/VanAreaMapPlotTableDataContentPane.java | 1 - .../contentpane/table/VanMapTableDataContentPane.java | 11 +---------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java index aea7142b5..ad549c5af 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartDataPane.java @@ -27,7 +27,6 @@ public class ChartDataPane extends AbstractChartAttrPane { public ChartDataPane(AttributeChangeListener listener) { super(); this.listener = listener; - this.addAttributeChangeListener(listener); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java index bd7e9e45a..26bdf911c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java @@ -31,7 +31,6 @@ public class VanAreaMapPlotTableDataContentPane extends VanMapTableDataContentPa protected SeriesTypeUseComboxPaneWithOutFilter seriesTypeUseComboxPane; public VanAreaMapPlotTableDataContentPane(ChartDataPane parent) { - super(parent); this.setLayout(new BorderLayout(0, 4)); initAreaNameCom(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java index f39c69aeb..5b66ff308 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java @@ -8,10 +8,9 @@ import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; -import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; -import com.fr.plugin.chart.map.data.MapMatchResult; import com.fr.plugin.chart.map.VanChartMapPlot; +import com.fr.plugin.chart.map.data.MapMatchResult; import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import javax.swing.JFrame; @@ -30,8 +29,6 @@ import java.awt.event.ActionListener; */ public abstract class VanMapTableDataContentPane extends AbstractTableDataContentPane { - private ChartDataPane parent; - private VanChartMapPlot plot; //钻取地图有层级,默认-1代表无层级关系 @@ -39,11 +36,6 @@ public abstract class VanMapTableDataContentPane extends AbstractTableDataConten private MapMatchResult matchResult = new MapMatchResult(); - - public VanMapTableDataContentPane(ChartDataPane parent){ - this.parent = parent; - } - public void setLevel(int level) { this.level = level; } @@ -83,7 +75,6 @@ public abstract class VanMapTableDataContentPane extends AbstractTableDataConten @Override public void doOk() { pane.updateBean(matchResult); - parent.attributeChanged(); } @Override