javax.swing.plaf.basic
Class BasicToggleButtonUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.ButtonUI sample code for javax.swing.plaf.ButtonUI definition code for javax.swing.plaf.ButtonUI 
          extended by javax.swing.plaf.basic.BasicButtonUI sample code for javax.swing.plaf.basic.BasicButtonUI definition code for javax.swing.plaf.basic.BasicButtonUI 
              extended by javax.swing.plaf.basic.BasicToggleButtonUI
Direct Known Subclasses:
BasicRadioButtonUI sample code for javax.swing.plaf.basic.BasicRadioButtonUI definition code for javax.swing.plaf.basic.BasicRadioButtonUI , MetalToggleButtonUI sample code for javax.swing.plaf.metal.MetalToggleButtonUI definition code for javax.swing.plaf.metal.MetalToggleButtonUI

public class BasicToggleButtonUI
extends BasicButtonUI sample code for javax.swing.plaf.basic.BasicButtonUI definition code for javax.swing.plaf.basic.BasicButtonUI

BasicToggleButton implementation


Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI sample code for javax.swing.plaf.basic.BasicButtonUI definition code for javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap sample code for javax.swing.plaf.basic.BasicButtonUI.defaultTextIconGap definition code for javax.swing.plaf.basic.BasicButtonUI.defaultTextIconGap , defaultTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.defaultTextShiftOffset definition code for javax.swing.plaf.basic.BasicButtonUI.defaultTextShiftOffset
 
Constructor Summary
BasicToggleButtonUI sample code for javax.swing.plaf.basic.BasicToggleButtonUI.BasicToggleButtonUI() definition code for javax.swing.plaf.basic.BasicToggleButtonUI.BasicToggleButtonUI() ()
           
 
Method Summary
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicToggleButtonUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicToggleButtonUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  b)
           
protected  String sample code for java.lang.String definition code for java.lang.String getPropertyPrefix sample code for javax.swing.plaf.basic.BasicToggleButtonUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicToggleButtonUI.getPropertyPrefix() ()
           
protected  int getTextShiftOffset sample code for javax.swing.plaf.basic.BasicToggleButtonUI.getTextShiftOffset() definition code for javax.swing.plaf.basic.BasicToggleButtonUI.getTextShiftOffset() ()
          Overriden so that the text will not be rendered as shifted for Toggle buttons and subclasses.
 void paint sample code for javax.swing.plaf.basic.BasicToggleButtonUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicToggleButtonUI.paint(java.awt.Graphics, javax.swing.JComponent) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Paints the specified component appropriate for the look and feel.
protected  void paintIcon sample code for javax.swing.plaf.basic.BasicToggleButtonUI.paintIcon(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle) definition code for javax.swing.plaf.basic.BasicToggleButtonUI.paintIcon(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  iconRect)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI sample code for javax.swing.plaf.basic.BasicButtonUI definition code for javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.clearTextShiftOffset() definition code for javax.swing.plaf.basic.BasicButtonUI.clearTextShiftOffset() , createButtonListener sample code for javax.swing.plaf.basic.BasicButtonUI.createButtonListener(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.createButtonListener(javax.swing.AbstractButton) , getDefaultTextIconGap sample code for javax.swing.plaf.basic.BasicButtonUI.getDefaultTextIconGap(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.getDefaultTextIconGap(javax.swing.AbstractButton) , getMaximumSize sample code for javax.swing.plaf.basic.BasicButtonUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonUI.getMaximumSize(javax.swing.JComponent) , getMinimumSize sample code for javax.swing.plaf.basic.BasicButtonUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonUI.getMinimumSize(javax.swing.JComponent) , getPreferredSize sample code for javax.swing.plaf.basic.BasicButtonUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonUI.getPreferredSize(javax.swing.JComponent) , installDefaults sample code for javax.swing.plaf.basic.BasicButtonUI.installDefaults(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.installDefaults(javax.swing.AbstractButton) , installKeyboardActions sample code for javax.swing.plaf.basic.BasicButtonUI.installKeyboardActions(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.installKeyboardActions(javax.swing.AbstractButton) , installListeners sample code for javax.swing.plaf.basic.BasicButtonUI.installListeners(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.installListeners(javax.swing.AbstractButton) , installUI sample code for javax.swing.plaf.basic.BasicButtonUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonUI.installUI(javax.swing.JComponent) , paintButtonPressed sample code for javax.swing.plaf.basic.BasicButtonUI.paintButtonPressed(java.awt.Graphics, javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.paintButtonPressed(java.awt.Graphics, javax.swing.AbstractButton) , paintFocus sample code for javax.swing.plaf.basic.BasicButtonUI.paintFocus(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle) definition code for javax.swing.plaf.basic.BasicButtonUI.paintFocus(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle) , paintIcon sample code for javax.swing.plaf.basic.BasicButtonUI.paintIcon(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle) definition code for javax.swing.plaf.basic.BasicButtonUI.paintIcon(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle) , paintText sample code for javax.swing.plaf.basic.BasicButtonUI.paintText(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.lang.String) definition code for javax.swing.plaf.basic.BasicButtonUI.paintText(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.lang.String) , paintText sample code for javax.swing.plaf.basic.BasicButtonUI.paintText(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle, java.lang.String) definition code for javax.swing.plaf.basic.BasicButtonUI.paintText(java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle, java.lang.String) , setTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.setTextShiftOffset() definition code for javax.swing.plaf.basic.BasicButtonUI.setTextShiftOffset() , uninstallDefaults sample code for javax.swing.plaf.basic.BasicButtonUI.uninstallDefaults(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.uninstallDefaults(javax.swing.AbstractButton) , uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicButtonUI.uninstallKeyboardActions(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.uninstallKeyboardActions(javax.swing.AbstractButton) , uninstallListeners sample code for javax.swing.plaf.basic.BasicButtonUI.uninstallListeners(javax.swing.AbstractButton) definition code for javax.swing.plaf.basic.BasicButtonUI.uninstallListeners(javax.swing.AbstractButton) , uninstallUI sample code for javax.swing.plaf.basic.BasicButtonUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonUI.uninstallUI(javax.swing.JComponent)
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) , update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

BasicToggleButtonUI sample code for javax.swing.plaf.basic.BasicToggleButtonUI() definition code for javax.swing.plaf.basic.BasicToggleButtonUI()

public BasicToggleButtonUI()
Method Detail

createUI sample code for javax.swing.plaf.basic.BasicToggleButtonUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicToggleButtonUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  b)

getPropertyPrefix sample code for javax.swing.plaf.basic.BasicToggleButtonUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicToggleButtonUI.getPropertyPrefix()

protected String sample code for java.lang.String definition code for java.lang.String  getPropertyPrefix()
Overrides:
getPropertyPrefix sample code for javax.swing.plaf.basic.BasicButtonUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicButtonUI.getPropertyPrefix() in class BasicButtonUI sample code for javax.swing.plaf.basic.BasicButtonUI definition code for javax.swing.plaf.basic.BasicButtonUI

paint sample code for javax.swing.plaf.basic.BasicToggleButtonUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicToggleButtonUI.paint(java.awt.Graphics, javax.swing.JComponent)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                  JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
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 sample code for javax.swing.plaf.basic.BasicButtonUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonUI.paint(java.awt.Graphics, javax.swing.JComponent) in class BasicButtonUI sample code for javax.swing.plaf.basic.BasicButtonUI definition code for javax.swing.plaf.basic.BasicButtonUI
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) sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

paintIcon sample code for javax.swing.plaf.basic.BasicToggleButtonUI.paintIcon(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle) definition code for javax.swing.plaf.basic.BasicToggleButtonUI.paintIcon(java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle)

protected void paintIcon(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                         AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b,
                         Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  iconRect)

getTextShiftOffset sample code for javax.swing.plaf.basic.BasicToggleButtonUI.getTextShiftOffset() definition code for javax.swing.plaf.basic.BasicToggleButtonUI.getTextShiftOffset()

protected int getTextShiftOffset()
Overriden so that the text will not be rendered as shifted for Toggle buttons and subclasses.

Overrides:
getTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.getTextShiftOffset() definition code for javax.swing.plaf.basic.BasicButtonUI.getTextShiftOffset() in class BasicButtonUI sample code for javax.swing.plaf.basic.BasicButtonUI definition code for javax.swing.plaf.basic.BasicButtonUI