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.
SlidingButtondefaultTextIconGap, 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, paintIconclearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, installDefaults, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCount, updateprotected SlidingButtonUI()
public static ComponentUI createUI(JComponent c)
protected String getPropertyPrefix()
getPropertyPrefix in class BasicToggleButtonUIpublic void paint(Graphics g, JComponent c)
paint in class BasicToggleButtonUIprotected void paintBackground(Graphics2D g, AbstractButton b)
public Dimension getMinimumSize(JComponent c)
getMinimumSize in class BasicButtonUIpublic Dimension getPreferredSize(JComponent c)
getPreferredSize in class BasicButtonUIpublic Dimension getMaximumSize(JComponent c)
getMaximumSize in class BasicButtonUIBuilt on May 20 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.