|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.basic.BasicToggleButtonUI
javax.swing.plaf.metal.MetalToggleButtonUI
com.jgoodies.looks.plastic.PlasticToggleButtonUI
public class PlasticToggleButtonUI
The JGoodies Plastic L&F implementation of ToggleButtonUI
.
It differs from its superclass in that it can add a pseudo 3D effect,
and that it listens to the jgoodies.isNarrow
property to
choose an appropriate margin.
Options.IS_NARROW_KEY
Field Summary | |
---|---|
protected static String |
HTML_KEY
|
Fields inherited from class javax.swing.plaf.metal.MetalToggleButtonUI |
---|
disabledTextColor, focusColor, selectColor |
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
defaultTextIconGap, defaultTextShiftOffset |
Constructor Summary | |
---|---|
PlasticToggleButtonUI()
|
Method Summary | |
---|---|
static ComponentUI |
createUI(JComponent b)
|
void |
installDefaults(AbstractButton b)
Installs defaults and honors the client property isNarrow . |
void |
installListeners(AbstractButton b)
Installs an extra listener for a change of the isNarrow property. |
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 |
uninstallListeners(AbstractButton b)
Uninstalls the extra listener for a change of the isNarrow property. |
void |
update(Graphics g,
JComponent c)
|
Methods inherited from class javax.swing.plaf.metal.MetalToggleButtonUI |
---|
getDisabledTextColor, getFocusColor, getSelectColor, paintButtonPressed, paintIcon, paintText, uninstallDefaults |
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI |
---|
getPropertyPrefix, getTextShiftOffset |
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUI |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String HTML_KEY
Constructor Detail |
---|
public PlasticToggleButtonUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent b)
public void installDefaults(AbstractButton b)
isNarrow
.
installDefaults
in class MetalToggleButtonUI
public void installListeners(AbstractButton b)
installListeners
in class BasicButtonUI
public void uninstallListeners(AbstractButton b)
uninstallListeners
in class BasicButtonUI
public void update(Graphics g, JComponent c)
update
in class MetalToggleButtonUI
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
paintFocus
in class MetalToggleButtonUI
public void paint(Graphics g, JComponent c)
paint
in class BasicToggleButtonUI
protected boolean isToolBarButton(AbstractButton b)
b
- the button to check
protected boolean is3D(AbstractButton b)
b
- the button to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |