Class FlatToggleButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
com.formdev.flatlaf.ui.FlatButtonUI
com.formdev.flatlaf.ui.FlatToggleButtonUI
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate for
JToggleButton.
- UiDefault:
- ToggleButton.font Font, ToggleButton.background Color, ToggleButton.foreground Color, ToggleButton.border Border, ToggleButton.margin Insets, ToggleButton.rollover boolean , Component.focusWidth int, Button.arc int, ToggleButton.minimumWidth int, ToggleButton.iconTextGap int, ToggleButton.startBackground Color optional; if set, a gradient paint is used and ToggleButton.background is ignored, ToggleButton.endBackground Color optional; if set, a gradient paint is used, ToggleButton.focusedBackground Color optional, ToggleButton.focusedForeground Color optional, ToggleButton.hoverBackground Color optional, ToggleButton.hoverForeground Color optional, ToggleButton.pressedBackground Color optional, ToggleButton.pressedForeground Color optional, ToggleButton.selectedBackground Color, ToggleButton.selectedForeground Color, ToggleButton.disabledBackground Color optional, ToggleButton.disabledText Color, ToggleButton.disabledSelectedBackground Color, ToggleButton.disabledSelectedForeground Color optional, Button.paintShadow boolean default is false, Button.shadowWidth int default is 2, Button.shadowColor Color optional, ToggleButton.toolbar.hoverBackground Color, ToggleButton.toolbar.hoverForeground Color optional, ToggleButton.toolbar.pressedBackground Color, ToggleButton.toolbar.pressedForeground Color optional, ToggleButton.toolbar.selectedBackground Color, ToggleButton.toolbar.selectedForeground Color optional, ToggleButton.toolbar.disabledSelectedBackground Color optional, ToggleButton.toolbar.disabledSelectedForeground Color optional , ToggleButton.tab.underlineHeight int, ToggleButton.tab.underlineColor Color, ToggleButton.tab.disabledUnderlineColor Color, ToggleButton.tab.selectedBackground Color optional, ToggleButton.tab.selectedForeground Color optional, ToggleButton.tab.hoverBackground Color, ToggleButton.tab.hoverForeground Color optional, ToggleButton.tab.focusBackground Color, ToggleButton.tab.focusForeground Color optional
-
Nested Class Summary
Nested classes/interfaces inherited from class FlatButtonUI
FlatButtonUI.FlatButtonListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected intFields inherited from class FlatButtonUI
background, buttonType, defaultBackground, defaultBoldText, defaultEndBackground, defaultFocusedBackground, defaultFocusedForeground, defaultForeground, defaultHoverBackground, defaultHoverForeground, defaultPressedBackground, defaultPressedForeground, defaultShadowColor, disabledBackground, disabledSelectedBackground, disabledSelectedForeground, disabledText, endBackground, focusedBackground, focusedForeground, foreground, hoverBackground, hoverForeground, iconTextGap, minimumHeight, minimumWidth, paintShadow, pressedBackground, pressedForeground, selectedBackground, selectedForeground, shadowColor, shadowWidth, squareSize, startBackground, toolbarDisabledSelectedBackground, toolbarDisabledSelectedForeground, toolbarHoverBackground, toolbarHoverForeground, toolbarPressedBackground, toolbarPressedForeground, toolbarSelectedBackground, toolbarSelectedForegroundFields inherited from class BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectapplyStyleProperty(AbstractButton b, String key, Object value) static ComponentUIprotected Colorprotected Stringprotected voidprotected voidprotected voidprotected voidMethods inherited from class FlatButtonUI
applyStyle, buttonStateColor, createButtonListener, getBackground, getBackgroundBase, getBaseline, getForegroundBase, getPreferredSize, getStyleableValue, installListeners, installStyle, installUI, isCustomBackground, isCustomForeground, isFocusPainted, paint, paintIcon, paintText, paintText, uninstallListeners, updateMethods inherited from class BasicButtonUI
clearTextShiftOffset, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, paintButtonPressed, paintFocus, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUIMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
Field Details
-
tabUnderlineHeight
protected int tabUnderlineHeight -
tabUnderlineColor
-
tabDisabledUnderlineColor
-
tabSelectedBackground
-
tabSelectedForeground
- Since:
- 2.3
-
tabHoverBackground
-
tabHoverForeground
- Since:
- 2.3
-
tabFocusBackground
-
tabFocusForeground
- Since:
- 2.3
-
-
Constructor Details
-
FlatToggleButtonUI
protected FlatToggleButtonUI(boolean shared)
-
-
Method Details
-
createUI
-
getPropertyPrefix
- Overrides:
getPropertyPrefixin classBasicButtonUI
-
installDefaults
- Overrides:
installDefaultsin classFlatButtonUI
-
uninstallDefaults
- Overrides:
uninstallDefaultsin classFlatButtonUI
-
propertyChange
- Overrides:
propertyChangein classFlatButtonUI
-
applyStyleProperty
- Overrides:
applyStylePropertyin classFlatButtonUI- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Overrides:
getStyleableInfosin classFlatButtonUI- Since:
- 2
-
paintBackground
- Overrides:
paintBackgroundin classFlatButtonUI
-
getForeground
- Overrides:
getForegroundin classFlatButtonUI
-