This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.plaf.metal
class MetalToggleButtonUI

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

public class MetalToggleButtonUI
extends BasicToggleButtonUI

MetalToggleButton implementation

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.


Field Summary
protected Color disabledTextColor
          
protected Color focusColor
          
protected Color selectColor
          
 
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
 
Constructor Summary

          
 
Method Summary
static ComponentUI

          
protected Color

          
protected Color

          
protected Color

          
 void

          
protected void

          
protected void
paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)

          
protected void

          Paints the appropriate icon of the button b in the space iconRect.
protected void
paintText(Graphics g, JComponent c, Rectangle textRect, String text)

          As of Java 2 platform v 1.4 this method should not be used or overriden.
protected void

          
 void

          If necessary paints the background of the component, then invokes paint.
 
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
createUI, getPropertyPrefix, getTextShiftOffset, paint, paintIcon
 
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, createUI, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installDefaults, installKeyboardActions, installListeners, installUI, paint, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

disabledTextColor

protected Color disabledTextColor

focusColor

protected Color focusColor

selectColor

protected Color selectColor
Constructor Detail

MetalToggleButtonUI

public MetalToggleButtonUI()
Method Detail

createUI

public static ComponentUI createUI(JComponent b)
Parameters:
b

getDisabledTextColor

protected Color getDisabledTextColor()

getFocusColor

protected Color getFocusColor()

getSelectColor

protected Color getSelectColor()

installDefaults

public void installDefaults(AbstractButton b)
Overrides:
installDefaults in class BasicButtonUI
Parameters:
b

paintButtonPressed

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

paintFocus

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

paintIcon

protected void paintIcon(Graphics g,
                         AbstractButton b,
                         Rectangle iconRect)
Paints the appropriate icon of the button b in the space iconRect.

Overrides:
paintIcon in class BasicToggleButtonUI
Parameters:
g - Graphics to paint to
b - Button to render for
iconRect - space to render in

paintText

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

uninstallDefaults

protected void uninstallDefaults(AbstractButton b)
Overrides:
uninstallDefaults in class BasicButtonUI
Parameters:
b

update

public void update(Graphics g,
                   JComponent c)
If necessary paints the background of the component, then invokes paint.

Overrides:
update in class ComponentUI
Parameters:
g - Graphics to paint to
c - JComponent painting on


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.