planetj.gui
Class CMAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--planetj.gui.CMAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable

public class CMAction
extends AbstractAction

See Also:
Serialized Form

Field Summary
 char desiredMnemonic
           
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
CMAction()
          ActionClass constructor comment.
CMAction(String name)
          ActionClass constructor comment.
CMAction(String name, Icon icon)
          ActionClass constructor comment.
 
Method Summary
 void actionPerformed(ActionEvent arg1)
          when an action is performed by a user on this action, this method should be called.
 void addActionListener(ActionListener l)
          Adds an action listener to this action
 void fireActionPerformed(ActionEvent e)
          This method was created in VisualAge.
 char getDesiredMnemonic()
          This returns the mnemonic that should be used for this action.
 Icon getDisabledIcon()
          Insert the method's description here.
 Icon getIcon()
          Gets the icon property (javax.swing.Icon) value.
 String getName()
          Gets the name property (String) value.
 Icon getPressedIcon()
          Insert the method's description here.
 Icon getRolloverIcon()
          Insert the method's description here.
 Icon getSelectedIcon()
          Insert the method's description here.
 String getText()
          Gets the text property (java.lang.String) value.
 String getToolTip()
          Gets the toolTip property (java.lang.String) value.
 void removeActionListener(ActionListener l)
          Removes the action listener for this action
 void setDesiredMnemonic(char newDesiredMnemonic)
          This sets the mnemonic that should be used for this action.
 void setDisabledIcon(Icon newDisabledIcon)
          Insert the method's description here.
 void setIcon(Icon icon)
          Sets the icon property (javax.swing.Icon) value.
 void setPressedIcon(Icon newPressedIcon)
          Insert the method's description here.
 void setRolloverIcon(Icon newRolloverIcon)
          Insert the method's description here.
 void setSelectedIcon(Icon newSelectedIcon)
          Insert the method's description here.
 void setText(String text)
          Sets the text property (java.lang.String) value and retrieves the translated text from a properties file.
 void setToolTip(String toolTip)
          Sets the toolTip property (java.lang.String) value and retrieves the translated text from a properties file.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

desiredMnemonic

public char desiredMnemonic
Constructor Detail

CMAction

public CMAction()
ActionClass constructor comment.


CMAction

public CMAction(String name)
ActionClass constructor comment.

Parameters:
name - java.lang.String

CMAction

public CMAction(String name,
                Icon icon)
ActionClass constructor comment.

Parameters:
name - java.lang.String
icon - javax.swing.Icon
Method Detail

actionPerformed

public void actionPerformed(ActionEvent arg1)
when an action is performed by a user on this action, this method should be called.


addActionListener

public void addActionListener(ActionListener l)
Adds an action listener to this action

Parameters:
l - java.awt.event.ActionListener

fireActionPerformed

public void fireActionPerformed(ActionEvent e)
This method was created in VisualAge.

Parameters:
e - java.awt.event.ActionEvent

getDesiredMnemonic

public char getDesiredMnemonic()
This returns the mnemonic that should be used for this action. Creation date: (7/25/00 7:37:07 AM)

Returns:
char

getDisabledIcon

public Icon getDisabledIcon()
Insert the method's description here. Creation date: (8/9/00 3:20:50 PM)

Returns:
javax.swing.Icon

getIcon

public Icon getIcon()
Gets the icon property (javax.swing.Icon) value. Returns the Action.SMALL_ICON object.

Returns:
The icon property value.
See Also:
setIcon(javax.swing.Icon)

getName

public String getName()
Gets the name property (String) value. Returns the Action.Name object.

Returns:
String

getPressedIcon

public Icon getPressedIcon()
Insert the method's description here. Creation date: (8/9/00 11:13:09 AM)

Returns:
javax.swing.Icon

getRolloverIcon

public Icon getRolloverIcon()
Insert the method's description here. Creation date: (8/9/00 11:29:03 AM)

Returns:
javax.swing.Icon

getSelectedIcon

public Icon getSelectedIcon()
Insert the method's description here. Creation date: (8/9/00 11:22:43 AM)

Returns:
javax.swing.Icon

getText

public String getText()
Gets the text property (java.lang.String) value. Returns the Action.Name value which considers translation.

Returns:
The text property value.
See Also:
setText(java.lang.String)

getToolTip

public String getToolTip()
Gets the toolTip property (java.lang.String) value. This is actually the SHORT_DESCRIPTION of the Action

Returns:
The toolTip property value.
See Also:
setToolTip(java.lang.String)

removeActionListener

public void removeActionListener(ActionListener l)
Removes the action listener for this action

Parameters:
l - java.awt.event.ActionListener

setDesiredMnemonic

public void setDesiredMnemonic(char newDesiredMnemonic)
This sets the mnemonic that should be used for this action. An actual "setMnemonic" method would imply that you could set this property and then just add it to a menu and the mnemonic would be set. However the mnemonic must be set when the component is added to the menu Creation date: (7/25/00 7:37:07 AM)

Parameters:
newDesiredMnemonic - char

setDisabledIcon

public void setDisabledIcon(Icon newDisabledIcon)
Insert the method's description here. Creation date: (8/9/00 3:20:50 PM)

Parameters:
newDisabledIcon - javax.swing.Icon

setIcon

public void setIcon(Icon icon)
Sets the icon property (javax.swing.Icon) value. This uses the SMALL_ICON property from the Action interface. EXAMPLE putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("//images//icon.gif")));

Parameters:
icon - The new value for the property.
See Also:
getIcon()

setPressedIcon

public void setPressedIcon(Icon newPressedIcon)
Insert the method's description here. Creation date: (8/9/00 11:13:09 AM)

Parameters:
newPressedIcon - javax.swing.Icon

setRolloverIcon

public void setRolloverIcon(Icon newRolloverIcon)
Insert the method's description here. Creation date: (8/9/00 11:29:03 AM)

Parameters:
newRolloverIcon - javax.swing.Icon

setSelectedIcon

public void setSelectedIcon(Icon newSelectedIcon)
Insert the method's description here. Creation date: (8/9/00 11:22:43 AM)

Parameters:
newSelectedIcon - javax.swing.Icon

setText

public void setText(String text)
Sets the text property (java.lang.String) value and retrieves the translated text from a properties file.

Parameters:
text - The new value for the property.
See Also:
getText()

setToolTip

public void setToolTip(String toolTip)
Sets the toolTip property (java.lang.String) value and retrieves the translated text from a properties file.

Parameters:
toolTip - The new value for the property.
See Also:
getToolTip()