From db9ca2ee21f62fadab9aed9c861e848a9d8847b0 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 8 Aug 2017 09:27:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E4=BF=AE=E6=94=B9=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/ui/NumberEditorDefinePane.java | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java index 6653e723e4..a955939f0e 100644 --- a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java @@ -29,8 +29,8 @@ import com.fr.form.ui.NumberEditor; import com.fr.general.Inter; public class NumberEditorDefinePane extends FieldEditorDefinePane { - /**FieldEditorDefinePane - * + /** + * FieldEditorDefinePane */ private static final long serialVersionUID = 8011242951911686805L; private UICheckBox allowDecimalsCheckBox; @@ -198,33 +198,33 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane this.minValueSpinner.addChangeListener(changeListener2); UILabel numberLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Double", "Numbers"})); - numberLabel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); - - JPanel pane1 = new JPanel(new BorderLayout()); - pane1.add(decimalLength, BorderLayout.CENTER); - pane1.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); - JPanel pane2 = new JPanel(new BorderLayout()); - pane2.add(maxValueSpinner, BorderLayout.CENTER); - pane2.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); - JPanel pane3 = new JPanel(new BorderLayout()); - pane3.add(minValueSpinner, BorderLayout.CENTER); - pane3.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); + numberLabel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); + + JPanel decimalPane = new JPanel(new BorderLayout()); + decimalPane.add(decimalLength, BorderLayout.CENTER); + decimalPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); + JPanel maxValueSpinnerPane = new JPanel(new BorderLayout()); + maxValueSpinnerPane.add(maxValueSpinner, BorderLayout.CENTER); + maxValueSpinnerPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); + JPanel minValueSpinnerPane = new JPanel(new BorderLayout()); + minValueSpinnerPane.add(minValueSpinner, BorderLayout.CENTER); + minValueSpinnerPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{allowDecimalsCheckBox, null }, - new Component[]{numberLabel, pane1 }, + new Component[]{allowDecimalsCheckBox, null}, + new Component[]{numberLabel, decimalPane}, new Component[]{allowNegativeCheckBox, null}, - new Component[]{setMaxValueCheckBox, pane2}, - new Component[]{setMinValueCheckBox, pane3}, + new Component[]{setMaxValueCheckBox, maxValueSpinnerPane}, + new Component[]{setMinValueCheckBox, minValueSpinnerPane}, }; double[] rowSize = {p, p, p, p, p}; - double[] columnSize = {p,f}; - int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); - panel.setBorder(BorderFactory.createEmptyBorder(0,1,0,0)); - return panel; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; + JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); + pane.setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 0)); + return pane; }