public class PlasticToggleButtonUI extends MetalToggleButtonUI
ToggleButtonUI.
It differs from its superclass in that it can add a pseudo 3D effect,
and that the border can paint the focus.| Modifier and Type | Field and Description |
|---|---|
protected static String |
HTML_KEY |
disabledTextColor, focusColor, selectColordefaultTextIconGap, defaultTextShiftOffset| Constructor and Description |
|---|
PlasticToggleButtonUI() |
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent b) |
void |
installDefaults(AbstractButton b)
In addition to the superclass we check if the border paints the focus.
|
protected boolean |
is3D(AbstractButton b)
Checks and answers if this button shall use a pseudo 3D effect.
|
protected boolean |
isToolBarButton(AbstractButton b)
Checks and answers if this is button is in a tool bar.
|
void |
paint(Graphics g,
JComponent c)
Unlike the BasicToggleButtonUI.paint, we don't fill the content area;
this has been done by the update method before.
|
protected void |
paintFocus(Graphics g,
AbstractButton b,
Rectangle viewRect,
Rectangle textRect,
Rectangle iconRect)
Paints the focus close to the button's border.
|
void |
update(Graphics g,
JComponent c) |
getDisabledTextColor, getFocusColor, getSelectColor, paintButtonPressed, paintIcon, paintText, uninstallDefaultsgetPropertyPrefix, getTextShiftOffsetclearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCountprotected static final String HTML_KEY
public static ComponentUI createUI(JComponent b)
public void installDefaults(AbstractButton b)
installDefaults in class MetalToggleButtonUIpublic void update(Graphics g, JComponent c)
update in class MetalToggleButtonUIprotected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
paintFocus in class MetalToggleButtonUIpublic void paint(Graphics g, JComponent c)
paint in class BasicToggleButtonUIprotected boolean isToolBarButton(AbstractButton b)
b - the button to checkprotected boolean is3D(AbstractButton b)
b - the button to checkCopyright © 2001-2014 JGoodies Software GmbH. All Rights Reserved.