javax.swing.plaf.basic
Class BasicButtonUI

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
Direct Known Subclasses:
BasicToggleButtonUI sample code for javax.swing.plaf.basic.BasicToggleButtonUI definition code for javax.swing.plaf.basic.BasicToggleButtonUI , MetalButtonUI sample code for javax.swing.plaf.metal.MetalButtonUI definition code for javax.swing.plaf.metal.MetalButtonUI

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

BasicButton implementation


Field Summary
protected  int defaultTextIconGap sample code for javax.swing.plaf.basic.BasicButtonUI.defaultTextIconGap definition code for javax.swing.plaf.basic.BasicButtonUI.defaultTextIconGap
           
protected  int defaultTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.defaultTextShiftOffset definition code for javax.swing.plaf.basic.BasicButtonUI.defaultTextShiftOffset
           
 
Constructor Summary
BasicButtonUI sample code for javax.swing.plaf.basic.BasicButtonUI.BasicButtonUI() definition code for javax.swing.plaf.basic.BasicButtonUI.BasicButtonUI() ()
           
 
Method Summary
protected  void clearTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.clearTextShiftOffset() definition code for javax.swing.plaf.basic.BasicButtonUI.clearTextShiftOffset() ()
           
protected  BasicButtonListener sample code for javax.swing.plaf.basic.BasicButtonListener definition code for javax.swing.plaf.basic.BasicButtonListener 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) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicButtonUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
           
 int 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) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's maximum size appropriate for the look and feel.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's minimum size appropriate for the look and feel.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's preferred size appropriate for the look and feel.
protected  String sample code for java.lang.String definition code for java.lang.String getPropertyPrefix sample code for javax.swing.plaf.basic.BasicButtonUI.getPropertyPrefix() definition code for javax.swing.plaf.basic.BasicButtonUI.getPropertyPrefix() ()
           
protected  int getTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.getTextShiftOffset() definition code for javax.swing.plaf.basic.BasicButtonUI.getTextShiftOffset() ()
           
protected  void 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) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
protected  void 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) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
protected  void 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) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
 void 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Configures the specified component appropriate for the look and feel.
 void 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) (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 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) (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)
           
protected  void 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) (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  viewRect, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  textRect, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  iconRect)
           
protected  void 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) (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, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  iconRect)
           
protected  void 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) (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  textRect, String sample code for java.lang.String definition code for java.lang.String  text)
          Method which renders the text of the current button.
protected  void 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) (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, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  textRect, String sample code for java.lang.String definition code for java.lang.String  text)
          As of Java 2 platform v 1.4 this method should not be used or overriden.
protected  void setTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.setTextShiftOffset() definition code for javax.swing.plaf.basic.BasicButtonUI.setTextShiftOffset() ()
           
protected  void 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) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
protected  void 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) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
protected  void 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) (AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)
           
 void 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) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Reverses configuration which was done on the specified component during installUI.
 
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)
 

Field Detail

defaultTextIconGap sample code for javax.swing.plaf.basic.BasicButtonUI.defaultTextIconGap

protected int defaultTextIconGap

defaultTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.defaultTextShiftOffset

protected int defaultTextShiftOffset
Constructor Detail

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

public BasicButtonUI()
Method Detail

createUI sample code for javax.swing.plaf.basic.BasicButtonUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicButtonUI.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  c)

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

protected String sample code for java.lang.String definition code for java.lang.String  getPropertyPrefix()

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)

public void installUI(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.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent)
Configures the specified component appropriate for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
  1. Install any default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.

Overrides:
installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) , JComponent.setUI(javax.swing.plaf.ComponentUI) sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

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)

protected void installDefaults(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

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)

protected void installListeners(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

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)

protected void installKeyboardActions(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

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)

public void uninstallUI(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.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent)
Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
  1. Remove any UI-set borders from the component.
  2. Remove any UI-set layout managers on the component.
  3. Remove any UI-added sub-components from the component.
  4. Remove any UI-added event/property listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Nullify any allocated instance data objects to allow for GC.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

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)

protected void uninstallKeyboardActions(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

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)

protected void uninstallListeners(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

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)

protected void uninstallDefaults(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

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)

protected BasicButtonListener sample code for javax.swing.plaf.basic.BasicButtonListener definition code for javax.swing.plaf.basic.BasicButtonListener  createButtonListener(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

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)

public int getDefaultTextIconGap(AbstractButton sample code for javax.swing.AbstractButton definition code for javax.swing.AbstractButton  b)

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)

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.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
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.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)

protected void paintIcon(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,
                         Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  iconRect)

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)

protected void paintText(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,
                         Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  textRect,
                         String sample code for java.lang.String definition code for java.lang.String  text)
As of Java 2 platform v 1.4 this method should not be used or overriden. Use the paintText method which takes the AbstractButton argument.


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)

protected void paintText(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  textRect,
                         String sample code for java.lang.String definition code for java.lang.String  text)
Method which renders the text of the current button.

Parameters:
g - Graphics context
b - Current button to render
textRect - Bounding rectangle to render the text.
text - String to render
Since:
1.4

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)

protected void paintFocus(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  viewRect,
                          Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  textRect,
                          Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  iconRect)

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)

protected void paintButtonPressed(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)

clearTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.clearTextShiftOffset() definition code for javax.swing.plaf.basic.BasicButtonUI.clearTextShiftOffset()

protected void clearTextShiftOffset()

setTextShiftOffset sample code for javax.swing.plaf.basic.BasicButtonUI.setTextShiftOffset() definition code for javax.swing.plaf.basic.BasicButtonUI.setTextShiftOffset()

protected void setTextShiftOffset()

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

protected int getTextShiftOffset()

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)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize(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.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent)
Returns the specified component's minimum size appropriate for the look and feel. If null is returned, the minimum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Overrides:
getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
a Dimension object or null
See Also:
JComponent.getMinimumSize() sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , LayoutManager.minimumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) , ComponentUI.getPreferredSize(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(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)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(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.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)
Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

Overrides:
getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
JComponent.getPreferredSize() sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , LayoutManager.preferredLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)

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)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMaximumSize(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.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent)
Returns the specified component's maximum size appropriate for the look and feel. If null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Overrides:
getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
a Dimension object or null
See Also:
JComponent.getMaximumSize() sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , LayoutManager2.maximumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container)