BasicToggleButtonUI (Java 2 Platform SE 5.0) (original) (raw)
javax.swing.plaf.basic
Class BasicToggleButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.basic.BasicToggleButtonUI
Direct Known Subclasses:
BasicRadioButtonUI, MetalToggleButtonUI
public class BasicToggleButtonUI
extends BasicButtonUI
BasicToggleButton implementation
Field Summary |
---|
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
defaultTextIconGap, defaultTextShiftOffset |
Constructor Summary |
---|
BasicToggleButtonUI() |
Method Summary | |
---|---|
static ComponentUI | createUI(JComponent b) |
protected String | getPropertyPrefix() |
protected int | getTextShiftOffset() Overriden so that the text will not be rendered as shifted for Toggle buttons and subclasses. |
void | [paint](../../../../javax/swing/plaf/basic/BasicToggleButtonUI.html#paint%28java.awt.Graphics, javax.swing.JComponent%29)(Graphics g,JComponent c) Paints the specified component appropriate for the look and feel. |
protected void | [paintIcon](../../../../javax/swing/plaf/basic/BasicToggleButtonUI.html#paintIcon%28java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle%29)(Graphics g,AbstractButton b,Rectangle iconRect) |
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI |
---|
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, installDefaults, installKeyboardActions, installListeners, installUI, [paintButtonPressed](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintButtonPressed%28java.awt.Graphics, javax.swing.AbstractButton%29), [paintFocus](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintFocus%28java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle%29), [paintIcon](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintIcon%28java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle%29), [paintText](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintText%28java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.lang.String%29), [paintText](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintText%28java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle, java.lang.String%29), setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
[contains](../../../../javax/swing/plaf/ComponentUI.html#contains%28javax.swing.JComponent, int, int%29), [getAccessibleChild](../../../../javax/swing/plaf/ComponentUI.html#getAccessibleChild%28javax.swing.JComponent, int%29), getAccessibleChildrenCount, [update](../../../../javax/swing/plaf/ComponentUI.html#update%28java.awt.Graphics, javax.swing.JComponent%29) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, [wait](../../../../java/lang/Object.html#wait%28long, int%29) |
Constructor Detail |
---|
BasicToggleButtonUI
public BasicToggleButtonUI()
Method Detail |
---|
createUI
public static ComponentUI createUI(JComponent b)
getPropertyPrefix
protected String getPropertyPrefix()
Overrides:
[getPropertyPrefix](../../../../javax/swing/plaf/basic/BasicButtonUI.html#getPropertyPrefix%28%29)
in class [BasicButtonUI](../../../../javax/swing/plaf/basic/BasicButtonUI.html "class in javax.swing.plaf.basic")
paint
public void paint(Graphics g, JComponent c)
Description copied from class: [ComponentUI](../../../../javax/swing/plaf/ComponentUI.html#paint%28java.awt.Graphics, javax.swing.JComponent%29)
Paints the specified component appropriate for the look and feel. This method is invoked from the ComponentUI.update
method when the specified component is being painted. Subclasses should override this method and use the specified Graphics
object to render the content of the component.
Overrides:
[paint](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paint%28java.awt.Graphics, javax.swing.JComponent%29)
in class [BasicButtonUI](../../../../javax/swing/plaf/basic/BasicButtonUI.html "class in javax.swing.plaf.basic")
Parameters:
g
- the Graphics
context in which to paint
c
- the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
[ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)](../../../../javax/swing/plaf/ComponentUI.html#update%28java.awt.Graphics, javax.swing.JComponent%29)
paintIcon
protected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
getTextShiftOffset
protected int getTextShiftOffset()
Overriden so that the text will not be rendered as shifted for Toggle buttons and subclasses.
Overrides:
[getTextShiftOffset](../../../../javax/swing/plaf/basic/BasicButtonUI.html#getTextShiftOffset%28%29)
in class [BasicButtonUI](../../../../javax/swing/plaf/basic/BasicButtonUI.html "class in javax.swing.plaf.basic")
Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.