com.jgoodies.looks.plastic
Class PlasticButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.metal.MetalButtonUI
com.jgoodies.looks.plastic.PlasticButtonUI
public class PlasticButtonUI
- extends MetalButtonUI
The JGoodies Plastic L&F implementation of ButtonUI
.
It differs from the superclass MetalButtonUI
in that
it can add a pseudo 3D effect and that the border can paint the focus.
- Version:
- $Revision: 1.4 $
- Author:
- Karsten Lentzsch
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI |
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paint, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlasticButtonUI
public PlasticButtonUI()
createUI
public static ComponentUI createUI(JComponent b)
installDefaults
public void installDefaults(AbstractButton b)
- Installs defaults.
- Overrides:
installDefaults
in class MetalButtonUI
update
public void update(Graphics g,
JComponent c)
- Overrides:
update
in class MetalButtonUI
paintFocus
protected void paintFocus(Graphics g,
AbstractButton b,
Rectangle viewRect,
Rectangle textRect,
Rectangle iconRect)
- Paints the focus with close to the button's border.
- Overrides:
paintFocus
in class MetalButtonUI
isToolBarButton
protected boolean isToolBarButton(AbstractButton b)
- Checks and answers if this is button is in a tool bar.
- Parameters:
b
- the button to check
- Returns:
- true if in tool bar, false otherwise
is3D
protected boolean is3D(AbstractButton b)
- Checks and answers if this button shall use a pseudo 3D effect.
- Parameters:
b
- the button to check
- Returns:
- true indicates a 3D effect, false flat
Copyright © 2001-2007 JGoodies Karsten Lentzsch. All Rights Reserved.