org.jvnet.substance
Class SubstanceToggleButtonUI

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.basic.BasicToggleButtonUI
                  extended by javax.swing.plaf.metal.MetalToggleButtonUI
                      extended by org.jvnet.substance.SubstanceToggleButtonUI

public class SubstanceToggleButtonUI
extends MetalToggleButtonUI

UI for toggle buttons in Substance look and feel.

Author:
Kirill Grouchnikov

Field Summary
 
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
SubstanceToggleButtonUI()
          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)
           
protected  void paintText(Graphics g, JComponent c, Rectangle textRect, String text)
           
 void update(Graphics g, JComponent c)
           
 
Methods inherited from class javax.swing.plaf.metal.MetalToggleButtonUI
getDisabledTextColor, getFocusColor, getSelectColor, paintIcon, uninstallDefaults
 
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getPropertyPrefix, getTextShiftOffset, paint
 
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installListeners, installUI, 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
 

Constructor Detail

SubstanceToggleButtonUI

public SubstanceToggleButtonUI()
Simple constructor.

Method Detail

createUI

public static ComponentUI createUI(JComponent b)

installDefaults

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

createButtonListener

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

update

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

paintFocus

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

paintButtonPressed

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

paintText

protected void paintText(Graphics g,
                         JComponent c,
                         Rectangle textRect,
                         String text)
Overrides:
paintText in class MetalToggleButtonUI

getPreferredSize

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