From 120cd6f28c0a22531ef4bcd9e8cd2036a16c23f8 Mon Sep 17 00:00:00 2001 From: Qin Xiaofu Date: Mon, 28 Aug 2017 13:36:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?CHART-1212=20=E5=87=BD=E6=95=B0=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=9B=B4=E6=94=B9=E4=BA=86=EF=BC=8C=E8=BF=99=E9=87=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=90=8C=E6=AD=A5=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/ChangeConfigPane.java | 13 ++++++++----- .../com/fr/plugin/chart/DownloadSourcesEvent.java | 7 +++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 designer_chart/src/com/fr/plugin/chart/DownloadSourcesEvent.java diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java index 23135b0764..1fd20bc504 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java @@ -30,6 +30,9 @@ public class ChangeConfigPane extends BasicBeanPane { private static final int WIDTH = 100; private static final int MIN_TIME = 0; private static final int MAX_TIME = Integer.MAX_VALUE; + private static final int CONSTANT_TEN = 10; + private static final int CONSTANT_THIRTY = 30; + private static final int CONSTANT_ZERO = 0; private JPanel contentPane; //配置方式按钮 private UIButtonGroup configStyleButton; @@ -50,7 +53,7 @@ public class ChangeConfigPane extends BasicBeanPane { initButtonGroup(); configPane = createConfigPane(); contentPane = createContentPane(); - contentPane.setBorder(BorderFactory.createEmptyBorder(10, 30, 10, 30)); + contentPane.setBorder(BorderFactory.createEmptyBorder(CONSTANT_TEN, CONSTANT_THIRTY, CONSTANT_TEN, CONSTANT_THIRTY)); this.add(contentPane, BorderLayout.CENTER); } @@ -74,7 +77,7 @@ public class ChangeConfigPane extends BasicBeanPane { JPanel panel = new JPanel(new CardLayout()){ @Override public Dimension getPreferredSize() { - if(configStyleButton.getSelectedIndex() == 0){ + if (configStyleButton.getSelectedIndex() == 0){ return buttonConfigPane.getPreferredSize(); } else{ return carouselConfigPane.getPreferredSize(); @@ -85,7 +88,7 @@ public class ChangeConfigPane extends BasicBeanPane { panel.add(buttonConfigPane, "button"); panel.add(carouselConfigPane, "carousel"); - panel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0)); + panel.setBorder(BorderFactory.createEmptyBorder(CONSTANT_ZERO, CONSTANT_TEN, CONSTANT_ZERO, CONSTANT_ZERO)); return panel; } @@ -104,7 +107,7 @@ public class ChangeConfigPane extends BasicBeanPane { new Component[] {new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), arrowCheckbox} }; - return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); + return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); } private JPanel createTitleStylePane(){ @@ -136,7 +139,7 @@ public class ChangeConfigPane extends BasicBeanPane { new Component[]{createButtonBackgroundColorPane(),null}, }; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); } private void initButtonGroup() { diff --git a/designer_chart/src/com/fr/plugin/chart/DownloadSourcesEvent.java b/designer_chart/src/com/fr/plugin/chart/DownloadSourcesEvent.java new file mode 100644 index 0000000000..88ac95a6fb --- /dev/null +++ b/designer_chart/src/com/fr/plugin/chart/DownloadSourcesEvent.java @@ -0,0 +1,7 @@ +package com.fr.plugin.chart; + +/** + * Created by Napoleon on 2017/8/25. + */ +public interface DownloadSourcesEvent { +} From 8ab3e3c046ff337182e034babba75064c021b584 Mon Sep 17 00:00:00 2001 From: Qin Xiaofu Date: Tue, 29 Aug 2017 10:44:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?CHART-1343=20=E4=BF=AE=E6=94=B9=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E8=BD=AE=E6=92=AD=E7=AE=AD=E5=A4=B4=E7=9A=84=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E8=AE=A9=E5=AE=83=E7=AC=A6=E5=90=88=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E7=9A=84=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/locale/designer_zh_CN.properties | 1 + .../mainframe/chart/gui/ChangeConfigPane.java | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) 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 e9b5933184..4e7b879734 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 @@ -117,6 +117,7 @@ FR-Designer_Forum=\u8BBA\u575B FR-Designer_Get-Cube=\u6B63\u5728\u83B7\u53D6cube FR-Designer_Help=\u5E2E\u52A9 FR-Designer_Hide=\u9690\u85CF +FR-Designer_Show=\u663E\u793A FR-Designer_Hyperlink=\u8D85\u7EA7\u94FE\u63A5 FR-Designer_Hyperlink-Form_link=\u5F53\u524D\u8868\u5355\u5BF9\u8C61 FR-Designer_IDCard=\u8EAB\u4EFD\u8BC1 diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java index 1fd20bc504..94f962cb40 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java @@ -11,7 +11,6 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; -import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; @@ -46,8 +45,9 @@ public class ChangeConfigPane extends BasicBeanPane { //轮播切换方式配置接界面 private JPanel carouselConfigPane; protected UISpinner timeInterval; - protected UICheckBox arrowCheckbox; private ColorSelectBoxWithOutTransparent colorSelectBox4carousel; + private UIButtonGroup switchStyleGroup; + public ChangeConfigPane(){ initButtonGroup(); @@ -97,14 +97,15 @@ public class ChangeConfigPane extends BasicBeanPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = {p,p,p}; + double[] rowSize = {p, p, p}; timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0); colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH); - arrowCheckbox = new UICheckBox(Inter.getLocText("FR-Base_TurnOn")); + switchStyleGroup = new UIButtonGroup(new String[]{Inter.getLocText("FR-Designer_Show"), Inter.getLocText("FR-Designer_Hide")}); + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), switchStyleGroup}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval}, - new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel}, - new Component[] {new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), arrowCheckbox} + new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel} }; return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); @@ -181,7 +182,7 @@ public class ChangeConfigPane extends BasicBeanPane { //轮播切换界面 timeInterval.setValue(changeConfigAttr.getTimeInterval()); colorSelectBox4carousel.setSelectObject(changeConfigAttr.getCarouselColor()); - arrowCheckbox.setSelected(changeConfigAttr.isShowArrow()); + switchStyleGroup.setSelectedIndex(changeConfigAttr.isShowArrow() ? 0 : 1); checkCardPane(); @@ -205,7 +206,7 @@ public class ChangeConfigPane extends BasicBeanPane { changeConfigAttr.setButtonColor(colorSelectBox4button.getSelectObject()); changeConfigAttr.setTimeInterval((int) timeInterval.getValue()); changeConfigAttr.setCarouselColor(colorSelectBox4carousel.getSelectObject()); - changeConfigAttr.setShowArrow(arrowCheckbox.isSelected()); + changeConfigAttr.setShowArrow(switchStyleGroup.getSelectedIndex() == 0); } @Override From b742b1dfead3aa7188b46621084b960ca8371181 Mon Sep 17 00:00:00 2001 From: Qin Xiaofu Date: Tue, 29 Aug 2017 10:44:15 +0800 Subject: [PATCH 3/4] =?UTF-8?q?CHART-1343=20=E4=BF=AE=E6=94=B9=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E8=BD=AE=E6=92=AD=E7=AE=AD=E5=A4=B4=E7=9A=84=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E8=AE=A9=E5=AE=83=E7=AC=A6=E5=90=88=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E7=9A=84=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/locale/designer_zh_CN.properties | 1 + .../mainframe/chart/gui/ChangeConfigPane.java | 17 +++++++++-------- .../chart/DownloadOnlineSourcesHelper.java | 2 +- .../fr/plugin/chart/DownloadSourcesEvent.java | 7 ------- 4 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 designer_chart/src/com/fr/plugin/chart/DownloadSourcesEvent.java 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 e9b5933184..4e7b879734 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 @@ -117,6 +117,7 @@ FR-Designer_Forum=\u8BBA\u575B FR-Designer_Get-Cube=\u6B63\u5728\u83B7\u53D6cube FR-Designer_Help=\u5E2E\u52A9 FR-Designer_Hide=\u9690\u85CF +FR-Designer_Show=\u663E\u793A FR-Designer_Hyperlink=\u8D85\u7EA7\u94FE\u63A5 FR-Designer_Hyperlink-Form_link=\u5F53\u524D\u8868\u5355\u5BF9\u8C61 FR-Designer_IDCard=\u8EAB\u4EFD\u8BC1 diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java index 1fd20bc504..94f962cb40 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java @@ -11,7 +11,6 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; -import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; @@ -46,8 +45,9 @@ public class ChangeConfigPane extends BasicBeanPane { //轮播切换方式配置接界面 private JPanel carouselConfigPane; protected UISpinner timeInterval; - protected UICheckBox arrowCheckbox; private ColorSelectBoxWithOutTransparent colorSelectBox4carousel; + private UIButtonGroup switchStyleGroup; + public ChangeConfigPane(){ initButtonGroup(); @@ -97,14 +97,15 @@ public class ChangeConfigPane extends BasicBeanPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {p, f}; - double[] rowSize = {p,p,p}; + double[] rowSize = {p, p, p}; timeInterval = new UISpinner(MIN_TIME, MAX_TIME, 1, 0); colorSelectBox4carousel = new ColorSelectBoxWithOutTransparent(WIDTH); - arrowCheckbox = new UICheckBox(Inter.getLocText("FR-Base_TurnOn")); + switchStyleGroup = new UIButtonGroup(new String[]{Inter.getLocText("FR-Designer_Show"), Inter.getLocText("FR-Designer_Hide")}); + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), switchStyleGroup}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Time_Interval")), timeInterval}, - new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel}, - new Component[] {new UILabel(Inter.getLocText("Plugin-ChartF_Arrow_Style")), arrowCheckbox} + new Component[]{new UILabel(Inter.getLocText("Background")),colorSelectBox4carousel} }; return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); @@ -181,7 +182,7 @@ public class ChangeConfigPane extends BasicBeanPane { //轮播切换界面 timeInterval.setValue(changeConfigAttr.getTimeInterval()); colorSelectBox4carousel.setSelectObject(changeConfigAttr.getCarouselColor()); - arrowCheckbox.setSelected(changeConfigAttr.isShowArrow()); + switchStyleGroup.setSelectedIndex(changeConfigAttr.isShowArrow() ? 0 : 1); checkCardPane(); @@ -205,7 +206,7 @@ public class ChangeConfigPane extends BasicBeanPane { changeConfigAttr.setButtonColor(colorSelectBox4button.getSelectObject()); changeConfigAttr.setTimeInterval((int) timeInterval.getValue()); changeConfigAttr.setCarouselColor(colorSelectBox4carousel.getSelectObject()); - changeConfigAttr.setShowArrow(arrowCheckbox.isSelected()); + changeConfigAttr.setShowArrow(switchStyleGroup.getSelectedIndex() == 0); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java b/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java index 1f8d057378..15c0066cc3 100644 --- a/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java +++ b/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java @@ -26,7 +26,7 @@ import java.util.List; /** * Created by shine on 2017/8/21. */ -public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent{ +public class DownloadOnlineSourcesHelper { // 定义加载窗口大小 private static final int LOAD_WIDTH = 455; private static final int INCIDENT_HEIGHT = 15; diff --git a/designer_chart/src/com/fr/plugin/chart/DownloadSourcesEvent.java b/designer_chart/src/com/fr/plugin/chart/DownloadSourcesEvent.java deleted file mode 100644 index 88ac95a6fb..0000000000 --- a/designer_chart/src/com/fr/plugin/chart/DownloadSourcesEvent.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.fr.plugin.chart; - -/** - * Created by Napoleon on 2017/8/25. - */ -public interface DownloadSourcesEvent { -} From 78c65b9695add394d94e1cabac92b517f97d40d5 Mon Sep 17 00:00:00 2001 From: Qin Xiaofu Date: Tue, 29 Aug 2017 10:51:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?CHART-1343=20=E4=BF=AE=E6=94=B9=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E8=BD=AE=E6=92=AD=E7=AE=AD=E5=A4=B4=E7=9A=84=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E8=AE=A9=E5=AE=83=E7=AC=A6=E5=90=88=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E7=9A=84=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java b/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java index 15c0066cc3..1f8d057378 100644 --- a/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java +++ b/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java @@ -26,7 +26,7 @@ import java.util.List; /** * Created by shine on 2017/8/21. */ -public class DownloadOnlineSourcesHelper { +public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent{ // 定义加载窗口大小 private static final int LOAD_WIDTH = 455; private static final int INCIDENT_HEIGHT = 15;