| |
|
| javax.swing.JButton org.jfree.ui.action.ActionButton
ActionButton | public class ActionButton extends JButton (Code) | | The ActionButton is used to connect an Action and its properties to a Button. This functionality
is already implemented in JDK 1.3 but needed for JDK 1.2.2 compatibility.
author: Thomas Morgner |
Constructor Summary | |
public | ActionButton() Creates a Button without any text and without an assigned Action. | public | ActionButton(String text) Creates a Button and set the given text as label. | public | ActionButton(String text, Icon icon) Creates an ActionButton and sets the given text and icon on the button. | public | ActionButton(Icon icon) Creates an ActionButton and sets the given icon on the button. | public | ActionButton(Action action) Nreates an ActionButton and assigns the given action with the button. |
Method Summary | |
public Action | getAction() Returns the assigned action or null if no action has been assigned. | public void | setAction(Action newAction) Assigns the given action to this button. | public void | setEnabled(boolean b) Enables and disables this button and if an action is assigned to this button the
propertychange is forwarded to the assigned action. |
ActionButton | public ActionButton()(Code) | | Creates a Button without any text and without an assigned Action.
|
ActionButton | public ActionButton(String text)(Code) | | Creates a Button and set the given text as label.
Parameters: text - the label for the new button. |
ActionButton | public ActionButton(String text, Icon icon)(Code) | | Creates an ActionButton and sets the given text and icon on the button.
Parameters: text - the label for the new button. Parameters: icon - the icon for the button. |
ActionButton | public ActionButton(Icon icon)(Code) | | Creates an ActionButton and sets the given icon on the button.
Parameters: icon - the icon for the button. |
ActionButton | public ActionButton(Action action)(Code) | | Nreates an ActionButton and assigns the given action with the button.
Parameters: action - the action. |
getAction | public Action getAction()(Code) | | Returns the assigned action or null if no action has been assigned.
the action (possibly null). |
setAction | public void setAction(Action newAction)(Code) | | Assigns the given action to this button. The properties of the action will be assigned to
the button. If an previous action was set, the old action is unregistered.
- NAME - specifies the button text
- SMALL_ICON - specifies the buttons icon
- MNEMONIC_KEY - specifies the buttons mnemonic key
- ACCELERATOR_KEY - specifies the buttons accelerator
Parameters: newAction - the new action |
setEnabled | public void setEnabled(boolean b)(Code) | | Enables and disables this button and if an action is assigned to this button the
propertychange is forwarded to the assigned action.
Parameters: b - the new enable-state of this button |
|
|
|