From 15d034ed3dc21e0479a4049a173b336c8e80340d Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 29 Aug 2017 14:03:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9format=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tFormatPane.java => FormatPaneWithNormalType.java} | 11 +++++++++-- .../component/format/FormatPaneWithOutFont.java | 1 + .../style/datasheet/VanChartDataSheetPane.java | 5 ++--- 3 files changed, 12 insertions(+), 5 deletions(-) rename designer_chart/src/com/fr/plugin/chart/designer/component/format/{DataSheetFormatPane.java => FormatPaneWithNormalType.java} (80%) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithNormalType.java similarity index 80% rename from designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithNormalType.java index 8cdf810db..a5caec453 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithNormalType.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.designer.component.format; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.style.FormatPane; import com.fr.design.layout.TableLayout; import com.fr.general.Inter; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; @@ -12,8 +11,16 @@ import java.awt.*; /** * Created by mengao on 2017/8/14. + * 没有字体设置 + * 类型下拉框中只有常规、数字、百分比、货币、科学计数选项,没有时间型、日期型、文本型选项。 */ -public class DataSheetFormatPane extends FormatPane { +public class FormatPaneWithNormalType extends FormatPaneWithOutFont { + + public FormatPaneWithNormalType() { + super(); + setForDataSheet(); + } + protected Component[][] getComponent(JPanel fontPane, JPanel centerPane, JPanel typePane) { return new Component[][]{ new Component[]{null, centerPane}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java index cd4ff91fe..5403ae817 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java @@ -9,6 +9,7 @@ import java.awt.*; /** * Created by mengao on 2017/8/28. + * 只有文本格式设置,没有字体设置 */ public class FormatPaneWithOutFont extends FormatPane { private static final int HEIGHT = 30; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java index d4869e636..0c94ed82e 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/datasheet/VanChartDataSheetPane.java @@ -20,7 +20,7 @@ import com.fr.plugin.chart.base.VanChartConstants; import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.border.VanChartBorderPane; -import com.fr.plugin.chart.designer.component.format.DataSheetFormatPane; +import com.fr.plugin.chart.designer.component.format.FormatPaneWithNormalType; import com.fr.plugin.chart.type.AxisType; import javax.swing.*; @@ -85,8 +85,7 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane { private JPanel createDataSheetPane(){ textAttrPane = new ChartTextAttrPane(); - formatPane = new DataSheetFormatPane(); - formatPane.setForDataSheet(); + formatPane = new FormatPaneWithNormalType(); borderPane = new VanChartBorderPane(); double p = TableLayout.PREFERRED; From 60214f7d7576bff63d08c78c5ac410441a81e0fb Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 29 Aug 2017 21:51:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?9.0=E6=96=B0=E5=9B=BE=E8=A1=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=94=B9=E3=80=82=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9B=BE=E3=80=81=E7=83=AD=E5=8A=9B?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=AD=89=E5=9B=BE=E8=A1=A8=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/VanChartPlotLegendPane.java | 2 +- .../designer/style/VanChartTitlePane.java | 6 ++-- .../style/axis/VanChartBaseAxisPane.java | 2 +- .../chart/gauge/VanChartGaugeSeriesPane.java | 9 +++--- .../style/VanChartHeatMapSeriesPane.java | 19 ++++++++++--- .../chart/map/VanChartMapSeriesPane.java | 2 +- .../data/component/report/AreaPane.java | 8 ++++-- .../component/report/LineMapAreaPane.java | 27 +++++++++++++----- .../report/LineMapLongLatAreaPane.java | 24 ++++++++++++++-- .../component/report/LongLatAreaPane.java | 12 +++++--- .../data/component/table/AreaPane.java | 8 ++++-- .../data/component/table/LineMapAreaPane.java | 28 +++++++++++++------ .../table/LineMapLongLatAreaPane.java | 24 ++++++++++++++-- .../data/component/table/LongLatAreaPane.java | 14 ++++++---- .../component/table/PointMapAreaPane.java | 3 +- .../VanPointMapPlotReportDataContentPane.java | 3 +- .../type/VanChartMapSourceChoosePane.java | 9 +++--- .../component/GradualIntervalConfigPane.java | 11 ++++---- 18 files changed, 153 insertions(+), 58 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartPlotLegendPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartPlotLegendPane.java index a7be4fbef..899598338 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartPlotLegendPane.java @@ -116,7 +116,7 @@ public class VanChartPlotLegendPane extends BasicPane { new Component[]{createTitleStylePane(),null} , new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),borderPane),null}, new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane),null}, - new Component[]{TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), createDisplayStrategy()),null} + new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), createDisplayStrategy()),null} }; return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartTitlePane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartTitlePane.java index 7a2f3be8a..e7ebc7bd7 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartTitlePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartTitlePane.java @@ -106,9 +106,9 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - double[] columnSize = {p, f}; - double[] column = {f,e}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {p, f}; + double[] column = {f, e}; double[] rowSize = {p,p,p,p,p,p,p,p}; Component[][] components = new Component[][]{ new Component[]{createTitleContentPane(new double[]{p,p,p},column),null}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java index b6001487b..2030f48e9 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java @@ -249,7 +249,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { protected JPanel createDisplayStrategy(double[] row, double[] col){ maxProportion = new UISpinner(0,100,1,30); - axisLimitSize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_LimitAreaSize"),Inter.getLocText("Plugin-ChartF_NotLimitAreaSize")}); + axisLimitSize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Limit"),Inter.getLocText("Plugin-ChartF_NotLimit")}); JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),axisLimitSize); maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion); diff --git a/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java index 1a2f708c7..4ba982d57 100644 --- a/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugeSeriesPane.java @@ -53,12 +53,13 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { protected JPanel getContentInPlotType() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double[] columnSize = {f}; double[] rowSize = {p,p,p,p,p,p}; Component[][] components = new Component[][]{ new Component[]{getColorPane()}, new Component[]{createGaugeLayoutPane()}, - new Component[]{createGaugeStylePane(rowSize, new double[]{p,f})}, + new Component[]{createGaugeStylePane(rowSize, new double[]{f,e})}, new Component[]{createGaugeBandsPane()} }; @@ -109,7 +110,8 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { JPanel centerPanel = TableLayoutHelper.createTableLayoutPane(getDiffComponentsWithGaugeStyle(), row, col); panel.add(centerPanel, BorderLayout.CENTER); if(rotate != null){ - panel.add(rotate, BorderLayout.NORTH); + JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Rotation_Direction"), rotate); + panel.add(panel1, BorderLayout.NORTH); } return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); } @@ -192,8 +194,7 @@ public class VanChartGaugeSeriesPane extends VanChartAbstractPlotSeriesPane { private JPanel createGaugeBandsPane() { colorPickerPane = new ColorPickerPaneWithFormula("meterString"); - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane("",colorPickerPane); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Range"), panel); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Range"), colorPickerPane); } diff --git a/designer_chart/src/com/fr/plugin/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java index 4d0e31a2d..98ae660af 100644 --- a/designer_chart/src/com/fr/plugin/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/heatmap/designer/style/VanChartHeatMapSeriesPane.java @@ -43,6 +43,12 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane{ return null; } + //设置色彩面板内容 + protected void setColorPaneContent (JPanel panel) { + panel.add(createNullValueColorPane(), BorderLayout.NORTH); + panel.add(createAlphaPane(), BorderLayout.CENTER); + } + /** * 在每个不同类型Plot, 得到不同类型的属性. 比如: 柱形的风格, 折线的线型曲线. */ @@ -97,10 +103,12 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] row = {p, p}; - double[] col = {p, f, p}; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; + double[] row = {p, p, p}; + double[] col = {d, f, p}; Component[][] components = new Component[][]{ + new Component[]{null, null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Heat_Map_Radius")), radius, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Heat_Map_Blur")), blur, new UILabel("%")} }; @@ -117,10 +125,13 @@ public class VanChartHeatMapSeriesPane extends VanChartMapSeriesPane{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] row = {p, p}; - double[] col = {p, f}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] row = {p, p, p}; + double[] col = {f, e}; Component[][] components = new Component[][]{ + new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Min")), minOpacity}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Max")), maxOpacity} }; diff --git a/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java index 38e9eb39a..29a34a3ac 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java @@ -185,7 +185,7 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { return TableLayoutHelper.createTableLayoutPane(components, row, col); } - private JPanel createNullValueColorPane() { + protected JPanel createNullValueColorPane() { nullValueColorBox = new ColorSelectBox(80); return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_NULL_Value_Color"), nullValueColorBox); diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java index f7714b4e4..bb9f68398 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java @@ -30,10 +30,14 @@ public class AreaPane extends AbstractReportDataContentPane { double f = TableLayout.FILL; double[] columnSize = {p, f}; double[] rowSize = {p}; - Component[][] components = new Component[][]{ + Component[][] components = getComponent (); + return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + } + + protected Component[][] getComponent () { + return new Component[][]{ new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaName} }; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java index 43f09c6f0..7efba98ef 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java @@ -1,7 +1,7 @@ package com.fr.plugin.chart.map.designer.data.component.report; +import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.general.Inter; -import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.map.data.VanMapReportDefinition; import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea; @@ -12,24 +12,37 @@ import java.awt.*; * Created by hufan on 2016/12/22. */ public class LineMapAreaPane extends PointMapAreaPane { - private static final int LEFT_GAP = 15; private static final int V_GAP = 10; protected AreaPane endAreaPane; protected JPanel createContentPane() { initAreaPane(); initEndAreaPane(); - JPanel panel1 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point"), areaPane, LEFT_GAP); - JPanel panel2 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point"), endAreaPane, LEFT_GAP); JPanel content = new JPanel(new BorderLayout(0, V_GAP)); - content.add(panel1, BorderLayout.NORTH); - content.add(panel2, BorderLayout.CENTER); + content.add(areaPane, BorderLayout.NORTH); + content.add(endAreaPane, BorderLayout.CENTER); return content; } protected void initEndAreaPane() { - endAreaPane = new AreaPane(); + endAreaPane = new AreaPane(){ + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_End", "FR-Chart-Area_Name"})), areaName} + }; + } + }; + } + @Override + protected void initAreaPane() { + areaPane =new AreaPane(){ + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_Start", "FR-Chart-Area_Name"})), areaName} + }; + } + }; } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapLongLatAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapLongLatAreaPane.java index 7e7269feb..4397f1618 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapLongLatAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapLongLatAreaPane.java @@ -1,6 +1,10 @@ package com.fr.plugin.chart.map.designer.data.component.report; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.general.Inter; + +import java.awt.*; /** * Created by hufan on 2016/12/22. @@ -8,10 +12,26 @@ package com.fr.plugin.chart.map.designer.data.component.report; public class LineMapLongLatAreaPane extends LineMapAreaPane { protected void initEndAreaPane() { - endAreaPane = new LongLatAreaPane(); + endAreaPane = new LongLatAreaPane(){ + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_End", "Plugin-ChartF_Longitude"})), longitude}, + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_End", "Plugin-ChartF_Latitude"})), latitude}, + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_End", "FR-Chart-Area_Name"})), areaName} + }; + } + }; } protected void initAreaPane() { - areaPane = new LongLatAreaPane(); + areaPane = new LongLatAreaPane(){ + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_Start", "Plugin-ChartF_Longitude"})), longitude}, + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_Start", "Plugin-ChartF_Latitude"})), latitude}, + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_Start", "FR-Chart-Area_Name"})), areaName} + }; + } + }; } } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java index 40191317d..dac5fc301 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java @@ -15,8 +15,8 @@ import java.awt.*; * Created by hufan on 2016/12/21. */ public class LongLatAreaPane extends AreaPane { - private TinyFormulaPane longitude; - private TinyFormulaPane latitude; + protected TinyFormulaPane longitude; + protected TinyFormulaPane latitude; public LongLatAreaPane() { JPanel panel = createContentPane(); @@ -33,12 +33,16 @@ public class LongLatAreaPane extends AreaPane { double f = TableLayout.FILL; double[] columnSize = {p, f}; double[] rowSize = {p, p, p}; - Component[][] components = new Component[][]{ + Component[][] components = getComponent(); + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); + } + + protected Component[][] getComponent () { + return new Component[][]{ new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude}, new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaName} }; - return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java index 96557be51..0ef1b3553 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java @@ -45,10 +45,14 @@ public class AreaPane extends AbstractTableDataContentPane { double f = TableLayout.FILL; double[] columnSize = {p, f}; double[] rowSize = {p}; - Component[][] components = new Component[][]{ + Component[][] components = getComponent(); + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); + } + + protected Component[][] getComponent () { + return new Component[][]{ new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaNameCom} }; - return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); } protected void initAreaNameCom() { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java index d28defd39..79d06042a 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java @@ -1,7 +1,7 @@ package com.fr.plugin.chart.map.designer.data.component.table; +import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.general.Inter; -import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea; import com.fr.plugin.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane; @@ -14,7 +14,6 @@ import java.util.List; * Created by hufan on 2016/12/21. */ public class LineMapAreaPane extends PointMapAreaPane { - private static final int LEFT_GAP = 15; private static final int V_GAP = 10; protected AreaPane endAreaPane; public LineMapAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { @@ -25,17 +24,30 @@ public class LineMapAreaPane extends PointMapAreaPane { initAreaPane(parentPane); initEndAreaPane(parentPane); - JPanel startPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point"), areaPane, LEFT_GAP); - JPanel endPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point"), endAreaPane, LEFT_GAP); - JPanel content = new JPanel(new BorderLayout(0, V_GAP)); - content.add(startPane, BorderLayout.NORTH); - content.add(endPane, BorderLayout.CENTER); + content.add(areaPane, BorderLayout.NORTH); + content.add(endAreaPane, BorderLayout.CENTER); return content; } + protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { + areaPane = new AreaPane(parentPane){ + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_Start", "FR-Chart-Area_Name"})), areaNameCom} + }; + } + }; + } + protected void initEndAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { - endAreaPane = new AreaPane(parentPane); + endAreaPane = new AreaPane(parentPane){ + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_End", "FR-Chart-Area_Name"})), areaNameCom} + }; + } + }; } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapLongLatAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapLongLatAreaPane.java index 74768aa63..04e1161b2 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapLongLatAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapLongLatAreaPane.java @@ -1,8 +1,12 @@ package com.fr.plugin.chart.map.designer.data.component.table; +import com.fr.design.gui.ilable.BoldFontTextLabel; +import com.fr.general.Inter; import com.fr.plugin.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane; +import java.awt.*; + /** * Created by hufan on 2016/12/21. */ @@ -13,10 +17,26 @@ public class LineMapLongLatAreaPane extends LineMapAreaPane { } protected void initEndAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { - endAreaPane = new LongLatAreaPane(parentPane); + endAreaPane = new LongLatAreaPane(parentPane){ + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_End", "Plugin-ChartF_Longitude"})), longitudeCom}, + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_End", "Plugin-ChartF_Latitude"})), latitudeCom}, + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_End", "FR-Chart-Area_Name"})), areaNameCom} + }; + } + }; } protected void initAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { - areaPane = new LongLatAreaPane(parentPane); + areaPane = new LongLatAreaPane(parentPane){ + protected Component[][] getComponent () { + return new Component[][]{ + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_Start", "Plugin-ChartF_Longitude"})), longitudeCom}, + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_Start", "Plugin-ChartF_Latitude"})), latitudeCom}, + new Component[]{new BoldFontTextLabel(Inter.getLocText(new String[]{"Plugin-ChartF_Start", "FR-Chart-Area_Name"})), areaNameCom} + }; + } + }; } } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java index 23b0dc773..4f07c5287 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java @@ -18,8 +18,8 @@ import java.util.List; * Created by hufan on 2016/12/21. */ public class LongLatAreaPane extends AreaPane { - private UIComboBox longitudeCom; - private UIComboBox latitudeCom; + protected UIComboBox longitudeCom; + protected UIComboBox latitudeCom; public LongLatAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) { super(parentPane); @@ -35,13 +35,17 @@ public class LongLatAreaPane extends AreaPane { double f = TableLayout.FILL; double[] columnSize = {p, f}; double[] rowSize = {p, p, p}; - Component[][] components = new Component[][]{ + Component[][] components = getComponent(); + + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); + } + + protected Component[][] getComponent () { + return new Component[][]{ new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitudeCom}, new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitudeCom}, new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaNameCom} }; - - return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); } public void refreshBoxListWithSelectTableData(List list) { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/PointMapAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/PointMapAreaPane.java index 8dc828dd5..95603c74a 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/PointMapAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/PointMapAreaPane.java @@ -1,6 +1,7 @@ package com.fr.plugin.chart.map.designer.data.component.table; -import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea; + import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; +import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea; import com.fr.plugin.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane; import javax.swing.*; diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java index fa91c3407..0f4f2b71f 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java @@ -76,7 +76,6 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa locationType = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Location_With_AreaName"), Inter.getLocText("Plugin-ChartF_Location_With_LongAndLat")}); - locationType.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { @@ -99,7 +98,7 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Geographic")),locationType}, }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,30,6); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6); this.add(panel, BorderLayout.NORTH); diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java index 2092a30f0..6b15607c6 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -131,10 +131,10 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { public VanChartMapSourceChoosePane() { this.setLayout(new BorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(10,0,0,0)); + this.setBorder(BorderFactory.createEmptyBorder(10,5,0,0)); double p = TableLayout.PREFERRED; - double[] columnSize = {246}; + double[] columnSize = {230}; double[] rowSize = {p,p,p,p,p,p,p,p}; JPanel panel = new JPanel(new BorderLayout()); @@ -214,8 +214,9 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; - double[] rowSize = {p,p}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; + double[] rowSize = {p, p}; Component[][] components = new Component[][]{ new Component[]{null,null}, new Component[]{sourceTitleLabel,sourceComboBox}, diff --git a/designer_chart/src/com/fr/plugin/chart/range/component/GradualIntervalConfigPane.java b/designer_chart/src/com/fr/plugin/chart/range/component/GradualIntervalConfigPane.java index d6951fd24..a851c2c9a 100644 --- a/designer_chart/src/com/fr/plugin/chart/range/component/GradualIntervalConfigPane.java +++ b/designer_chart/src/com/fr/plugin/chart/range/component/GradualIntervalConfigPane.java @@ -3,9 +3,9 @@ package com.fr.plugin.chart.range.component; import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.style.axis.component.MinMaxValuePaneWithOutTick; import com.fr.plugin.chart.range.GradualIntervalConfig; @@ -53,13 +53,14 @@ public class GradualIntervalConfigPane extends JPanel{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] col = new double[]{p,f}; - double[] row = new double[]{p,p,p,p}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] col = new double[]{f, e}; + double[] row = new double[]{p, p, p, p}; Component[][] components = getPaneComponents(); //控件承载面板 - JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components,row,col); + JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,col); this.setLayout(new BorderLayout()); this.add(contentPane,BorderLayout.CENTER); } @@ -77,7 +78,7 @@ public class GradualIntervalConfigPane extends JPanel{ return new Component[][]{ new Component[]{minMaxValuePane, null}, new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Value_Divided_stage")), numberDragPane}, - new Component[]{legendGradientBar, null}, + new Component[]{null, legendGradientBar}, }; }