org.jvnet.substance
Class SubstanceButtonUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ButtonUI
          extended by javax.swing.plaf.basic.BasicButtonUI
              extended by javax.swing.plaf.metal.MetalButtonUI
                  extended by org.jvnet.substance.SubstanceButtonUI

public class SubstanceButtonUI
extends MetalButtonUI

UI for buttons in Substance look and feel.

Author:
Kirill Grouchnikov

Field Summary
static int DEFAULT_HEIGHT
          The default height of button
static int DEFAULT_WIDTH
          The default width of button
 
Fields inherited from class javax.swing.plaf.metal.MetalButtonUI
disabledTextColor, focusColor, selectColor
 
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
 
Constructor Summary
SubstanceButtonUI()
          Simple constructor.
 
Method Summary
protected  BasicButtonListener createButtonListener(AbstractButton b)
           
static ComponentUI createUI(JComponent b)
           
 Dimension getPreferredSize(JComponent c)
           
 void installDefaults(AbstractButton b)
           
protected  void paintButtonPressed(Graphics g, AbstractButton b)
           
protected  void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
           
 void update(Graphics g, JComponent c)
           
 
Methods inherited from class javax.swing.plaf.metal.MetalButtonUI
getDisabledTextColor, getFocusColor, getSelectColor, paintText, uninstallDefaults
 
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paint, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, 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

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
The default width of button

See Also:
Constant Field Values

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
The default height of button

See Also:
Constant Field Values
Constructor Detail

SubstanceButtonUI

public SubstanceButtonUI()
Simple constructor.

Method Detail

createUI

public static ComponentUI createUI(JComponent b)

installDefaults

public void installDefaults(AbstractButton b)
Overrides:
installDefaults in class MetalButtonUI

createButtonListener

protected BasicButtonListener createButtonListener(AbstractButton b)
Overrides:
createButtonListener in class MetalButtonUI

update

public void update(Graphics g,
                   JComponent c)
Overrides:
update in class MetalButtonUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicButtonUI

paintFocus

protected void paintFocus(Graphics g,
                          AbstractButton b,
                          Rectangle viewRect,
                          Rectangle textRect,
                          Rectangle iconRect)
Overrides:
paintFocus in class MetalButtonUI

paintButtonPressed

protected void paintButtonPressed(Graphics g,
                                  AbstractButton b)
Overrides:
paintButtonPressed in class MetalButtonUI