| |
|
| javax.swing.JMenuItem org.jfree.ui.action.ActionMenuItem
ActionMenuItem | public class ActionMenuItem extends JMenuItem (Code) | | The ActionMenuItem is used to connect an Action and its properties to an
MenuItem.
This functionality is already implemented in JDK 1.3 but needed for JDK 1.2.2
compatibility.
author: Thomas Morgner |
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 menuitem. | public void | setEnabled(boolean b) Enables and disables this button and if an action is assigned to this
menuitem the propertychange is forwarded to the assigned action. |
ActionMenuItem | public ActionMenuItem()(Code) | | Default constructor.
|
ActionMenuItem | public ActionMenuItem(Icon icon)(Code) | | Creates a menu item with the specified icon.
Parameters: icon - the icon. |
ActionMenuItem | public ActionMenuItem(String text)(Code) | | Creates a menu item with the specified label.
Parameters: text - the label. |
ActionMenuItem | public ActionMenuItem(String text, Icon icon)(Code) | | Creates a menu item with the specified label and icon.
Parameters: text - the label. Parameters: icon - the icon. |
ActionMenuItem | public ActionMenuItem(String text, int i)(Code) | | Creates a new menu item with the specified label and mnemonic.
Parameters: text - the label. Parameters: i - the mnemonic. |
ActionMenuItem | public ActionMenuItem(Action action)(Code) | | Creates a new menu item based on the specified action.
Parameters: action - the action. |
getAction | public Action getAction()(Code) | | Returns the assigned action or null if no action has been assigned.
the action. |
setAction | public void setAction(Action newAction)(Code) | | Assigns the given action to this menuitem. The properties of the action
will be assigned to the menuitem. If an previous action was set, the old
action is unregistered.
- NAME - specifies the menuitem text
- SMALL_ICON - specifies the
menuitems icon
- MNEMONIC_KEY - specifies the menuitems mnemonic key
- ACCELERATOR_KEY - specifies the menuitems 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
menuitem the propertychange is forwarded to the assigned action.
Parameters: b - the new enable-state of this menuitem |
|
|
|