From 18c5708343c4b54ba1ea35f579e90b912346a2a6 Mon Sep 17 00:00:00 2001 From: mengao Date: Mon, 27 Mar 2017 18:38:35 +0800 Subject: [PATCH] =?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 4a9be221d..73235dc31 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 e497bcb80..f798a0a07 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); }