Package com.formdev.flatlaf.ui
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
public class FlatToggleButtonUI extends FlatButtonUI
Provides the Flat LaF UI delegate forJToggleButton.- 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.pressedBackground Color, ToggleButton.selectedBackground Color, ToggleButton.selectedForeground Color, ToggleButton.disabledBackground Color optional, ToggleButton.disabledText Color, ToggleButton.disabledSelectedBackground Color, ToggleButton.toolbar.hoverBackground Color, ToggleButton.toolbar.pressedBackground Color, ToggleButton.toolbar.selectedBackground Color , ToggleButton.tab.underlineHeight int, ToggleButton.tab.underlineColor Color, ToggleButton.tab.disabledUnderlineColor Color, ToggleButton.tab.selectedBackground Color optional, ToggleButton.tab.hoverBackground Color, ToggleButton.tab.focusBackground Color
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.formdev.flatlaf.ui.FlatButtonUI
FlatButtonUI.FlatButtonListener
-
-
Field Summary
Fields Modifier and Type Field Description protected ColortabDisabledUnderlineColorprotected ColortabFocusBackgroundprotected ColortabHoverBackgroundprotected ColortabSelectedBackgroundprotected ColortabUnderlineColorprotected inttabUnderlineHeight-
Fields inherited from class com.formdev.flatlaf.ui.FlatButtonUI
background, buttonType, defaultBackground, defaultBoldText, defaultEndBackground, defaultFocusedBackground, defaultForeground, defaultHoverBackground, defaultPressedBackground, defaultShadowColor, disabledBackground, disabledSelectedBackground, disabledText, endBackground, focusedBackground, foreground, hoverBackground, iconTextGap, minimumHeight, minimumWidth, paintShadow, pressedBackground, selectedBackground, selectedForeground, shadowColor, shadowWidth, squareSize, startBackground, toolbarHoverBackground, toolbarPressedBackground, toolbarSelectedBackground
-
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFlatToggleButtonUI(boolean shared)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectapplyStyleProperty(AbstractButton b, String key, Object value)static ComponentUIcreateUI(JComponent c)protected StringgetPropertyPrefix()Map<String,Class<?>>getStyleableInfos(JComponent c)protected voidinstallDefaults(AbstractButton b)protected voidpaintBackground(Graphics g, JComponent c)protected voidpropertyChange(AbstractButton b, PropertyChangeEvent e)protected voiduninstallDefaults(AbstractButton b)-
Methods inherited from class com.formdev.flatlaf.ui.FlatButtonUI
applyStyle, buttonStateColor, createButtonListener, getBackground, getBackgroundBase, getForeground, getPreferredSize, installStyle, installUI, isCustomBackground, isCustomForeground, isFocusPainted, paint, paintIcon, paintText, paintText, update
-
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
-
-
-
Field Detail
-
tabUnderlineHeight
protected int tabUnderlineHeight
-
tabUnderlineColor
protected Color tabUnderlineColor
-
tabDisabledUnderlineColor
protected Color tabDisabledUnderlineColor
-
tabSelectedBackground
protected Color tabSelectedBackground
-
tabHoverBackground
protected Color tabHoverBackground
-
tabFocusBackground
protected Color tabFocusBackground
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
getPropertyPrefix
protected String getPropertyPrefix()
- Overrides:
getPropertyPrefixin classBasicButtonUI
-
installDefaults
protected void installDefaults(AbstractButton b)
- Overrides:
installDefaultsin classFlatButtonUI
-
uninstallDefaults
protected void uninstallDefaults(AbstractButton b)
- Overrides:
uninstallDefaultsin classFlatButtonUI
-
propertyChange
protected void propertyChange(AbstractButton b, PropertyChangeEvent e)
- Overrides:
propertyChangein classFlatButtonUI
-
applyStyleProperty
protected Object applyStyleProperty(AbstractButton b, String key, Object value)
- Overrides:
applyStylePropertyin classFlatButtonUI- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Overrides:
getStyleableInfosin classFlatButtonUI- Since:
- 2
-
paintBackground
protected void paintBackground(Graphics g, JComponent c)
- Overrides:
paintBackgroundin classFlatButtonUI
-
-