javax.swing.plaf.basic
public class BasicToggleButtonUI extends BasicButtonUI
JToggleButton
component.defaultTextIconGap, defaultTextShiftOffset
Constructor and Description |
---|
BasicToggleButtonUI() |
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent component)
Returns a UI delegate for the specified component.
|
protected String |
getPropertyPrefix()
Returns the prefix for entries in the
UIManager defaults table
("ToggleButton." |
void |
paint(Graphics g,
JComponent c)
Paint the component, which is an
AbstractButton , according to
its current state. |
protected void |
paintIcon(Graphics g,
AbstractButton b,
Rectangle iconRect)
Paints the icon for the toggle button.
|
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getTextShiftOffset, installDefaults, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
public BasicToggleButtonUI()
public static ComponentUI createUI(JComponent component)
component
- the component (should be an instance of
JToggleButton
).BasicToggleButtonUI
.protected String getPropertyPrefix()
UIManager
defaults table
("ToggleButton."
in this case).getPropertyPrefix
in class BasicButtonUI
"ToggleButton."
public void paint(Graphics g, JComponent c)
AbstractButton
, according to
its current state.paint
in class BasicButtonUI
g
- The graphics context to paint withc
- The component to paint the state ofprotected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
BasicButtonUI.paintIcon(Graphics, JComponent, Rectangle)
.g
- the graphics contextb
- the button to paint the icon foriconRect
- the area allocated for the icon