From 197e290fe3107c47e4ad04617e15a689ef843a6d Mon Sep 17 00:00:00 2001 From: momeak Date: Fri, 15 Sep 2017 15:06:36 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4604=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E4=BF=AE=E6=94=B9=20=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E7=9A=84JSpinner=E7=9A=84UI=E6=94=B9=E4=BA=86=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/ispinner/UISpinnerUI.java | 10 ++++++---- .../src/com/fr/design/mainframe/JSliderPane.java | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/ispinner/UISpinnerUI.java b/designer_base/src/com/fr/design/gui/ispinner/UISpinnerUI.java index 3a333bbf1e..2c32a00aef 100644 --- a/designer_base/src/com/fr/design/gui/ispinner/UISpinnerUI.java +++ b/designer_base/src/com/fr/design/gui/ispinner/UISpinnerUI.java @@ -5,7 +5,9 @@ package com.fr.design.gui.ispinner; +import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.SpecialUIButton; +import com.fr.design.gui.ibutton.UIButton; import javax.swing.*; import javax.swing.plaf.ComponentUI; @@ -42,8 +44,8 @@ public class UISpinnerUI extends BasicSpinnerUI { } protected Component createPreviousButton() { - JButton b = new SpecialUIButton(new UISpinnerButtonUI(SwingConstants.SOUTH)); - +// JButton b = new SpecialUIButton(new UISpinnerButtonUI(SwingConstants.SOUTH)); + JButton b = new UIButton(UIConstants.ARROW_DOWN_ICON); b.putClientProperty("isSpinnerButton", Boolean.TRUE); b.setFocusable(false); b.addActionListener(PREVIOUS_BUTTON_HANDLER); @@ -53,8 +55,8 @@ public class UISpinnerUI extends BasicSpinnerUI { } protected Component createNextButton() { - JButton b = new SpecialUIButton(new UISpinnerButtonUI(SwingConstants.NORTH)); - +// JButton b = new SpecialUIButton(new UISpinnerButtonUI(SwingConstants.NORTH)); + JButton b = new UIButton(UIConstants.ARROW_UP_ICON); b.putClientProperty("isSpinnerButton", Boolean.TRUE); b.setFocusable(false); b.addActionListener(NEXT_BUTTON_HANDLER); diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 1583ca7700..bccf3c8f86 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -8,6 +8,7 @@ import com.fr.design.gui.ibutton.UISliderButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.islider.UISlider; import com.fr.design.gui.ispinner.UIBasicSpinner; +import com.fr.design.gui.ispinner.UISpinnerUI; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -132,6 +133,7 @@ public class JSliderPane extends JPanel { return new Point(event.getX(), event.getY() - TOOLTIP_Y); } }; + showValSpinner.setUI(new UISpinnerUI()); showValSpinner.setEnabled(true); showValSpinner.addChangeListener(showValSpinnerChangeListener); showValSpinner.setPreferredSize(new Dimension(SPINNER_WIDTH, SPINNER_HEIGHT));