From 908d9baca0247f9bce0a48d1da08200472b00ab2 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 17 Nov 2022 16:00:29 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-83391=20=E6=9B=B4=E6=96=B0=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/ui/topparam/MobileTopParamPane.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java index 60647c74ea..8330d2aca5 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java @@ -11,8 +11,6 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.mobile.impl.MobileTopParamStyle; import javax.swing.JPanel; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; import java.awt.BorderLayout; import java.awt.Component; import java.awt.FlowLayout; @@ -23,11 +21,11 @@ public class MobileTopParamPane extends BasicBeanPane { private UICheckBox autoCommitCheckBox; private UISpinner maxDirectShowCountSpinner; private UILabel showCountTextField; - private static final int MAX_VALUE = 4; - private static final int MAX_VALUE_AUTO = 3; + private static final int MAX_VALUE_AUTO = 4; + private static final int MAX_VALUE = 3; private static final int MIN_VALUE = 1; private static final int DEFAULT_DIERTA = 1; - private static final int DEFAULT_VALUE = 0; + private static final int DEFAULT_VALUE = 4; private static final int GAP = 2; public MobileTopParamPane() { @@ -39,7 +37,7 @@ public class MobileTopParamPane extends BasicBeanPane { JPanel panel = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Plugin-TopParam_Setting")); panel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); autoCommitCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Plugin-TopParam_AutoCommit"), true); - maxDirectShowCountSpinner = new UISpinner(MIN_VALUE, MAX_VALUE, DEFAULT_DIERTA, DEFAULT_VALUE); + maxDirectShowCountSpinner = new UISpinner(MIN_VALUE, MAX_VALUE_AUTO, DEFAULT_DIERTA, DEFAULT_VALUE); showCountTextField = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Widget_Show_Count")); Component[][] components = {{autoCommitCheckBox},{showCountTextField, maxDirectShowCountSpinner}}; double p = TableLayout.PREFERRED; @@ -54,12 +52,12 @@ public class MobileTopParamPane extends BasicBeanPane { @Override public void actionPerformed(ActionEvent e) { if (!autoCommitCheckBox.isSelected()) { - maxDirectShowCountSpinner.setMaxValue(MAX_VALUE_AUTO); - if (maxDirectShowCountSpinner.getValue() >= MAX_VALUE) { - maxDirectShowCountSpinner.setValue(MAX_VALUE_AUTO); + maxDirectShowCountSpinner.setMaxValue(MAX_VALUE); + if (maxDirectShowCountSpinner.getValue() >= MAX_VALUE_AUTO) { + maxDirectShowCountSpinner.setValue(MAX_VALUE); } } else { - maxDirectShowCountSpinner.setMaxValue(MAX_VALUE); + maxDirectShowCountSpinner.setMaxValue(MAX_VALUE_AUTO); } } });