From 3cfd2716c56536d48aba9ecc8570e09d547780f9 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Fri, 11 Aug 2017 10:21:44 +0800 Subject: [PATCH] =?UTF-8?q?9.0=E5=9B=BE=E8=A1=A8=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=201=E3=80=81=E6=95=B4=E4=BD=93?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E8=B0=83=E6=95=B4=202=E3=80=81=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=88=87=E6=8D=A2=E5=9B=BE=E6=A0=87=E6=8D=A2=E4=B8=BA?= =?UTF-8?q?=E6=96=87=E5=AD=97=203=E3=80=81=E6=A0=B7=E5=BC=8F=EF=BC=9A?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E9=9D=A2=E6=9D=BF=E8=B0=83=E6=95=B4=204?= =?UTF-8?q?=E3=80=81=E6=A0=B7=E5=BC=8F=EF=BC=9A=E5=9B=BE=E4=BE=8B=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../background/VanChartBackgroundPane.java | 26 +++++++++---------- ...rtBackgroundPaneWithOutImageAndShadow.java | 5 ++-- ...BackgroundWithOutShadowWithRadiusPane.java | 5 ++-- .../VanChartMarkerBackgroundPane.java | 6 +++-- .../component/border/VanChartBorderPane.java | 11 ++++---- .../border/VanChartBorderWithRadiusPane.java | 7 ++--- 6 files changed, 33 insertions(+), 27 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPane.java index 9fa866a0de..09d72d413a 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPane.java @@ -4,17 +4,17 @@ import com.fr.base.background.ImageBackground; import com.fr.chart.chartglyph.GeneralInfo; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.UINumberDragPane; -import com.fr.design.gui.ibutton.UIToggleButton; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane; import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane; import com.fr.general.Background; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.stable.Constants; import javax.swing.*; @@ -37,7 +37,7 @@ public class VanChartBackgroundPane extends BasicPane { protected UIComboBox typeComboBox; protected UINumberDragPane transparent; - protected UIToggleButton shadow; + protected UIButtonGroup shadow; protected JPanel centerPane; @@ -48,12 +48,10 @@ public class VanChartBackgroundPane extends BasicPane { double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = { p,p,p,p,p}; - - JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Background"}, getPaneComponents(), rowSize, columnSize); + double[] rowSize = { p,p,p,p,p,p}; + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getPaneComponents(), rowSize, columnSize); this.setLayout(new BorderLayout()); this.add(panel,BorderLayout.CENTER); - this.add(new JSeparator(), BorderLayout.SOUTH); } protected void initComponents() { @@ -90,12 +88,14 @@ public class VanChartBackgroundPane extends BasicPane { } protected Component[][] getPaneComponents() { - shadow = new UIToggleButton(Inter.getLocText("plugin-ChartF_OpenShadow")); + shadow = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_On"), Inter.getLocText("Plugin-ChartF_Off")}, new Boolean[]{true, false}); + return new Component[][]{ - new Component[]{typeComboBox, null}, - new Component[]{centerPane, null}, + new Component[]{null, null}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox}, + new Component[]{null, centerPane}, new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent}, - new Component[]{shadow, null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Shadow")), shadow}, }; } @@ -137,7 +137,7 @@ public class VanChartBackgroundPane extends BasicPane { double alpha = attr.getAlpha() * ALPHA_V; transparent.populateBean(alpha); if(shadow != null){ - shadow.setSelected(attr.isShadow()); + shadow.setSelectedIndex(attr.isShadow() == true ? 0 : 1); } for (int i = 0; i < paneList.size(); i++) { BackgroundQuickPane pane = paneList.get(i); @@ -159,7 +159,7 @@ public class VanChartBackgroundPane extends BasicPane { } attr.setAlpha((float) (transparent.updateBean() / ALPHA_V)); if(shadow != null){ - attr.setShadow(shadow.isSelected()); + attr.setShadow(shadow.getSelectedIndex() == 0); } } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java index 99c853edf0..f364562164 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java @@ -49,8 +49,9 @@ public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgro @Override protected Component[][] getPaneComponents() { return new Component[][]{ - new Component[]{typeComboBox, null}, - new Component[]{centerPane, null}, + new Component[]{null, null}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox}, + new Component[]{null, centerPane}, new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent}, }; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundWithOutShadowWithRadiusPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundWithOutShadowWithRadiusPane.java index 46b9a283e3..f1d1c9ca48 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundWithOutShadowWithRadiusPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartBackgroundWithOutShadowWithRadiusPane.java @@ -22,8 +22,9 @@ public class VanChartBackgroundWithOutShadowWithRadiusPane extends VanChartBackg protected Component[][] getPaneComponents() { radius = new UISpinner(0,1000,1,0); return new Component[][]{ - new Component[]{typeComboBox, null}, - new Component[]{centerPane, null}, + new Component[]{null, null}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox}, + new Component[]{null, centerPane}, new Component[]{new UILabel(Inter.getLocText("Plugin-Chart_Alpha")), transparent}, new Component[]{new UILabel(Inter.getLocText("plugin-ChartF_Radius")+":"),radius} }; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartMarkerBackgroundPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartMarkerBackgroundPane.java index 9bd5c773ee..67ea1c9d4b 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartMarkerBackgroundPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/background/VanChartMarkerBackgroundPane.java @@ -1,6 +1,7 @@ package com.fr.plugin.chart.designer.component.background; import com.fr.base.background.ColorBackground; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane; @@ -33,8 +34,9 @@ public class VanChartMarkerBackgroundPane extends VanChartBackgroundPane { protected Component[][] getPaneComponents() { return new Component[][]{ - new Component[]{typeComboBox, null}, - new Component[]{centerPane, null} + new Component[]{null, null}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Shape_Fill")), typeComboBox}, + new Component[]{null, centerPane}, }; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderPane.java index c706892870..2c79f63161 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderPane.java @@ -7,9 +7,9 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.ColorSelectBox; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.stable.CoreConstants; import javax.swing.*; @@ -31,17 +31,18 @@ public class VanChartBorderPane extends BasicPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p,f }; - double[] rowSize = {p, p, p}; + double[] rowSize = {p, p, p, p}; Component[][] components = getUseComponent(); - JPanel panel = TableLayoutHelper.createTableLayoutPane4Chart(new String[]{"Border"}, components, rowSize, columnSize); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); this.setLayout(new BorderLayout()); this.add(panel,BorderLayout.CENTER); } protected Component[][] getUseComponent() { return new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")+":"),currentLineCombo}, - new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")+":"),currentLineColorPane}, + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")),currentLineCombo}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")),currentLineColorPane}, }; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithRadiusPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithRadiusPane.java index 9f6fa8ee2b..f7c330be24 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithRadiusPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/border/VanChartBorderWithRadiusPane.java @@ -26,9 +26,10 @@ public class VanChartBorderWithRadiusPane extends VanChartBorderPane { @Override protected Component[][] getUseComponent() { return new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")+":"),currentLineCombo}, - new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")+":"),currentLineColorPane}, - new Component[]{new UILabel(Inter.getLocText("plugin-ChartF_Radius")+":"),radius} + new Component[]{null,null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_LineStyle")),currentLineCombo}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart-Color_Color")),currentLineColorPane}, + new Component[]{new UILabel(Inter.getLocText("plugin-ChartF_Radius")),radius} } ; }