From 10aa38662171ea86d8d134bdb49df1951d792112 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 14 Aug 2017 10:26:29 +0800 Subject: [PATCH 1/9] =?UTF-8?q?9.0=E6=96=B0=E5=9B=BE=E8=A1=A8=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E8=B0=83=E6=95=B4=EF=BC=9A=201=E3=80=81=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=9A=E6=A0=87=E7=AD=BE=E9=9D=A2=E6=9D=BF=202?= =?UTF-8?q?=E3=80=81=E6=A0=B7=E5=BC=8F=EF=BC=9A=E6=8F=90=E7=A4=BA=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=203=E3=80=81=E6=A0=B7=E5=BC=8F=EF=BC=9A=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/FormatPane.java | 19 +++-- .../component/VanChartTooltipContentPane.java | 34 +++++++-- .../component/format/DataSheetFormatPane.java | 37 ++++++++++ .../label/LabelContentPane4Gauge.java | 36 ++++++++++ .../label/LabelContentPaneWithCate.java | 7 +- .../label/LabelContentPaneWithCateValue.java | 7 +- .../label/LabelContentPaneWithOutCate.java | 7 +- .../label/LabelContentPaneWithPercent.java | 7 +- .../TooltipContentPaneWithOutSeries.java | 6 -- .../datasheet/VanChartDataSheetPane.java | 25 +++---- ...hartGaugeCateOrPercentLabelDetailPane.java | 4 +- .../label/VanChartGaugeLabelDetailPane.java | 40 +++++++++++ .../label/VanChartGaugePlotLabelPane.java | 7 +- .../VanChartGaugeValueLabelDetailPane.java | 8 +-- .../style/label/VanChartLabelPane.java | 4 +- .../label/VanChartPlotLabelDetailPane.java | 70 +++++++++++-------- .../style/label/VanChartPlotLabelPane.java | 4 +- .../VanChartPlotRefreshTooltipPane.java | 7 +- .../tooltip/VanChartPlotTooltipPane.java | 51 +++++++++----- .../style/tooltip/VanChartTooltipPane.java | 6 +- 20 files changed, 263 insertions(+), 123 deletions(-) create mode 100644 designer_chart/src/com/fr/plugin/chart/designer/component/format/DataSheetFormatPane.java create mode 100644 designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPane4Gauge.java create mode 100644 designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java diff --git a/designer_base/src/com/fr/design/gui/style/FormatPane.java b/designer_base/src/com/fr/design/gui/style/FormatPane.java index 4c4d86424f..7785c0e336 100644 --- a/designer_base/src/com/fr/design/gui/style/FormatPane.java +++ b/designer_base/src/com/fr/design/gui/style/FormatPane.java @@ -104,18 +104,21 @@ public class FormatPane extends AbstractBasicStylePane { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - Component[][] components = new Component[][]{ + double[] rowSize = {p, p, p, p, p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 3}, {1, 1}}; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(getComponent(fontPane, centerPane, frFontPane), rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM); + this.add(panel, BorderLayout.CENTER); + } + + protected Component[][] getComponent (JPanel fontPane, JPanel centerPane, FRFontPane frFontPane) { + return new Component[][]{ new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("FR-Base_Format") + " ", SwingConstants.LEFT), typeComboBox}, new Component[]{null, centerPane}, new Component[]{fontPane, frFontPane}, new Component[]{null, null} }; - double[] rowSize = {p, p, p, p, p}; - double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 3}, {1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM); - this.add(panel, BorderLayout.CENTER); } protected UIComboBoxRenderer createComBoxRender() { @@ -375,6 +378,10 @@ public class FormatPane extends AbstractBasicStylePane { }; typeComboBox.setRenderer(render); typeComboBox.addItemListener(itemListener); + setTypeComboBoxPane(typeComboBox); + } + + protected void setTypeComboBoxPane (UIComboBox typeComboBox) { this.add(typeComboBox, BorderLayout.NORTH); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java index d36cc405d0..fc3ebd9a15 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java @@ -2,12 +2,18 @@ package com.fr.plugin.chart.designer.component; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; -import com.fr.plugin.chart.designer.component.format.*; +import com.fr.plugin.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; +import com.fr.plugin.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox; +import com.fr.plugin.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox; +import com.fr.plugin.chart.designer.component.format.PercentFormatPaneWithCheckBox; +import com.fr.plugin.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; +import com.fr.plugin.chart.designer.component.format.ValueFormatPaneWithCheckBox; import com.fr.plugin.chart.designer.style.VanChartStylePane; import javax.swing.*; @@ -38,6 +44,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane { +public class VanChartDataSheetPane extends AbstractVanChartScrollPane { private static final long serialVersionUID = 5547658195141361981L; private UICheckBox isShowDataSheet; @@ -73,7 +74,6 @@ public class VanChartDataSheetPane extends BasicScrollPane { Component[][] components = new Component[][]{ new Component[]{isShowDataSheet}, - new Component[]{new JSeparator()}, new Component[]{dataSheetPane} }; return components; @@ -85,23 +85,18 @@ public class VanChartDataSheetPane extends BasicScrollPane { private JPanel createDataSheetPane(){ textAttrPane = new ChartTextAttrPane(); - formatPane = new FormatPane(); + formatPane = new DataSheetFormatPane(); formatPane.setForDataSheet(); borderPane = new VanChartBorderPane(); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {LayoutConstants.CHART_ATTR_TOMARGIN, f}; - double[] rowSize = {p,p,p,p,p,p,p,p}; + double[] rowSize = {p,p,p}; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Style")),null}, - new Component[]{null,textAttrPane}, - new Component[]{new JSeparator(),null}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DataType")),null}, - new Component[]{null,formatPane}, - new Component[]{new JSeparator(),null}, - new Component[]{borderPane,null}, - new Component[]{new JSeparator(),null}, + new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Base_Format"),formatPane),null}, + new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"),textAttrPane),null}, + new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),borderPane),null}, }; return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java index 844afc8f38..ee586c91f0 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java @@ -5,8 +5,8 @@ import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithCate; import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithPercent; import com.fr.plugin.chart.designer.style.VanChartStylePane; -import com.fr.plugin.chart.type.GaugeStyle; import com.fr.plugin.chart.gauge.VanChartGaugePlot; +import com.fr.plugin.chart.type.GaugeStyle; import javax.swing.*; import java.awt.*; @@ -14,7 +14,7 @@ import java.awt.*; /** * 仪表盘的分类(多指针时)或者百分比标签 */ -public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartPlotLabelDetailPane { +public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabelDetailPane { private static final long serialVersionUID = 5176535960949074945L; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java new file mode 100644 index 0000000000..c83ad98e5a --- /dev/null +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java @@ -0,0 +1,40 @@ +package com.fr.plugin.chart.designer.style.label; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; +import com.fr.plugin.chart.designer.style.VanChartStylePane; + +import javax.swing.*; +import java.awt.*; + +/** + * Created by mengao on 2017/8/13. + */ +public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane { + + public VanChartGaugeLabelDetailPane(Plot plot, VanChartStylePane parent) { + super(plot, parent); + } + + protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) { + style = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"), + Inter.getLocText("Plugin-ChartF_Custom")}); + textFontPane = new ChartTextAttrPane(); + + initStyleListener(); + + return TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot),row,col); + } + + protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){ + return TableLayoutHelper.createTableLayoutPane(comps,row,col); + } + + protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) { + return TableLayout4VanChartHelper.createGapTableLayoutPane(title, panel); + } +} diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugePlotLabelPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugePlotLabelPane.java index d60ddac36c..7ac18e56bc 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugePlotLabelPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugePlotLabelPane.java @@ -5,8 +5,8 @@ import com.fr.general.Inter; import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.style.VanChartStylePane; -import com.fr.plugin.chart.type.GaugeStyle; import com.fr.plugin.chart.gauge.VanChartGaugePlot; +import com.fr.plugin.chart.type.GaugeStyle; import javax.swing.*; import java.awt.*; @@ -40,10 +40,9 @@ public class VanChartGaugePlotLabelPane extends VanChartPlotLabelPane { cateTitle = Inter.getLocText("Plugin-ChartF_PercentLabel"); break; } - JPanel cateOrPercentPane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(cateTitle, labelDetailPane); - JPanel valuePane = TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(valueTitle, gaugeValueLabelPane); + JPanel cateOrPercentPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(cateTitle, labelDetailPane); + JPanel valuePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(valueTitle, gaugeValueLabelPane); labelPane.add(cateOrPercentPane, BorderLayout.NORTH); - labelPane.add(new JSeparator(), BorderLayout.CENTER); labelPane.add(valuePane, BorderLayout.SOUTH); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java index 31a363071c..2dcb96dab2 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java @@ -5,8 +5,8 @@ import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithCateValue; import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithOutCate; import com.fr.plugin.chart.designer.style.VanChartStylePane; -import com.fr.plugin.chart.type.GaugeStyle; import com.fr.plugin.chart.gauge.VanChartGaugePlot; +import com.fr.plugin.chart.type.GaugeStyle; import javax.swing.*; import java.awt.*; @@ -14,7 +14,7 @@ import java.awt.*; /** * 仪表盘的值标签 */ -public class VanChartGaugeValueLabelDetailPane extends VanChartPlotLabelDetailPane { +public class VanChartGaugeValueLabelDetailPane extends VanChartGaugeLabelDetailPane { private static final long serialVersionUID = 2601073419430634281L; private GaugeStyle gaugeStyle; @@ -59,9 +59,7 @@ public class VanChartGaugeValueLabelDetailPane extends VanChartPlotLabelDetailPa private Component[][] getLabelPaneComponentsWithBackground(Plot plot, double p, double[] columnSize) { return new Component[][]{ new Component[]{dataLabelContentPane,null}, - new Component[]{new JSeparator(),null}, - new Component[]{createLabelStylePane(new double[]{p,p}, columnSize, plot),null}, - new Component[]{new JSeparator(),null}, + new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, new Component[]{createBackgroundColorPane(),null}, }; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartLabelPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartLabelPane.java index a1b016b960..aaeeadd920 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartLabelPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartLabelPane.java @@ -4,17 +4,17 @@ import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; -import com.fr.design.dialog.BasicScrollPane; import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.AttrLabel; +import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.style.VanChartStylePane; import javax.swing.*; import java.awt.*; -public class VanChartLabelPane extends BasicScrollPane { +public class VanChartLabelPane extends AbstractVanChartScrollPane { private VanChartPlotLabelPane labelPane; private Chart chart; protected VanChartStylePane parent; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java index a8c981ddef..41b0f5a76c 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -5,6 +5,7 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIToggleButton; +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.style.ChartTextAttrPane; @@ -34,7 +35,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { protected BasicBeanPane dataLabelContentPane; protected UIButtonGroup position; - protected UIToggleButton autoAdjust; + protected UIButtonGroup autoAdjust; protected UIToggleButton tractionLine; protected UIButtonGroup style; @@ -71,16 +72,13 @@ public class VanChartPlotLabelDetailPane extends BasicPane { if(hasLabelPosition(plot)){ return new Component[][]{ new Component[]{dataLabelContentPane,null}, - new Component[]{new JSeparator(),null}, - new Component[]{createLabelPositionPane(new double[]{p,p}, columnSize, plot),null}, - new Component[]{new JSeparator(),null}, - new Component[]{createLabelStylePane(new double[]{p,p}, columnSize, plot),null}, + new Component[]{createLabelPositionPane(new double[]{p,p,p}, columnSize, plot),null}, + new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, }; } else { return new Component[][]{ new Component[]{dataLabelContentPane,null}, - new Component[]{new JSeparator(),null}, - new Component[]{createLabelStylePane(new double[]{p,p}, columnSize, plot),null}, + new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, }; } } @@ -93,8 +91,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane { return plot instanceof VanChartLabelPositionPlot; } - protected JPanel createTableLayoutPaneWithTitle(String title, Component component) { - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(title, component); + protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) { + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel); } protected JPanel createLabelPositionPane(double[] row, double[] col, Plot plot) { @@ -110,33 +108,33 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } position = new UIButtonGroup(names, values); - autoAdjust = new UIToggleButton(Inter.getLocText("Plugin-ChartF_Auto_Adjust")); + autoAdjust = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false}); + + + Component[][] comps = new Component[3][2]; + + comps[0] = new Component[]{null,null}; + comps[1] = new Component[]{new UILabel(Inter.getLocText("Chart-Layout_Position"), SwingConstants.LEFT), position}; - Component[] comps; if(plot.isSupportLeadLine()){ tractionLine = new UIToggleButton(Inter.getLocText("ChartF-Show_GuidLine")); - comps = new Component[]{position, tractionLine}; + comps[2] = new Component[]{null,tractionLine}; initPositionListener(); } else if(PlotFactory.plotAutoAdjustLabelPosition(plot)){ - comps = new Component[]{position, autoAdjust}; - } else { - comps = new Component[]{position}; - } - - int len = comps.length; - Component[][] components = new Component[len][2]; - - for(int i = 0; i < len; i++){ - components[i] = new Component[]{comps[i], null}; + comps[2]= new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Auto_Adjust"), SwingConstants.LEFT),autoAdjust}; } - - JPanel panel = TableLayoutHelper.createTableLayoutPane(components,row,col); - return createTableLayoutPaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel); + return getLabelPositionPane(comps,row,col); } return new JPanel(); } + protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){ + JPanel panel = TableLayoutHelper.createTableLayoutPane(comps,row,col); + return createTableLayoutPaneWithTitle(Inter.getLocText("FR-Chart_Layout"), panel); + } + + protected void initPositionListener() { position.addChangeListener(new ChangeListener() { @Override @@ -149,7 +147,15 @@ public class VanChartPlotLabelDetailPane extends BasicPane { protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) { style = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"), Inter.getLocText("Plugin-ChartF_Custom")}); - textFontPane = new ChartTextAttrPane(); + textFontPane = new ChartTextAttrPane(){ + protected Component[][] getComponents(JPanel buttonPane) { + return new Component[][]{ + new Component[]{null, null}, + new Component[]{null, fontNameComboBox}, + new Component[]{null, buttonPane} + }; + } + }; initStyleListener(); @@ -158,13 +164,15 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } protected Component[][] getLabelStyleComponents(Plot plot) { + UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT); return new Component[][]{ - new Component[]{style,null}, + new Component[]{null,null}, + new Component[]{text,style}, new Component[]{textFontPane,null}, }; } - private void initStyleListener() { + protected void initStyleListener() { style.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -191,7 +199,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } private void checkStyleUse() { - textFontPane.setEnabled(style.getSelectedIndex() == 1); + textFontPane.setVisible(style.getSelectedIndex() == 1); } private void checkPosition() { @@ -211,7 +219,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { tractionLine.setSelected(detail.isShowGuidLine()); } if(autoAdjust != null){ - autoAdjust.setSelected(detail.isAutoAdjust()); + autoAdjust.setSelectedIndex(detail.isAutoAdjust() == true ? 0 : 1); } style.setSelectedIndex(detail.isCustom() ? 1 : 0); textFontPane.populate(detail.getTextAttr()); @@ -234,7 +242,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { position.setSelectedItem(detail.getPosition()); } - detail.setAutoAdjust(autoAdjust != null && autoAdjust.isSelected()); + detail.setAutoAdjust(autoAdjust != null && autoAdjust.getSelectedItem()); if(tractionLine != null){ detail.setShowGuidLine(tractionLine.isSelected() && detail.getPosition() == Constants.OUTSIDE); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelPane.java index a1959f0e5d..d7ff66fb09 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelPane.java @@ -6,7 +6,6 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; -import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.designer.PlotFactory; @@ -46,10 +45,9 @@ public class VanChartPlotLabelPane extends BasicPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {f}; - double[] rowSize = {p,p,p}; + double[] rowSize = {p,p}; Component[][] components = new Component[][]{ new Component[]{isLabelShow}, - new Component[]{new JSeparator()}, new Component[]{labelPane} }; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java index ed9418f940..17ad7b534f 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java @@ -57,13 +57,10 @@ public class VanChartPlotRefreshTooltipPane extends VanChartPlotTooltipNoCheckPa protected Component[][] createComponents(Plot plot) { Component[][] components = new Component[][]{ new Component[]{refreshTooltipContentPane,null}, - new Component[]{new JSeparator(),null}, new Component[]{initDurationPane(),null}, - new Component[]{new JSeparator(),null}, new Component[]{createLabelStylePane(),null}, - new Component[]{new JSeparator(),null}, - new Component[]{borderPane,null}, - new Component[]{backgroundPane,null} + new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Border"),borderPane),null}, + new Component[]{TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Background"), backgroundPane),null}, }; return components; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotTooltipPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotTooltipPane.java index 55f98e686c..b57b8340c8 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotTooltipPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotTooltipPane.java @@ -3,8 +3,8 @@ package com.fr.plugin.chart.designer.style.tooltip; import com.fr.chart.chartattr.Plot; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icheckbox.UICheckBox; +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.style.ChartTextAttrPane; @@ -36,7 +36,7 @@ public class VanChartPlotTooltipPane extends BasicPane { protected VanChartBackgroundWithOutImagePane backgroundPane; - protected UIToggleButton showAllSeries; + protected UICheckBox showAllSeries; protected UIButtonGroup followMouse; protected VanChartStylePane parent; @@ -55,10 +55,9 @@ public class VanChartPlotTooltipPane extends BasicPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {f}; - double[] rowSize = {p,p,p}; + double[] rowSize = {p,p}; Component[][] components = new Component[][]{ new Component[]{isTooltipShow}, - new Component[]{new JSeparator()}, new Component[]{tooltipPane} }; @@ -92,11 +91,9 @@ public class VanChartPlotTooltipPane extends BasicPane { protected Component[][] createComponents(Plot plot) { Component[][] components = new Component[][]{ new Component[]{tooltipContentPane,null}, - new Component[]{new JSeparator(),null}, new Component[]{createLabelStylePane(),null}, - new Component[]{new JSeparator(),null}, - new Component[]{borderPane,null}, - new Component[]{backgroundPane,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[]{createDisplayStrategy(plot),null}, }; return components; @@ -109,21 +106,30 @@ public class VanChartPlotTooltipPane extends BasicPane { protected JPanel createLabelStylePane() { style = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),Inter.getLocText("Plugin-ChartF_Custom")}); - textFontPane = new ChartTextAttrPane(); - + textFontPane = new ChartTextAttrPane() { + protected Component[][] getComponents(JPanel buttonPane) { + return new Component[][]{ + new Component[]{null, null}, + new Component[]{null, fontNameComboBox}, + new Component[]{null, buttonPane} + }; + } + }; + UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = {p,p}; + double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ - new Component[]{style,null}, - new Component[]{textFontPane,null}, + new Component[]{null, null}, + new Component[]{text, style}, + new Component[]{null, textFontPane}, }; initStyleListener(); JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); } @@ -137,15 +143,22 @@ public class VanChartPlotTooltipPane extends BasicPane { } protected JPanel createDisplayStrategy(Plot plot) { - showAllSeries = new UIToggleButton(getShowAllSeriesLabelText()); + showAllSeries = new UICheckBox(getShowAllSeriesLabelText()); followMouse = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_FollowMouse"), Inter.getLocText("Plugin-ChartF_NotFollowMouse")}); - JPanel panel = new JPanel(new BorderLayout(0,4)); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = { p,f }; + double[] rowSize = { p,p,p}; + Component[][] components = new Component[3][2]; + components[0] = new Component[]{null,null}; + components[1] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Prompt_Box")),followMouse}; + if(plot.isSupportTooltipSeriesType() && hasTooltipSeriesType()){ - panel.add(showAllSeries, BorderLayout.NORTH); + components[2] = new Component[]{showAllSeries,null}; } - panel.add(followMouse,BorderLayout.SOUTH); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_DisplayStrategy"), panel); } protected String getShowAllSeriesLabelText() { diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java index 5d0cd3b77c..f332efbb47 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java @@ -4,17 +4,17 @@ import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; -import com.fr.design.dialog.BasicScrollPane; import com.fr.general.Inter; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.AttrTooltip; +import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.style.VanChartStylePane; import javax.swing.*; import java.awt.*; -public class VanChartTooltipPane extends BasicScrollPane { +public class VanChartTooltipPane extends AbstractVanChartScrollPane { private static final long serialVersionUID = -2974722365840564105L; private VanChartPlotTooltipPane tooltipPane; private Chart chart; @@ -70,7 +70,7 @@ public class VanChartTooltipPane extends BasicScrollPane { } @Override - protected String title4PopupWindow() { + public String title4PopupWindow() { return Inter.getLocText("Plugin-Chart_Tooltip"); } From 32b5dcab69a6abcefa1bb8fd2188d73082477768 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 14 Aug 2017 11:49:07 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E5=92=8C=E5=9B=BE=E4=BE=8B=E7=9A=84=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=AD=96=E7=95=A5=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/VanChartPlotLegendPane.java | 20 +++++++---------- .../designer/style/VanChartTitlePane.java | 22 ++++++++----------- 2 files changed, 17 insertions(+), 25 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 3edee0a8a3..b9d1f95986 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 @@ -53,6 +53,7 @@ public class VanChartPlotLegendPane extends BasicPane { protected UIButtonGroup limitSize; protected UISpinner maxProportion; private UILabel limitSizeTitle; + private JPanel maxProportionPane; //高亮显示的按钮 @@ -228,17 +229,12 @@ public class VanChartPlotLegendPane extends BasicPane { limitSizeTitle = new UILabel(Inter.getLocText("Plugin-ChartF_MaxProportion")); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p,f}; - double[] rowSize = {p,p,p}; - Component[][] components = new Component[][]{ - new Component[]{null,null}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AreaSize"), SwingConstants.LEFT), limitSize}, - new Component[]{limitSizeTitle,maxProportion}, - - }; - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); + JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),limitSize); + maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion); + maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); + JPanel panel = new JPanel(new BorderLayout()); + panel.add(limitSizePane, BorderLayout.NORTH); + panel.add(maxProportionPane, BorderLayout.CENTER); limitSize.addActionListener(new ActionListener() { @Override @@ -278,7 +274,7 @@ public class VanChartPlotLegendPane extends BasicPane { //检查最大显示占比是否可用 private void checkMaxProPortionUse() { maxProportion.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled()); - limitSizeTitle.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled()); + maxProportionPane.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled()); } 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 299beeee82..f8947ad879 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 @@ -56,7 +56,7 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { private VanChartFloatPositionPane customFloatPositionPane; private UIButtonGroup limitSize; private UISpinner maxProportion; - private UILabel limitSizeTitle; + private JPanel maxProportionPane; protected VanChartStylePane parent; @@ -163,17 +163,13 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { private JPanel createDisplayStrategy(){ maxProportion = new UISpinner(0,100,1,30); limitSize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Limit"),Inter.getLocText("Plugin-ChartF_NotLimit")}); - limitSizeTitle = new UILabel(Inter.getLocText("Plugin-ChartF_MaxProportion")); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p,f}; - double[] rowSize = {p,p,p}; - Component[][] components = new Component[][]{ - new Component[]{null,null}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_AreaSize"), SwingConstants.LEFT), limitSize}, - new Component[]{limitSizeTitle,maxProportion}, - }; - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); + + JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_AreaSize"),limitSize); + maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_MaxProportion"),maxProportion); + maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); + JPanel panel = new JPanel(new BorderLayout()); + panel.add(limitSizePane, BorderLayout.NORTH); + panel.add(maxProportionPane, BorderLayout.CENTER); limitSize.addActionListener(new ActionListener() { @Override @@ -251,7 +247,7 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { //检查最大显示占比是否可用 private void checkMaxProPortionUse() { maxProportion.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled()); - limitSizeTitle.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled()); + maxProportionPane.setVisible(limitSize.getSelectedIndex() == 0 && limitSize.isEnabled()); } /** From 8557c0820c726b34420eb5ed653f9d012d64f3a5 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 14 Aug 2017 12:03:47 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9FormatPane=204=20vanchart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/format/DataSheetFormatPane.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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/DataSheetFormatPane.java index 62d9149484..599c05fc30 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/DataSheetFormatPane.java @@ -26,12 +26,15 @@ public class DataSheetFormatPane extends FormatPane { double p = TableLayout.PREFERRED; double[] rowSize = {p, p}; double[] columnSize = {p, f}; - Component[][] components = new Component[][]{ + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getTypeComboBoxComponent(typeComboBox), rowSize, columnSize); + this.add(panel, BorderLayout.NORTH); + } + + protected Component[][] getTypeComboBoxComponent (UIComboBox typeComboBox) { + return new Component[][]{ new Component[]{null, null}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DataType") + " ", SwingConstants.LEFT), typeComboBox}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DataType"), SwingConstants.LEFT), typeComboBox}, }; - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); - this.add(panel, BorderLayout.NORTH); } } From 5436c6a9973376a80c974f7744e459cd44938443 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 14 Aug 2017 12:40:56 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B1=BB=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{DataSheetFormatPane.java => FormatPane4VanChart.java} | 2 +- .../chart/designer/style/datasheet/VanChartDataSheetPane.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename designer_chart/src/com/fr/plugin/chart/designer/component/format/{DataSheetFormatPane.java => FormatPane4VanChart.java} (96%) 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/FormatPane4VanChart.java similarity index 96% 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/FormatPane4VanChart.java index 599c05fc30..c882c93272 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/FormatPane4VanChart.java @@ -14,7 +14,7 @@ import java.awt.*; /** * Created by mengao on 2017/8/14. */ -public class DataSheetFormatPane extends FormatPane { +public class FormatPane4VanChart extends FormatPane { protected Component[][] getComponent(JPanel fontPane, JPanel centerPane, FRFontPane frFontPane) { return new Component[][]{ new Component[]{null, centerPane}, 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 d4869e6362..292c54c375 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.FormatPane4VanChart; import com.fr.plugin.chart.type.AxisType; import javax.swing.*; @@ -85,7 +85,7 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane { private JPanel createDataSheetPane(){ textAttrPane = new ChartTextAttrPane(); - formatPane = new DataSheetFormatPane(); + formatPane = new FormatPane4VanChart(); formatPane.setForDataSheet(); borderPane = new VanChartBorderPane(); From ec0ec2a2f7c20424945def8a9f312ec361770fb1 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 14 Aug 2017 14:03:22 +0800 Subject: [PATCH 5/9] =?UTF-8?q?9.0=E6=96=B0=E5=9B=BE=E8=A1=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=9D=A2=E6=9D=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4VanChart.java => VanChartFormatPane.java} | 2 +- .../label/GaugeLabelContentPane.java | 25 +++++++++++++ .../label/LabelContentPane4Gauge.java | 36 ------------------- ...lContentPaneWithCateLabelContentPane.java} | 4 +-- ...entPaneWithCateValueLabelContentPane.java} | 4 +-- ...ntentPaneWithOutCateLabelContentPane.java} | 4 +-- ...ntentPaneWithPercentLabelContentPane.java} | 4 +-- .../datasheet/VanChartDataSheetPane.java | 4 +-- 8 files changed, 36 insertions(+), 47 deletions(-) rename designer_chart/src/com/fr/plugin/chart/designer/component/format/{FormatPane4VanChart.java => VanChartFormatPane.java} (96%) create mode 100644 designer_chart/src/com/fr/plugin/chart/designer/component/label/GaugeLabelContentPane.java delete mode 100644 designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPane4Gauge.java rename designer_chart/src/com/fr/plugin/chart/designer/component/label/{LabelContentPaneWithCate.java => LabelContentPaneWithCateLabelContentPane.java} (81%) rename designer_chart/src/com/fr/plugin/chart/designer/component/label/{LabelContentPaneWithCateValue.java => LabelContentPaneWithCateValueLabelContentPane.java} (81%) rename designer_chart/src/com/fr/plugin/chart/designer/component/label/{LabelContentPaneWithOutCate.java => LabelContentPaneWithOutCateLabelContentPane.java} (83%) rename designer_chart/src/com/fr/plugin/chart/designer/component/label/{LabelContentPaneWithPercent.java => LabelContentPaneWithPercentLabelContentPane.java} (81%) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPane4VanChart.java b/designer_chart/src/com/fr/plugin/chart/designer/component/format/VanChartFormatPane.java similarity index 96% rename from designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPane4VanChart.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/format/VanChartFormatPane.java index c882c93272..907d3f9234 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPane4VanChart.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/format/VanChartFormatPane.java @@ -14,7 +14,7 @@ import java.awt.*; /** * Created by mengao on 2017/8/14. */ -public class FormatPane4VanChart extends FormatPane { +public class VanChartFormatPane extends FormatPane { protected Component[][] getComponent(JPanel fontPane, JPanel centerPane, FRFontPane frFontPane) { return new Component[][]{ new Component[]{null, centerPane}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/GaugeLabelContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/GaugeLabelContentPane.java new file mode 100644 index 0000000000..89c329344c --- /dev/null +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/GaugeLabelContentPane.java @@ -0,0 +1,25 @@ +package com.fr.plugin.chart.designer.component.label; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; +import com.fr.plugin.chart.designer.component.VanChartLabelContentPane; +import com.fr.plugin.chart.designer.style.VanChartStylePane; + +import javax.swing.*; +import java.awt.*; + +/** + * Created by mengao on 2017/8/13. + */ +public class GaugeLabelContentPane extends VanChartLabelContentPane { + + public GaugeLabelContentPane(VanChartStylePane parent, JPanel showOnPane) { + super(parent, showOnPane); + } + + protected JPanel getContentPane(Component[][] components, double[] column, double[] row, UILabel text) { + text.setText(Inter.getLocText("Plugin-ChartF_Content")); + return TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, column); + } +} diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPane4Gauge.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPane4Gauge.java deleted file mode 100644 index d8070662b4..0000000000 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPane4Gauge.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.fr.plugin.chart.designer.component.label; - -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.layout.TableLayout; -import com.fr.general.Inter; -import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; -import com.fr.plugin.chart.designer.component.VanChartLabelContentPane; -import com.fr.plugin.chart.designer.style.VanChartStylePane; - -import javax.swing.*; -import java.awt.*; - -/** - * Created by mengao on 2017/8/13. - */ -public class LabelContentPane4Gauge extends VanChartLabelContentPane { - - public LabelContentPane4Gauge(VanChartStylePane parent, JPanel showOnPane) { - super(parent, showOnPane); - } - - protected JPanel getContentPane (){ - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] column = {p, f}; - double[] row = {p,p,p}; - Component[][] components = new Component[][]{ - new Component[]{null,null}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),content}, - new Component[]{null,getCenterPane()}, - - }; - - return TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,column); - } -} diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCate.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateLabelContentPane.java similarity index 81% rename from designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCate.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateLabelContentPane.java index 1215d2d545..23876de425 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCate.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateLabelContentPane.java @@ -9,11 +9,11 @@ import java.awt.*; /** * 只有分类(仪表盘的分类标签) */ -public class LabelContentPaneWithCate extends LabelContentPane4Gauge { +public class LabelContentPaneWithCateLabelContentPane extends GaugeLabelContentPane { private static final long serialVersionUID = 1238530475858471304L; - public LabelContentPaneWithCate(VanChartStylePane parent, JPanel showOnPane){ + public LabelContentPaneWithCateLabelContentPane(VanChartStylePane parent, JPanel showOnPane){ super(parent, showOnPane); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValue.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValueLabelContentPane.java similarity index 81% rename from designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValue.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValueLabelContentPane.java index 52fd88cb57..6a5330d1bb 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValue.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValueLabelContentPane.java @@ -9,11 +9,11 @@ import java.awt.*; /** * 分类和值(仪表盘的值标签) */ -public class LabelContentPaneWithCateValue extends LabelContentPane4Gauge { +public class LabelContentPaneWithCateValueLabelContentPane extends GaugeLabelContentPane { private static final long serialVersionUID = -8286902939543416431L; - public LabelContentPaneWithCateValue(VanChartStylePane parent, JPanel showOnPane){ + public LabelContentPaneWithCateValueLabelContentPane(VanChartStylePane parent, JPanel showOnPane){ super(parent, showOnPane); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCate.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCateLabelContentPane.java similarity index 83% rename from designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCate.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCateLabelContentPane.java index 4ff03067ee..a9ecad2add 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCate.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCateLabelContentPane.java @@ -9,11 +9,11 @@ import java.awt.*; /** * 系列、值、值所占比例。(仪表盘的值标签) */ -public class LabelContentPaneWithOutCate extends LabelContentPane4Gauge { +public class LabelContentPaneWithOutCateLabelContentPane extends GaugeLabelContentPane { private static final long serialVersionUID = 1198062632979554467L; - public LabelContentPaneWithOutCate(VanChartStylePane parent, JPanel showOnPane){ + public LabelContentPaneWithOutCateLabelContentPane(VanChartStylePane parent, JPanel showOnPane){ super(parent, showOnPane); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercent.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercentLabelContentPane.java similarity index 81% rename from designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercent.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercentLabelContentPane.java index a766e99024..cc968b8cf4 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercent.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercentLabelContentPane.java @@ -9,10 +9,10 @@ import java.awt.*; /** * 只有百分比(仪表盘的百分比标签) */ -public class LabelContentPaneWithPercent extends LabelContentPane4Gauge { +public class LabelContentPaneWithPercentLabelContentPane extends GaugeLabelContentPane { private static final long serialVersionUID = -3739217668948747606L; - public LabelContentPaneWithPercent(VanChartStylePane parent, JPanel showOnPane){ + public LabelContentPaneWithPercentLabelContentPane(VanChartStylePane parent, JPanel showOnPane){ super(parent, showOnPane); } 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 292c54c375..94ee1871c4 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.FormatPane4VanChart; +import com.fr.plugin.chart.designer.component.format.VanChartFormatPane; import com.fr.plugin.chart.type.AxisType; import javax.swing.*; @@ -85,7 +85,7 @@ public class VanChartDataSheetPane extends AbstractVanChartScrollPane { private JPanel createDataSheetPane(){ textAttrPane = new ChartTextAttrPane(); - formatPane = new FormatPane4VanChart(); + formatPane = new VanChartFormatPane(); formatPane.setForDataSheet(); borderPane = new VanChartBorderPane(); From 7f43db8c35235d4fe1a4e09a05d48d5bcde4a7a5 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 14 Aug 2017 14:40:21 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E7=B1=BB?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ateLabelContentPane.java => LabelContentPaneWithCate.java} | 4 ++-- ...belContentPane.java => LabelContentPaneWithCateValue.java} | 4 ++-- ...LabelContentPane.java => LabelContentPaneWithOutCate.java} | 4 ++-- ...LabelContentPane.java => LabelContentPaneWithPercent.java} | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename designer_chart/src/com/fr/plugin/chart/designer/component/label/{LabelContentPaneWithCateLabelContentPane.java => LabelContentPaneWithCate.java} (81%) rename designer_chart/src/com/fr/plugin/chart/designer/component/label/{LabelContentPaneWithCateValueLabelContentPane.java => LabelContentPaneWithCateValue.java} (81%) rename designer_chart/src/com/fr/plugin/chart/designer/component/label/{LabelContentPaneWithOutCateLabelContentPane.java => LabelContentPaneWithOutCate.java} (83%) rename designer_chart/src/com/fr/plugin/chart/designer/component/label/{LabelContentPaneWithPercentLabelContentPane.java => LabelContentPaneWithPercent.java} (81%) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateLabelContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCate.java similarity index 81% rename from designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateLabelContentPane.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCate.java index 23876de425..fb0641d23a 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateLabelContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCate.java @@ -9,11 +9,11 @@ import java.awt.*; /** * 只有分类(仪表盘的分类标签) */ -public class LabelContentPaneWithCateLabelContentPane extends GaugeLabelContentPane { +public class LabelContentPaneWithCate extends GaugeLabelContentPane { private static final long serialVersionUID = 1238530475858471304L; - public LabelContentPaneWithCateLabelContentPane(VanChartStylePane parent, JPanel showOnPane){ + public LabelContentPaneWithCate(VanChartStylePane parent, JPanel showOnPane){ super(parent, showOnPane); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValueLabelContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValue.java similarity index 81% rename from designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValueLabelContentPane.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValue.java index 6a5330d1bb..82b3418ba8 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValueLabelContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithCateValue.java @@ -9,11 +9,11 @@ import java.awt.*; /** * 分类和值(仪表盘的值标签) */ -public class LabelContentPaneWithCateValueLabelContentPane extends GaugeLabelContentPane { +public class LabelContentPaneWithCateValue extends GaugeLabelContentPane { private static final long serialVersionUID = -8286902939543416431L; - public LabelContentPaneWithCateValueLabelContentPane(VanChartStylePane parent, JPanel showOnPane){ + public LabelContentPaneWithCateValue(VanChartStylePane parent, JPanel showOnPane){ super(parent, showOnPane); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCateLabelContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCate.java similarity index 83% rename from designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCateLabelContentPane.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCate.java index a9ecad2add..d53fcbf951 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCateLabelContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithOutCate.java @@ -9,11 +9,11 @@ import java.awt.*; /** * 系列、值、值所占比例。(仪表盘的值标签) */ -public class LabelContentPaneWithOutCateLabelContentPane extends GaugeLabelContentPane { +public class LabelContentPaneWithOutCate extends GaugeLabelContentPane { private static final long serialVersionUID = 1198062632979554467L; - public LabelContentPaneWithOutCateLabelContentPane(VanChartStylePane parent, JPanel showOnPane){ + public LabelContentPaneWithOutCate(VanChartStylePane parent, JPanel showOnPane){ super(parent, showOnPane); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercentLabelContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercent.java similarity index 81% rename from designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercentLabelContentPane.java rename to designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercent.java index cc968b8cf4..6518dc8a54 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercentLabelContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/label/LabelContentPaneWithPercent.java @@ -9,10 +9,10 @@ import java.awt.*; /** * 只有百分比(仪表盘的百分比标签) */ -public class LabelContentPaneWithPercentLabelContentPane extends GaugeLabelContentPane { +public class LabelContentPaneWithPercent extends GaugeLabelContentPane { private static final long serialVersionUID = -3739217668948747606L; - public LabelContentPaneWithPercentLabelContentPane(VanChartStylePane parent, JPanel showOnPane){ + public LabelContentPaneWithPercent(VanChartStylePane parent, JPanel showOnPane){ super(parent, showOnPane); } From 9dc1ed6594e43b9afb538363597d7c9b2247c317 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 14 Aug 2017 14:48:41 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartTooltipContentPane.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java index fc3ebd9a15..c36de8e090 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java @@ -85,24 +85,23 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Mon, 14 Aug 2017 15:08:12 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartTooltipContentPane.java | 14 +++++++------- .../component/label/GaugeLabelContentPane.java | 13 +++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java index c36de8e090..3569579754 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java @@ -85,23 +85,23 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Mon, 14 Aug 2017 15:11:36 +0800 Subject: [PATCH 9/9] =?UTF-8?q?9.0=E9=9D=A2=E6=9D=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartTooltipContentPane.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java index 3569579754..bebe2af7c6 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java @@ -44,10 +44,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane