From 58152e27753cd4dd781a77432376efa94b66f8ae Mon Sep 17 00:00:00 2001 From: mengao Date: Mon, 27 Mar 2017 16:58:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/chart/axis/MinMaxValuePane.java | 18 +++++++----------- .../chart/gui/style/axis/ChartValuePane.java | 5 ++--- 2 files changed, 9 insertions(+), 14 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 73235dc31f..4a9be221de 100644 --- a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java +++ b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java @@ -42,14 +42,14 @@ public class MinMaxValuePane extends JPanel { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p, f }; - double[] rowSize = { p, p, p, p, p, p, p, p}; + double[] rowSize = { p, p, p, p}; Component[][] components = getPanelComponents(); JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize); this.setLayout(new BorderLayout()); this.add(panel,BorderLayout.CENTER); - for(int i = 0; i < components.length; i+=2) { + for(int i = 0; i < components.length; i++) { ((UICheckBox)components[i][0]).addActionListener(new ActionListener() { @Override @@ -57,19 +57,15 @@ public class MinMaxValuePane extends JPanel { checkBoxUse(); } }); - ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i+1][0]); + ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]); } } protected Component[][] getPanelComponents() { return new Component[][]{ - new Component[]{minCheckBox}, - new Component[]{minValueField}, - new Component[]{maxCheckBox}, - new Component[]{maxValueField}, - new Component[]{isCustomMainUnitBox}, - new Component[]{mainUnitField}, - new Component[]{isCustomSecUnitBox}, - new Component[]{secUnitField}, + new Component[]{minCheckBox, minValueField}, + new Component[]{maxCheckBox, maxValueField}, + new Component[]{isCustomMainUnitBox, mainUnitField}, + new Component[]{isCustomSecUnitBox, secUnitField}, }; } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java index f798a0a07d..e497bcb80f 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java @@ -151,11 +151,10 @@ public class ChartValuePane extends ChartAxisUsePane{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f}; - double[] rowSize = { p, p, p}; + double[] rowSize = { p, p}; Component[][] component = new Component[][]{ new Component[]{null,initMinMaxValue(),null}, - new Component[]{null, addLogarithmicPane2ValuePane(), null}, - new Component[]{null, null, addLogText()}, + new Component[]{null, addLogarithmicPane2ValuePane(), addLogText()}, }; return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize); } From 18c5708343c4b54ba1ea35f579e90b912346a2a6 Mon Sep 17 00:00:00 2001 From: mengao Date: Mon, 27 Mar 2017 18:38:35 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/chart/axis/MinMaxValuePane.java | 18 +++++++++++------- .../chart/gui/style/axis/ChartValuePane.java | 5 +++-- 2 files changed, 14 insertions(+), 9 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 4a9be221de..73235dc31f 100644 --- a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java +++ b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java @@ -42,14 +42,14 @@ public class MinMaxValuePane extends JPanel { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p, f }; - double[] rowSize = { p, p, p, p}; + double[] rowSize = { p, p, p, p, p, p, p, p}; Component[][] components = getPanelComponents(); JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize); this.setLayout(new BorderLayout()); this.add(panel,BorderLayout.CENTER); - for(int i = 0; i < components.length; i++) { + for(int i = 0; i < components.length; i+=2) { ((UICheckBox)components[i][0]).addActionListener(new ActionListener() { @Override @@ -57,15 +57,19 @@ public class MinMaxValuePane extends JPanel { checkBoxUse(); } }); - ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]); + ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i+1][0]); } } protected Component[][] getPanelComponents() { return new Component[][]{ - new Component[]{minCheckBox, minValueField}, - new Component[]{maxCheckBox, maxValueField}, - new Component[]{isCustomMainUnitBox, mainUnitField}, - new Component[]{isCustomSecUnitBox, secUnitField}, + new Component[]{minCheckBox}, + new Component[]{minValueField}, + new Component[]{maxCheckBox}, + new Component[]{maxValueField}, + new Component[]{isCustomMainUnitBox}, + new Component[]{mainUnitField}, + new Component[]{isCustomSecUnitBox}, + new Component[]{secUnitField}, }; } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java index e497bcb80f..f798a0a07d 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java @@ -151,10 +151,11 @@ public class ChartValuePane extends ChartAxisUsePane{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f}; - double[] rowSize = { p, p}; + double[] rowSize = { p, p, p}; Component[][] component = new Component[][]{ new Component[]{null,initMinMaxValue(),null}, - new Component[]{null, addLogarithmicPane2ValuePane(), addLogText()}, + new Component[]{null, addLogarithmicPane2ValuePane(), null}, + new Component[]{null, null, addLogText()}, }; return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize); } From 74c386e934c01c15b7b67d3edbf52b0e3593ab09 Mon Sep 17 00:00:00 2001 From: mengao Date: Mon, 27 Mar 2017 19:24:04 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/chart/axis/MinMaxValuePane.java | 18 +++++++----------- .../chart/gui/style/axis/ChartValuePane.java | 3 +-- 2 files changed, 8 insertions(+), 13 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 73235dc31f..7fc7d9db34 100644 --- a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java +++ b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java @@ -42,14 +42,14 @@ public class MinMaxValuePane extends JPanel { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p, f }; - double[] rowSize = { p, p, p, p, p, p, p, p}; + double[] rowSize = { p, p, p, p}; Component[][] components = getPanelComponents(); JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize); this.setLayout(new BorderLayout()); this.add(panel,BorderLayout.CENTER); - for(int i = 0; i < components.length; i+=2) { + for(int i = 0; i < components.length; i++) { ((UICheckBox)components[i][0]).addActionListener(new ActionListener() { @Override @@ -57,19 +57,15 @@ public class MinMaxValuePane extends JPanel { checkBoxUse(); } }); - ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i+1][0]); + ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]); } } protected Component[][] getPanelComponents() { return new Component[][]{ - new Component[]{minCheckBox}, - new Component[]{minValueField}, - new Component[]{maxCheckBox}, - new Component[]{maxValueField}, - new Component[]{isCustomMainUnitBox}, - new Component[]{mainUnitField}, - new Component[]{isCustomSecUnitBox}, - new Component[]{secUnitField}, + new Component[]{minCheckBox, minValueField}, + new Component[]{maxCheckBox, maxValueField}, + new Component[]{isCustomMainUnitBox, mainUnitField}, + new Component[]{isCustomSecUnitBox, secUnitField}, }; } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java index f798a0a07d..a83dd975a8 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java @@ -151,9 +151,8 @@ public class ChartValuePane extends ChartAxisUsePane{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f}; - double[] rowSize = { p, p, p}; + double[] rowSize = {p, p}; Component[][] component = new Component[][]{ - new Component[]{null,initMinMaxValue(),null}, new Component[]{null, addLogarithmicPane2ValuePane(), null}, new Component[]{null, null, addLogText()}, }; From e53ae9b10785e226cca6c59b59df01f9cded3b22 Mon Sep 17 00:00:00 2001 From: mengao Date: Mon, 27 Mar 2017 19:27:55 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/chart/gui/style/axis/ChartValuePane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java index a83dd975a8..f667a66dde 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java @@ -153,8 +153,8 @@ public class ChartValuePane extends ChartAxisUsePane{ double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f}; double[] rowSize = {p, p}; Component[][] component = new Component[][]{ - new Component[]{null, addLogarithmicPane2ValuePane(), null}, - new Component[]{null, null, addLogText()}, + new Component[]{null,initMinMaxValue(),null}, + new Component[]{null, addLogarithmicPane2ValuePane(), addLogText()}, }; return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize); }