com.sas.swing.visuals
Class BasicButton

com.sas.swing.visuals.BasicButton
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable, javax.swing.SwingConstants

public class BasicButton

See Also:
Serialized Form

Constructor Summary
BasicButton()
          Creates a button with no set text or icon.
BasicButton(javax.swing.Action a)
          Creates a button where properties are taken from the Action supplied.
BasicButton(javax.swing.Icon icon)
          Creates a button with an icon.
BasicButton(java.lang.String text)
          Creates a button with text.
BasicButton(java.lang.String text, javax.swing.Icon icon)
          Creates a button with initial text and an icon.
 
Method Summary
protected  void configurePropertiesFromAction(javax.swing.Action a)
          Factory method which sets the AbstractButton's properties according to values from the Action instance.
 java.lang.String getUIClassID()
          Returns a string that specifies the name of the L&F class that renders this component.
 void updateUI()
          Resets the UI property to a value from the current look and feel.
 

Constructor Detail

BasicButton

public BasicButton()
Creates a button with no set text or icon.


BasicButton

public BasicButton(javax.swing.Icon icon)
Creates a button with an icon.

Parameters:
icon - the Icon image to display on the button

BasicButton

public BasicButton(java.lang.String text)
Creates a button with text.

Parameters:
text - the text of the button

BasicButton

public BasicButton(javax.swing.Action a)
Creates a button where properties are taken from the Action supplied.

Parameters:
a - the Action used to specify the new button

BasicButton

public BasicButton(java.lang.String text,
                   javax.swing.Icon icon)
Creates a button with initial text and an icon.

Parameters:
text - the text of the button
icon - the Icon image to display on the button
Method Detail

updateUI

public void updateUI()
Resets the UI property to a value from the current look and feel.

Overrides:
updateUI in class javax.swing.AbstractButton
See Also:
JComponent.updateUI()

getUIClassID

public java.lang.String getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.

Overrides:
getUIClassID in class javax.swing.JComponent
Returns:
the string "BasicButtonUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

configurePropertiesFromAction

protected void configurePropertiesFromAction(javax.swing.Action a)
Factory method which sets the AbstractButton's properties according to values from the Action instance. The properties which get set may differ for AbstractButton subclasses. By default, the properties which get set are Text, Icon, Enabled, ToolTipText, ActionCommand, and Mnemonic.

Overrides:
configurePropertiesFromAction in class javax.swing.AbstractButton
Parameters:
a - the Action from which to get the properties, or null
Since:
1.3
See Also:
Action, AbstractButton.setAction(javax.swing.Action)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.