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 StringarrowTypeprotected ColorbuttonArrowColorprotected ColorbuttonBackgroundprotected ColorbuttonDisabledArrowColorprotected ColorbuttonDisabledSeparatorColorprotected ColorbuttonHoverArrowColorprotected ColorbuttonPressedArrowColorprotected ColorbuttonSeparatorColorprotected floatbuttonSeparatorWidthprotected StringbuttonStyleprotected ColordisabledBackgroundprotected ColordisabledForegroundprotected ColorfocusedBackgroundprotected booleanisIntelliJThemeprotected intminimumWidthprotected Insetspadding-
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:
installUIin classBasicSpinnerUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classBasicSpinnerUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaultsin classBasicSpinnerUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classBasicSpinnerUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin 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:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
createEditor
protected JComponent createEditor()
- Overrides:
createEditorin classBasicSpinnerUI
-
replaceEditor
protected void replaceEditor(JComponent oldEditor, JComponent newEditor)
- Overrides:
replaceEditorin 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:
createLayoutin classBasicSpinnerUI
-
createNextButton
protected Component createNextButton()
- Overrides:
createNextButtonin classBasicSpinnerUI
-
createPreviousButton
protected Component createPreviousButton()
- Overrides:
createPreviousButtonin classBasicSpinnerUI
-
update
public void update(Graphics g, JComponent c)
- Overrides:
updatein classComponentUI
-
-