From 74c386e934c01c15b7b67d3edbf52b0e3593ab09 Mon Sep 17 00:00:00 2001 From: mengao Date: Mon, 27 Mar 2017 19:24:04 +0800 Subject: [PATCH] =?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()}, };