From 37b19cce1dc9a2fc2920ea00b6052a71492228a9 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 26 Apr 2017 17:19:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=97=B6=E4=BC=9A?= =?UTF-8?q?=E5=B0=86=E5=88=9D=E5=A7=8B=E5=8C=96=E7=9A=84=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E5=8E=86=E5=8F=B2=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E4=B8=8D=E9=9C=80=E8=A6=81=E8=BF=99=E6=A0=B7?= =?UTF-8?q?=E5=81=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/gui/style/BorderPane.java | 3 --- .../mainframe/backgroundpane/PatternBackgroundQuickPane.java | 2 -- 2 files changed, 5 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index 60989aedd..714f0f0ac 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -99,9 +99,6 @@ public class BorderPane extends AbstractBasicStylePane { this.add(northPane, BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); - - this.currentLineColorPane.setSelectObject(Color.BLACK); - outerToggleButton.addChangeListener(new ChangeListener() { @Override diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java index 4e31405d1..1dc21db89 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java @@ -52,8 +52,6 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane { JPanel colorPane = new JPanel(new GridLayout(0, 2)); foregroundColorPane = new ColorSelectBox(70); backgroundColorPane = new ColorSelectBox(70); - foregroundColorPane.setSelectObject(Color.lightGray); - backgroundColorPane.setSelectObject(Color.black); colorPane.add(this.createLabelColorPane(Inter.getLocText("Foreground") + ":", foregroundColorPane)); colorPane.add(this.createLabelColorPane(Inter.getLocText("Background") + ":", backgroundColorPane)); From cf4578290587ce36978d813593879f1ba1f4eb7c Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 26 Apr 2017 18:05:30 +0800 Subject: [PATCH 2/2] pmd --- .../com/fr/design/gui/style/BorderPane.java | 49 +++++++------------ .../com/fr/design/locale/designer.properties | 4 ++ .../design/locale/designer_en_US.properties | 4 ++ .../design/locale/designer_ja_JP.properties | 6 ++- .../design/locale/designer_ko_KR.properties | 6 ++- .../design/locale/designer_zh_CN.properties | 6 ++- .../design/locale/designer_zh_TW.properties | 6 ++- .../PatternBackgroundQuickPane.java | 13 ++--- 8 files changed, 50 insertions(+), 44 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index 714f0f0ac..cb37f1c1a 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -51,34 +51,16 @@ public class BorderPane extends AbstractBasicStylePane { } protected void initComponents() { - topToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png")); - leftToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png")); - bottomToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png")); - rightToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png")); - horizontalToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png")); - verticalToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png")); - this.currentLineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); - this.currentLineColorPane = new NewColorSelectBox(100); - + initButtonsWithIcon(); this.setLayout(new BorderLayout(0, 6)); - - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - - double[] columnSize1 = {p, f}; - double[] rowSize1 = {p, p}; - - + double p = TableLayout.PREFERRED, f = TableLayout.FILL; + double[] columnSize1 = {p, f}, rowSize1 = {p, p}; Component[][] components1 = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Style") + ":"), currentLineCombo}, - new Component[]{new UILabel(Inter.getLocText("Color") + ":"), currentLineColorPane}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Style") + ":"), currentLineCombo}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Color") + ":"), currentLineColorPane}, }; - JPanel northPane = TableLayoutHelper.createTableLayoutPane(components1, rowSize1, columnSize1); - - - double[] columnSize2 = {p, f}; - double[] rowSize2 = {p, p}; + double[] columnSize2 = {p, f}, rowSize2 = {p, p}; JPanel externalPane = new JPanel(new GridLayout(0, 4)); externalPane.add(topToggleButton); externalPane.add(leftToggleButton); @@ -87,20 +69,15 @@ public class BorderPane extends AbstractBasicStylePane { JPanel insidePane = new JPanel(new GridLayout(0, 2)); insidePane.add(horizontalToggleButton); insidePane.add(verticalToggleButton); - - Component[][] components2 = new Component[][]{ new Component[]{outerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/out.png")), innerToggleButton = new UIToggleButton(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"))}, new Component[]{externalPane, insidePane,} }; JPanel centerPane = TableLayoutHelper.createTableLayoutPane(components2, rowSize2, columnSize2); - this.setLayout(new BorderLayout(0, 6)); this.add(northPane, BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); - outerToggleButton.addChangeListener(new ChangeListener() { - @Override public void stateChanged(ChangeEvent e) { boolean value = outerToggleButton.isSelected(); @@ -110,9 +87,7 @@ public class BorderPane extends AbstractBasicStylePane { rightToggleButton.setSelected(value); } }); - innerToggleButton.addChangeListener(new ChangeListener() { - @Override public void stateChanged(ChangeEvent e) { boolean value = innerToggleButton.isSelected(); @@ -120,12 +95,22 @@ public class BorderPane extends AbstractBasicStylePane { verticalToggleButton.setSelected(value); } }); + } + private void initButtonsWithIcon(){ + topToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png")); + leftToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png")); + bottomToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png")); + rightToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png")); + horizontalToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png")); + verticalToggleButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png")); + this.currentLineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY); + this.currentLineColorPane = new NewColorSelectBox(100); } @Override public String title4PopupWindow() { - return Inter.getLocText("Border"); + return Inter.getLocText("FR-Designer_Border"); } public void populate(Style style) { diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 044278dba..cc75cee8a 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -596,3 +596,7 @@ FR-Designer_AxisReversed=AxisValue FR-Designer_Logarithmic=Logarithmic FR-Designer_Chart_Log_Base=Log Base FR-Designer_Chart_F_Radar_Axis=Chart_F_Radar_Axis +FR-Designer_Style=Style +FR-Designer_Color=Color +FR-Designer_Border=Border +FR-Designer_Background-Pattern=Pattern diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 53c3ba773..1c646aebe 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -596,4 +596,8 @@ FR-Designer_AxisReversed=Axis in reverse order FR-Designer_Logarithmic=Log scale FR-Designer_Chart_Log_Base=Log Base FR-Designer_Chart_F_Radar_Axis=Value Axis +FR-Designer_Style=Style +FR-Designer_Color=Color +FR-Designer_Border=Border +FR-Designer_Background-Pattern=Pattern diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 10c59bd36..2f4affb91 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -560,4 +560,8 @@ FR-Designer_Plugin_Should_Update_Please_Contact_Developer= FR-Designer_AxisReversed=\u8EF8\u9006\u9806 FR-Designer_Logarithmic=\u5BFE\u6570\u76EE\u76DB\u308A FR-Designer_Chart_Log_Base=\u5E95\u6570 -FR-Designer_Chart_F_Radar_Axis=\u5782\u76F4\u8EF8 \ No newline at end of file +FR-Designer_Chart_F_Radar_Axis=\u5782\u76F4\u8EF8 +FR-Designer_Style=\u30B9\u30BF\u30A4\u30EB +FR-Designer_Color=\u8272 +FR-Designer_Border=\u67A0 +FR-Designer_Background-Pattern=\u30D1\u30BF\u30FC\u30F3 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 87fc8705a..075b017ab 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -555,4 +555,8 @@ FR-Designer_Plugin_Should_Update_Please_Contact_Developer= FR-Designer_AxisReversed=\uCD95\uC5ED\uC21C FR-Designer_Logarithmic=\uB85C\uADF8\uB208\uAE08 FR-Designer_Chart_Log_Base=\uAE30\uC218 -FR-Designer_Chart_F_Radar_Axis=\uAC12\uCD95 \ No newline at end of file +FR-Designer_Chart_F_Radar_Axis=\uAC12\uCD95 +FR-Designer_Style=\uC591\uC2DD +FR-Designer_Color=\uC0C9 +FR-Designer_Border=\uD14C\uB450\uB9AC +FR-Designer_Background-Pattern=\uC774\uBBF8\uC9C0 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index a70e0c445..d0a2b0520 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -595,4 +595,8 @@ FR-Designer_Too_Small_To_Paste=\u6B64\u5904\u65E0\u6CD5\u7C98\u8D34\uFF0C\u5C0F\ FR-Designer_AxisReversed=\u8F74\u9006\u5E8F FR-Designer_Logarithmic=\u5BF9\u6570\u523B\u5EA6 FR-Designer_Chart_Log_Base=\u5E95\u6570 -FR-Designer_Chart_F_Radar_Axis=\u503C\u8F74 \ No newline at end of file +FR-Designer_Chart_F_Radar_Axis=\u503C\u8F74 +FR-Designer_Style=\u6837\u5F0F +FR-Designer_Color=\u989C\u8272 +FR-Designer_Border=\u8FB9\u6846 +FR-Designer_Background-Pattern=\u56FE\u6848 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index d32829c18..bbaf3db36 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -581,4 +581,8 @@ FR-Designer_Mouse_Click_Tips= FR-Designer_AxisReversed=\u8EF8\u9006\u5E8F FR-Designer_Logarithmic=\u5C0D\u6578\u523B\u5EA6 FR-Designer_Chart_Log_Base=\u5E95\u6578 -FR-Designer_Chart_F_Radar_Axis=\u503C\u8EF8 \ No newline at end of file +FR-Designer_Chart_F_Radar_Axis=\u503C\u8EF8 +FR-Designer_Style=\u6A23\u5F0F +FR-Designer_Color=\u984F\u8272 +FR-Designer_Border=\u6846\u7DDA +FR-Designer_Background-Pattern=\u5716\u6848 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java index 1dc21db89..16b294955 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java @@ -26,17 +26,16 @@ import java.awt.geom.Rectangle2D; public class PatternBackgroundQuickPane extends BackgroundQuickPane { private int patternIndex = 0; // pattern setIndex. + private final static int DEFAULT_DIM_HEIGHT = 190; private ColorSelectBox foregroundColorPane; private ColorSelectBox backgroundColorPane; private PatternButton[] patternButtonArray; public PatternBackgroundQuickPane() { this.setLayout(new BorderLayout(0, 4)); - JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); this.add(contentPane, BorderLayout.NORTH); contentPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5)); - JPanel typePane2 = new JPanel(); contentPane.add(typePane2); typePane2.setLayout(new GridLayout(0, 8, 1, 1)); @@ -48,13 +47,11 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane { patternButtonGroup.add(patternButtonArray[i]); typePane2.add(patternButtonArray[i]); } - JPanel colorPane = new JPanel(new GridLayout(0, 2)); foregroundColorPane = new ColorSelectBox(70); backgroundColorPane = new ColorSelectBox(70); - - colorPane.add(this.createLabelColorPane(Inter.getLocText("Foreground") + ":", foregroundColorPane)); - colorPane.add(this.createLabelColorPane(Inter.getLocText("Background") + ":", backgroundColorPane)); + colorPane.add(this.createLabelColorPane(Inter.getLocText("FR-Designer_Foreground") + ":", foregroundColorPane)); + colorPane.add(this.createLabelColorPane(Inter.getLocText("FR-Designer_Background") + ":", backgroundColorPane)); this.add(colorPane, BorderLayout.CENTER); foregroundColorPane.addSelectChangeListener(colorChangeListener); backgroundColorPane.addSelectChangeListener(colorChangeListener); @@ -63,7 +60,7 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane { @Override public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); - dim.height = 190; + dim.height = DEFAULT_DIM_HEIGHT; return dim; } @@ -204,6 +201,6 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane { @Override public String title4PopupWindow() { - return Inter.getLocText("Background-Pattern"); + return Inter.getLocText("FR-Designer_Background-Pattern"); } } \ No newline at end of file