public class PlasticToggleButtonUI
extends javax.swing.plaf.metal.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 java.lang.String |
HTML_KEY |
| Constructor and Description |
|---|
PlasticToggleButtonUI() |
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent b) |
void |
installDefaults(javax.swing.AbstractButton b)
In addition to the superclass we check if the border paints the focus.
|
protected boolean |
is3D(javax.swing.AbstractButton b)
Checks and answers if this button shall use a pseudo 3D effect.
|
protected boolean |
isToolBarButton(javax.swing.AbstractButton b)
Checks and answers if this is button is in a tool bar.
|
void |
paint(java.awt.Graphics g,
javax.swing.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(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle viewRect,
java.awt.Rectangle textRect,
java.awt.Rectangle iconRect)
Paints the focus close to the button's border.
|
void |
update(java.awt.Graphics g,
javax.swing.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, uninstallUIprotected static final java.lang.String HTML_KEY
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent b)
public void installDefaults(javax.swing.AbstractButton b)
installDefaults in class javax.swing.plaf.metal.MetalToggleButtonUIpublic void update(java.awt.Graphics g,
javax.swing.JComponent c)
update in class javax.swing.plaf.metal.MetalToggleButtonUIprotected void paintFocus(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle viewRect,
java.awt.Rectangle textRect,
java.awt.Rectangle iconRect)
paintFocus in class javax.swing.plaf.metal.MetalToggleButtonUIpublic void paint(java.awt.Graphics g,
javax.swing.JComponent c)
paint in class javax.swing.plaf.basic.BasicToggleButtonUIprotected boolean isToolBarButton(javax.swing.AbstractButton b)
b - the button to checkprotected boolean is3D(javax.swing.AbstractButton b)
b - the button to checkCopyright © 2001-2009 JGoodies Karsten Lentzsch. All Rights Reserved.