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
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.formdev.flatlaf.ui.FlatButtonUI
FlatButtonUI.FlatButtonListener
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
defaults_initialized
protected java.awt.Color
tabDisabledUnderlineColor
protected java.awt.Color
tabFocusBackground
protected java.awt.Color
tabFocusForeground
protected java.awt.Color
tabHoverBackground
protected java.awt.Color
tabHoverForeground
protected java.awt.Color
tabSelectedBackground
protected java.awt.Color
tabSelectedForeground
protected java.awt.Color
tabUnderlineColor
protected int
tabUnderlineHeight
-
Fields inherited from class com.formdev.flatlaf.ui.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, toolbarSelectedForeground, TYPE_OTHER, TYPE_ROUND_RECT, TYPE_SQUARE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FlatToggleButtonUI(boolean shared)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
applyStyleProperty(javax.swing.AbstractButton b, java.lang.String key, java.lang.Object value)
static javax.swing.plaf.ComponentUI
createUI(javax.swing.JComponent c)
protected java.awt.Color
getForeground(javax.swing.JComponent c)
protected java.lang.String
getPropertyPrefix()
java.util.Map<java.lang.String,java.lang.Class<?>>
getStyleableInfos(javax.swing.JComponent c)
(package private) java.lang.String
getStyleType()
protected void
installDefaults(javax.swing.AbstractButton b)
(package private) static boolean
isTabButton(java.awt.Component c)
protected void
paintBackground(java.awt.Graphics g, javax.swing.JComponent c)
protected void
propertyChange(javax.swing.AbstractButton b, java.beans.PropertyChangeEvent e)
protected void
uninstallDefaults(javax.swing.AbstractButton b)
-
Methods inherited from class com.formdev.flatlaf.ui.FlatButtonUI
applyStyle, buttonStateColor, createButtonListener, getBackground, getBackgroundBase, getBaseline, getBaselineImpl, getButtonType, getButtonTypeStr, getForegroundBase, getPreferredSize, getStyleableValue, installStyle, installUI, isBorderlessButton, isContentAreaFilled, isCustomBackground, isCustomForeground, isDefaultButton, isFocusPainted, isHelpButton, isIconOnlyOrSingleCharacterButton, isToolBarButton, paint, paintIcon, paintText, paintText, update
-
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
-
-
-
Field Detail
-
tabUnderlineHeight
protected int tabUnderlineHeight
-
tabUnderlineColor
protected java.awt.Color tabUnderlineColor
-
tabDisabledUnderlineColor
protected java.awt.Color tabDisabledUnderlineColor
-
tabSelectedBackground
protected java.awt.Color tabSelectedBackground
-
tabSelectedForeground
protected java.awt.Color tabSelectedForeground
- Since:
- 2.3
-
tabHoverBackground
protected java.awt.Color tabHoverBackground
-
tabHoverForeground
protected java.awt.Color tabHoverForeground
- Since:
- 2.3
-
tabFocusBackground
protected java.awt.Color tabFocusBackground
-
tabFocusForeground
protected java.awt.Color tabFocusForeground
- Since:
- 2.3
-
defaults_initialized
private boolean defaults_initialized
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
-
getStyleType
java.lang.String getStyleType()
- Overrides:
getStyleType
in classFlatButtonUI
-
getPropertyPrefix
protected java.lang.String getPropertyPrefix()
- Overrides:
getPropertyPrefix
in classjavax.swing.plaf.basic.BasicButtonUI
-
installDefaults
protected void installDefaults(javax.swing.AbstractButton b)
- Overrides:
installDefaults
in classFlatButtonUI
-
uninstallDefaults
protected void uninstallDefaults(javax.swing.AbstractButton b)
- Overrides:
uninstallDefaults
in classFlatButtonUI
-
propertyChange
protected void propertyChange(javax.swing.AbstractButton b, java.beans.PropertyChangeEvent e)
- Overrides:
propertyChange
in classFlatButtonUI
-
applyStyleProperty
protected java.lang.Object applyStyleProperty(javax.swing.AbstractButton b, java.lang.String key, java.lang.Object value)
- Overrides:
applyStyleProperty
in classFlatButtonUI
- Since:
- 2
-
getStyleableInfos
public java.util.Map<java.lang.String,java.lang.Class<?>> getStyleableInfos(javax.swing.JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Overrides:
getStyleableInfos
in classFlatButtonUI
- Since:
- 2
-
isTabButton
static boolean isTabButton(java.awt.Component c)
-
paintBackground
protected void paintBackground(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
paintBackground
in classFlatButtonUI
-
getForeground
protected java.awt.Color getForeground(javax.swing.JComponent c)
- Overrides:
getForeground
in classFlatButtonUI
-
-