Class DarkToggleButtonUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- javax.swing.plaf.basic.BasicButtonUI
-
- com.github.weisj.darklaf.ui.button.DarkButtonUI
-
- com.github.weisj.darklaf.ui.togglebutton.DarkToggleButtonUI
-
- All Implemented Interfaces:
ButtonConstants
,ToggleButtonConstants
public class DarkToggleButtonUI extends DarkButtonUI implements ToggleButtonConstants
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.weisj.darklaf.ui.button.DarkButtonUI
DarkButtonUI.ButtonLayoutDelegate
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
background
protected Color
backgroundInactive
protected Color
borderColor
protected Color
focusBorderColor
protected Color
inactiveBorderColor
protected Color
inactiveSliderBorderColor
protected Color
inactiveSliderColor
protected Color
selectedForeground
protected Color
sliderBorderColor
protected Color
sliderColor
protected Dimension
sliderSize
-
Fields inherited from class com.github.weisj.darklaf.ui.button.DarkButtonUI
altArc, arc, borderlessClick, borderlessHover, borderlessOutlineClick, borderlessOutlineHover, borderSize, button, clickBackground, defaultBackground, defaultClickBackground, defaultForeground, defaultHoverBackground, drawOutline, hitArea, hoverBackground, iconRect, inactiveBackground, inactiveForeground, keyboardActions, layoutDelegate, shadowColor, shadowHeight, textRect, viewRect
-
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
Fields inherited from interface com.github.weisj.darklaf.ui.button.ButtonConstants
KEY_ALT_ARC, KEY_BOTTOM_LEFT_NEIGHBOUR, KEY_BOTTOM_NEIGHBOUR, KEY_BOTTOM_RIGHT_NEIGHBOUR, KEY_CLICK_COLOR, KEY_CORNER, KEY_HOVER_COLOR, KEY_LEFT_NEIGHBOUR, KEY_NO_ARC, KEY_NO_BORDERLESS_OVERWRITE, KEY_RIGHT_NEIGHBOUR, KEY_ROUND, KEY_SQUARE, KEY_THIN, KEY_TOP_LEFT_NEIGHBOUR, KEY_TOP_NEIGHBOUR, KEY_TOP_RIGHT_NEIGHBOUR, KEY_VARIANT, VARIANT_BORDERLESS, VARIANT_BORDERLESS_RECTANGULAR, VARIANT_NONE
-
Fields inherited from interface com.github.weisj.darklaf.ui.togglebutton.ToggleButtonConstants
KEY_CLEAR_HIT_AREA, KEY_IS_TABLE_EDITOR, KEY_IS_TABLE_RENDERER, KEY_IS_TREE_EDITOR, KEY_IS_TREE_RENDERER, KEY_VARIANT, KEY_VERTICAL_ICON_OFFSET, VARIANT_SLIDER
-
-
Constructor Summary
Constructors Constructor Description DarkToggleButtonUI()
-
Method Summary
Modifier and Type Method Description boolean
contains(JComponent c, int x, int y)
protected BasicButtonListener
createButtonListener(AbstractButton b)
static ComponentUI
createUI(JComponent c)
protected Color
getBackgroundColor(JComponent c)
protected Color
getForeground(AbstractButton button)
Dimension
getPreferredSize(JComponent c)
protected Color
getSliderBorderColor(AbstractButton b)
protected Rectangle
getSliderBounds(JComponent c)
protected Color
getSliderColor(AbstractButton b)
protected Color
getToggleBorderColor(AbstractButton b)
protected void
installDefaults(AbstractButton b)
protected boolean
isArmedBorderless(AbstractButton b)
protected boolean
isRolloverBorderless(AbstractButton b)
void
paint(Graphics g, JComponent c)
-
Methods inherited from class com.github.weisj.darklaf.ui.button.DarkButtonUI
getArc, getBorderlessBackground, getBorderlessOutline, getEffectiveRect, installListeners, installUI, layout, paintBorderlessBackground, paintButtonBackground, paintDefaultBackground, paintIcon, paintText, prepareDelegate, repaintNeighbours, shouldDrawBackground, uninstallListeners
-
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
Field Detail
-
sliderSize
protected Dimension sliderSize
-
background
protected Color background
-
backgroundInactive
protected Color backgroundInactive
-
focusBorderColor
protected Color focusBorderColor
-
borderColor
protected Color borderColor
-
inactiveBorderColor
protected Color inactiveBorderColor
-
sliderColor
protected Color sliderColor
-
inactiveSliderColor
protected Color inactiveSliderColor
-
sliderBorderColor
protected Color sliderBorderColor
-
inactiveSliderBorderColor
protected Color inactiveSliderBorderColor
-
selectedForeground
protected Color selectedForeground
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installDefaults
protected void installDefaults(AbstractButton b)
- Overrides:
installDefaults
in classDarkButtonUI
-
createButtonListener
protected BasicButtonListener createButtonListener(AbstractButton b)
- Overrides:
createButtonListener
in classDarkButtonUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paint
in classDarkButtonUI
-
getForeground
protected Color getForeground(AbstractButton button)
- Overrides:
getForeground
in classDarkButtonUI
-
getBackgroundColor
protected Color getBackgroundColor(JComponent c)
- Overrides:
getBackgroundColor
in classDarkButtonUI
-
isRolloverBorderless
protected boolean isRolloverBorderless(AbstractButton b)
- Overrides:
isRolloverBorderless
in classDarkButtonUI
-
isArmedBorderless
protected boolean isArmedBorderless(AbstractButton b)
- Overrides:
isArmedBorderless
in classDarkButtonUI
-
getToggleBorderColor
protected Color getToggleBorderColor(AbstractButton b)
-
getSliderColor
protected Color getSliderColor(AbstractButton b)
-
getSliderBorderColor
protected Color getSliderBorderColor(AbstractButton b)
-
getSliderBounds
protected Rectangle getSliderBounds(JComponent c)
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
getPreferredSize
in classDarkButtonUI
-
contains
public boolean contains(JComponent c, int x, int y)
- Overrides:
contains
in classDarkButtonUI
-
-