public class SlidingButtonUI extends BasicToggleButtonUI
paintBackground
and paintIconAndText
.
Instances of this class should be stateless, taking all data from model, such that a single instance can manage any number of buttons.
SlidingButton
defaultTextIconGap, defaultTextShiftOffset
Modifier | Constructor and Description |
---|---|
protected |
SlidingButtonUI()
Private, no need for outer classes to instantiate
|
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent c) |
Dimension |
getMaximumSize(JComponent c) |
Dimension |
getMinimumSize(JComponent c) |
Dimension |
getPreferredSize(JComponent c) |
protected String |
getPropertyPrefix() |
void |
paint(Graphics g,
JComponent c) |
protected void |
paintBackground(Graphics2D g,
AbstractButton b) |
getTextShiftOffset, paintIcon
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, installDefaults, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
protected SlidingButtonUI()
public static ComponentUI createUI(JComponent c)
protected String getPropertyPrefix()
getPropertyPrefix
in class BasicToggleButtonUI
public void paint(Graphics g, JComponent c)
paint
in class BasicToggleButtonUI
protected void paintBackground(Graphics2D g, AbstractButton b)
public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class BasicButtonUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class BasicButtonUI
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class BasicButtonUI