All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xu.xu_CheckBoxAction

java.lang.Object
   |
   +----com.sun.java.swing.AbstractAction
           |
           +----xu.xu_CheckBoxAction

public class xu_CheckBoxAction
extends AbstractAction
An action intended to be associated with a check box menu item, such that it is invoked when the menu item is clicked. The action thus indicates the state of the menu item, and can be accessed to determine its state so that the caller need never deal with the menu item object itself. When the menu item is clicked, the actionPerformed method is invoked, and the ActionEvent it is passed gives details of the menu item's state.


Variable Index

 o AssociatedCheckBoxMenuItem
The associated check box menu item.
 o StateFlag
Flag reflecting the current state (checked or not) of the associated menu item.

Constructor Index

 o xu_CheckBoxAction(String)
Constructor.

Method Index

 o actionPerformed(ActionEvent)
Something's happened: record where the event came from, and determine the state of the check box menu item.
 o getAssociatedCheckBoxMenuItem()
Get the menu item associated with this action.
 o getState()
Get the current state (checked or not) of the associated menu item.
 o setState(boolean)
Set the current state of this action.

Variables

 o AssociatedCheckBoxMenuItem
 protected JCheckBoxMenuItem AssociatedCheckBoxMenuItem
The associated check box menu item.

 o StateFlag
 protected boolean StateFlag
Flag reflecting the current state (checked or not) of the associated menu item. It defaults to 'false'.

Constructors

 o xu_CheckBoxAction
 public xu_CheckBoxAction(String InputActionName)
Constructor.

Parameters:
InputActionName - The name of the action

Methods

 o actionPerformed
 public void actionPerformed(ActionEvent InputActionEvent)
Something's happened: record where the event came from, and determine the state of the check box menu item.

Overrides:
actionPerformed in class AbstractAction
 o setState
 public void setState(boolean InputStateFlag)
Set the current state of this action. This is intended to be used at initialisation time (to set the initial state, say, according to the value in a configuration file).

 o getAssociatedCheckBoxMenuItem
 public JCheckBoxMenuItem getAssociatedCheckBoxMenuItem()
Get the menu item associated with this action.

 o getState
 public boolean getState()
Get the current state (checked or not) of the associated menu item.


All Packages  Class Hierarchy  This Package  Previous  Next  Index