javax.swing.plaf.metal
public class MetalToggleButtonUI extends BasicToggleButtonUI
| Field Summary | |
|---|---|
| protected Color | disabledTextColor The color for disabled button labels. |
| protected Color | focusColor The color for the focus border. |
| protected Color | selectColor The color that indicates a selected button. |
| Constructor Summary | |
|---|---|
| MetalToggleButtonUI()
Constructs a new instance of MetalToggleButtonUI. | |
| Method Summary | |
|---|---|
| static ComponentUI | createUI(JComponent component)
Returns a new instance of MetalToggleButtonUI.
|
| protected Color | getDisabledTextColor()
Returns the color for the text label of disabled buttons. |
| protected Color | getFocusColor()
Returns the color for the focus border.
|
| protected Color | getSelectColor()
Returns the color that indicates a selected button.
|
| void | installDefaults(AbstractButton b)
Updates the button with the defaults for this look and feel.
|
| protected void | paintButtonPressed(Graphics g, AbstractButton b)
Paints the button background when it is pressed/selected.
|
| protected void | paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
Draws the focus highlight around the text and icon.
|
| protected void | paintText(Graphics g, JComponent c, Rectangle textRect, String text)
Paints the text for the button.
|
| void | update(Graphics g, JComponent c)
If the property ToggleButton.gradient is set, then a gradient
is painted as background, otherwise the normal superclass behaviour is
called. |
MetalToggleButtonUI.MetalToggleButtonUI.
Parameters: component the component for which we return an UI instance
Returns: A new instance of MetalToggleButtonUI.
ToggleButton.disabledText item from the UI
defaults.
Returns: The color for the text label of disabled buttons.
Returns: the color for the focus border
Returns: the color that indicates a selected button
Parameters: b the button.
Parameters: g the graphics device. b the button.
Parameters: g the graphics device. b the button.
Parameters: g the graphics device. c the component. textRect the bounds for the text. text the text.
ToggleButton.gradient is set, then a gradient
is painted as background, otherwise the normal superclass behaviour is
called.