From d9379875b34a38f592a7de7bed159c7ef5f2c4f7 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Mon, 10 Apr 2017 11:22:48 +0800 Subject: [PATCH 1/5] =?UTF-8?q?font=3D=3Dnull=20=E4=B9=9F=E8=A6=81?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=9B=91=E5=90=AC=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/style/ChartTextAttrPane.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java index 48ef44970d..1146d404d5 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java @@ -77,17 +77,17 @@ public class ChartTextAttrPane extends BasicPane { public void populate(FRFont frFont) { UIObserverListener listener = fontNameComboBox == null ? null : fontNameComboBox.getUiObserverListener(); removeAllComboBoxListener(); - if (frFont == null) { - return; - } - fontNameComboBox.setSelectedItem(frFont.getFamily()); - bold.setSelected(frFont.isBold()); - italic.setSelected(frFont.isItalic()); - if(fontSizeComboBox != null) { - fontSizeComboBox.setSelectedItem(frFont.getSize()); - } - if (fontColor != null) { - fontColor.setColor(frFont.getForeground()); + + if (frFont != null) { + fontNameComboBox.setSelectedItem(frFont.getFamily()); + bold.setSelected(frFont.isBold()); + italic.setSelected(frFont.isItalic()); + if(fontSizeComboBox != null) { + fontSizeComboBox.setSelectedItem(frFont.getSize()); + } + if (fontColor != null) { + fontColor.setColor(frFont.getForeground()); + } } //更新结束后,注册监听器 From 48723cc22006085f1b100318eeebb1e91f1fd4a4 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Tue, 11 Apr 2017 16:42:34 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=88=96=E8=80=85=E4=BF=AE=E6=94=B9=E5=86=B2=E7=AA=81=E6=97=B6?= =?UTF-8?q?=20merge=E9=94=99=E8=AF=AF=20=E6=94=B9=E5=9B=9E=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/chart/axis/MinMaxValuePane.java | 52 +++++++++++-------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java index 7fc7d9db34..4790892596 100644 --- a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java +++ b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java @@ -31,45 +31,53 @@ public class MinMaxValuePane extends JPanel { protected UITextField secUnitField; public MinMaxValuePane() { - minCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Min_Value"})); - minValueField = new UITextField(6); - maxCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Max_Value"})); - maxValueField = new UITextField(6); - isCustomMainUnitBox = new UICheckBox(Inter.getLocText("FR-Chart_MainGraduationUnit")); - mainUnitField = new UITextField(6); - isCustomSecUnitBox = new UICheckBox(Inter.getLocText("FR-Chart_SecondGraduationUnit")); - secUnitField = new UITextField(6); + minCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Min_Value"})); + minValueField = new UITextField(6); + maxCheckBox = new UICheckBox(Inter.getLocText(new String[]{"Custom", "Max_Value"})); + maxValueField = new UITextField(6); + isCustomMainUnitBox = new UICheckBox(Inter.getLocText("FR-Chart_MainGraduationUnit")); + mainUnitField = new UITextField(6); + isCustomSecUnitBox = new UICheckBox(Inter.getLocText("FR-Chart_SecondGraduationUnit")); + secUnitField = new UITextField(6); + double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = { p, f }; - double[] rowSize = { p, p, p, p}; + double[] columnSize = {p, f}; - Component[][] components = getPanelComponents(); - JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize); + Component[][] components = getPanelComponents(); + JPanel panel = TableLayoutHelper.createTableLayoutPane(components, getRowSize(p), columnSize); this.setLayout(new BorderLayout()); - this.add(panel,BorderLayout.CENTER); + this.add(panel, BorderLayout.CENTER); + addComponentListener(components); + } - for(int i = 0; i < components.length; i++) { - ((UICheckBox)components[i][0]).addActionListener(new ActionListener() { + protected double[] getRowSize(double p) { + return new double[]{p, p, p, p}; + } + + public void addComponentListener(Component[][] components) { + for (int i = 0; i < components.length; i++) { + ((UICheckBox) components[i][0]).addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { checkBoxUse(); } }); - ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]); + ChartSwingUtils.addListener((UICheckBox) components[i][0], (UITextField) components[i][1]); } } + protected Component[][] getPanelComponents() { - return new Component[][]{ - new Component[]{minCheckBox, minValueField}, - new Component[]{maxCheckBox, maxValueField}, - new Component[]{isCustomMainUnitBox, mainUnitField}, - new Component[]{isCustomSecUnitBox, secUnitField}, + return new Component[][]{ + new Component[]{minCheckBox, minValueField}, + new Component[]{maxCheckBox, maxValueField}, + new Component[]{isCustomMainUnitBox, mainUnitField}, + new Component[]{isCustomSecUnitBox, secUnitField}, }; } - private void checkBoxUse() { + protected void checkBoxUse() { minValueField.setEnabled(minCheckBox.isSelected()); maxValueField.setEnabled(maxCheckBox.isSelected()); From 333fd8357733c51924ead06553c57077b03b9be0 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Thu, 13 Apr 2017 11:23:14 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=9C=80=E5=A4=A7=E6=9C=80=E5=B0=8F=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E4=B8=8Ereleas=E5=88=86=E6=94=AF=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/chart/axis/MinMaxValuePane.java | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java index 4790892596..8a157f0843 100644 --- a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java +++ b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java @@ -55,19 +55,23 @@ public class MinMaxValuePane extends JPanel { return new double[]{p, p, p, p}; } - public void addComponentListener(Component[][] components) { + protected void addComponentListener(Component[][] components) { for (int i = 0; i < components.length; i++) { - ((UICheckBox) components[i][0]).addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - checkBoxUse(); - } - }); + addListener((UICheckBox) components[i][0]); ChartSwingUtils.addListener((UICheckBox) components[i][0], (UITextField) components[i][1]); } } + protected void addListener(UICheckBox checkBox) { + checkBox.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + checkBoxUse(); + } + }); + } + protected Component[][] getPanelComponents() { return new Component[][]{ new Component[]{minCheckBox, minValueField}, @@ -77,7 +81,7 @@ public class MinMaxValuePane extends JPanel { }; } - protected void checkBoxUse() { + private void checkBoxUse() { minValueField.setEnabled(minCheckBox.isSelected()); maxValueField.setEnabled(maxCheckBox.isSelected()); @@ -108,7 +112,7 @@ public class MinMaxValuePane extends JPanel { if(axis.getMinValue() != null) { minValueField.setText(axis.getMinValue().toString()); } - } + } // 最大值 if (axis.isCustomMaxValue()) { @@ -116,7 +120,7 @@ public class MinMaxValuePane extends JPanel { if(axis.getMaxValue() != null) { maxValueField.setText(axis.getMaxValue().toString()); } - } + } // 主次刻度单位 if (axis.isCustomMainUnit()) { @@ -124,7 +128,7 @@ public class MinMaxValuePane extends JPanel { if(axis.getMainUnit() != null) { mainUnitField.setText(axis.getMainUnit().toString()); } - } + } if(axis.isCustomSecUnit()) { isCustomSecUnitBox.setSelected(true); From 5f68195875d229f011c065c416d618243e60ea41 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Thu, 13 Apr 2017 11:39:31 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81=E8=A2=AB=E5=88=A0=E6=8E=89?= =?UTF-8?q?=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 6 +++++- .../src/com/fr/design/locale/designer_en_US.properties | 6 +++++- .../src/com/fr/design/locale/designer_ja_JP.properties | 4 ++++ .../src/com/fr/design/locale/designer_ko_KR.properties | 6 +++++- .../src/com/fr/design/locale/designer_zh_CN.properties | 4 ++++ .../src/com/fr/design/locale/designer_zh_TW.properties | 6 +++++- 6 files changed, 28 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index e3ee039994..94733eaad4 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -587,4 +587,8 @@ FR-Designer_Mouse_Click_Tips= FR-Designer-Move_Tab_First=move to first FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_Next=move to next -FR-Designer-Move_Tab_Prev=move to previous \ No newline at end of file +FR-Designer-Move_Tab_Prev=move to previous +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 \ No newline at end of file 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 a86a7fb14f..5bc73972ea 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 @@ -587,4 +587,8 @@ FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in FR-Designer-Move_Tab_First=move to first FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_Next=move to next -FR-Designer-Move_Tab_Prev=move to previous \ No newline at end of file +FR-Designer-Move_Tab_Prev=move to previous +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 \ No newline at end of file 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 943cf181d1..1a7ee9322d 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 @@ -555,3 +555,7 @@ FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Click_Tips= 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 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 db796ce438..87fc8705af 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 @@ -551,4 +551,8 @@ FR-Designer_Background_Image_Select= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Click_Tips= -FR-Designer_Plugin_Should_Update_Please_Contact_Developer= \ No newline at end of file +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 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 726a6d0f61..f0e7eb1763 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 @@ -588,3 +588,7 @@ FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F +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 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 f8b28dba33..b97e4969ba 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 @@ -575,4 +575,8 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= \ No newline at end of file +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 From 3471515bddf69b30c9a7956077a0c40c83c3b128 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Thu, 13 Apr 2017 20:10:05 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=B0=8F=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/style/color/ColorSelectConfigManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java index af3d7df81f..e135b17c6b 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java @@ -84,6 +84,9 @@ public class ColorSelectConfigManager extends XMLFileManager implements ColorSel * @param color 颜色 */ public void addToColorQueue(Color color) { + if(color == null){ + return; + } // 过滤重复的最近使用颜色 // 因为有个后进先出的问题,最近使用的颜色需要放到最前面所以没用set if (colors.contains(color)) {