From 8d26f1b05807986f00e2d320fa94b37003c1a192 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 11 Jul 2022 18:30:57 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-38555=20fix:=E6=95=B0=E5=AD=97=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E5=86=85=E5=AE=B9=E5=8F=AF=E4=BB=A5=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E7=A9=BA=E6=A0=BC=E5=92=8C=E5=87=8F=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ispinner/UISpinner.java | 17 +++++++++++++++-- .../fr/design/gui/itextfield/UINumberField.java | 1 - .../component/NumberEditorValidatePane.java | 10 ++++------ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java b/designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java index 10e6e5837..22f6cb246 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java +++ b/designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java @@ -22,8 +22,19 @@ import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.plaf.ButtonUI; -import java.awt.*; -import java.awt.event.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.awt.event.MouseWheelEvent; +import java.awt.event.MouseWheelListener; public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver { @@ -61,6 +72,7 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver init(minValue, maxValue, dierta); textField.setValue(defaultValue); } + protected void init(double minValue, double maxValue, double dierta) { this.minValue = minValue; this.maxValue = maxValue; @@ -399,6 +411,7 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver public boolean shouldResponseNameListener() { return true; } + /** * 程序入口 测试 * diff --git a/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java b/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java index 5a2bda66e..f40237659 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java +++ b/designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java @@ -4,7 +4,6 @@ import com.fr.base.Utils; import com.fr.general.ComparatorUtils; import com.fr.stable.CoreConstants; import com.fr.stable.StringUtils; -import org.gradle.internal.impldep.org.junit.Test; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; diff --git a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java index 23e9d3077..d10f58e18 100644 --- a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java +++ b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java @@ -21,16 +21,14 @@ import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import javax.swing.text.AttributeSet; -import javax.swing.text.BadLocationException; -import javax.swing.text.PlainDocument; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; -import java.util.regex.Matcher; -import java.util.regex.Pattern; + /** * Created by kerry on 2017/9/10.