Package com.formdev.flatlaf.ui
Class FlatSpinnerUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.SpinnerUI
-
- javax.swing.plaf.basic.BasicSpinnerUI
-
- com.formdev.flatlaf.ui.FlatSpinnerUI
-
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
public class FlatSpinnerUI extends BasicSpinnerUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJSpinner
.- UiDefault:
- Spinner.font Font, Spinner.background Color, Spinner.foreground Color, Spinner.border Border, Spinner.disableOnBoundaryValues boolean default is false, Spinner.editorAlignment int 0=center, 2=left, 4=right, 10=leading, 11=trailing, Spinner.editorBorderPainted boolean paint inner editor border; defaults to false , Component.minimumWidth int, Spinner.buttonStyle String button (default), mac or none, Component.arrowType String chevron (default) or triangle, Component.isIntelliJTheme boolean, Spinner.disabledBackground Color, Spinner.disabledForeground Color, Spinner.focusedBackground Color optional, Spinner.buttonBackground Color optional, Spinner.buttonSeparatorWidth int or float optional; defaults to Component.borderWidth, Spinner.buttonSeparatorColor Color optional, Spinner.buttonDisabledSeparatorColor Color optional, Spinner.buttonArrowColor Color, Spinner.buttonDisabledArrowColor Color, Spinner.buttonHoverArrowColor Color, Spinner.buttonPressedArrowColor Color, Spinner.padding Insets
-
-
Field Summary
Fields Modifier and Type Field Description protected String
arrowType
protected Color
buttonArrowColor
protected Color
buttonBackground
protected Color
buttonDisabledArrowColor
protected Color
buttonDisabledSeparatorColor
protected Color
buttonHoverArrowColor
protected Color
buttonPressedArrowColor
protected Color
buttonSeparatorColor
protected float
buttonSeparatorWidth
protected String
buttonStyle
protected Color
disabledBackground
protected Color
disabledForeground
protected Color
focusedBackground
protected boolean
isIntelliJTheme
protected int
minimumWidth
protected Insets
padding
-
Fields inherited from class javax.swing.plaf.basic.BasicSpinnerUI
spinner
-
-
Constructor Summary
Constructors Constructor Description FlatSpinnerUI()
-
Method Summary
-
Methods inherited from class javax.swing.plaf.basic.BasicSpinnerUI
createPropertyChangeListener, getBaseline, getBaselineResizeBehavior, installKeyboardActions, installNextButtonListeners, installPreviousButtonListeners, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint
-
-
-
-
Field Detail
-
minimumWidth
protected int minimumWidth
-
buttonStyle
protected String buttonStyle
-
arrowType
protected String arrowType
-
isIntelliJTheme
protected boolean isIntelliJTheme
-
disabledBackground
protected Color disabledBackground
-
disabledForeground
protected Color disabledForeground
-
focusedBackground
protected Color focusedBackground
-
buttonBackground
protected Color buttonBackground
-
buttonSeparatorWidth
protected float buttonSeparatorWidth
- Since:
- 2
-
buttonSeparatorColor
protected Color buttonSeparatorColor
- Since:
- 2
-
buttonDisabledSeparatorColor
protected Color buttonDisabledSeparatorColor
- Since:
- 2
-
buttonArrowColor
protected Color buttonArrowColor
-
buttonDisabledArrowColor
protected Color buttonDisabledArrowColor
-
buttonHoverArrowColor
protected Color buttonHoverArrowColor
-
buttonPressedArrowColor
protected Color buttonPressedArrowColor
-
padding
protected Insets padding
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in classBasicSpinnerUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classBasicSpinnerUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classBasicSpinnerUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classBasicSpinnerUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classBasicSpinnerUI
-
installStyle
protected void installStyle()
- Since:
- 2
-
applyStyle
protected void applyStyle(Object style)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
createEditor
protected JComponent createEditor()
- Overrides:
createEditor
in classBasicSpinnerUI
-
replaceEditor
protected void replaceEditor(JComponent oldEditor, JComponent newEditor)
- Overrides:
replaceEditor
in classBasicSpinnerUI
-
configureEditor
protected void configureEditor(JComponent editor)
- Since:
- 1.6
-
isPermanentFocusOwner
public static boolean isPermanentFocusOwner(JSpinner spinner)
- Since:
- 1.3
-
getBackground
protected Color getBackground(boolean enabled)
-
getForeground
protected Color getForeground(boolean enabled)
-
createLayout
protected LayoutManager createLayout()
- Overrides:
createLayout
in classBasicSpinnerUI
-
createNextButton
protected Component createNextButton()
- Overrides:
createNextButton
in classBasicSpinnerUI
-
createPreviousButton
protected Component createPreviousButton()
- Overrides:
createPreviousButton
in classBasicSpinnerUI
-
update
public void update(Graphics g, JComponent c)
- Overrides:
update
in classComponentUI
-
-