org.argouml.language.ui
Class ActionNotation

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.UMLAction
          extended byorg.argouml.language.ui.ActionNotation
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, MenuListener, Serializable

public class ActionNotation
extends UMLAction
implements MenuListener

Allows selection of a default notation.

Since:
ARGO0.9.4
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
private  JMenu menu
          The popup menu with all notations.
private static ActionNotation SINGLETON
          The instance of this action.
 
Fields inherited from class org.argouml.uml.ui.UMLAction
HAS_ICON, NO_ICON
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ActionNotation()
          Constructor - adds the Notation menu.
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Perform the work the action is supposed to do.
static ActionNotation getInstance()
           
 JMenu getMenu()
           
 void menuCanceled(MenuEvent me)
           
 void menuDeselected(MenuEvent me)
           
 void menuSelected(MenuEvent me)
           
 
Methods inherited from class org.argouml.uml.ui.UMLAction
getMnemonic, getValue, isEnabled, putValue, shouldBeEnabled, updateEnabled, updateEnabled
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLETON

private static final ActionNotation SINGLETON
The instance of this action.


menu

private JMenu menu
The popup menu with all notations. It gets filled the first time this action is performed (see actionPerformed(ActionEvent ae)).

Constructor Detail

ActionNotation

public ActionNotation()
Constructor - adds the Notation menu.

Method Detail

getInstance

public static final ActionNotation getInstance()
Returns:
The instance.

actionPerformed

public void actionPerformed(ActionEvent ae)
Description copied from class: UMLAction
Perform the work the action is supposed to do. This method needs to be overridden by all actions, since it only shows a fake progressbar...

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class UMLAction
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

getMenu

public JMenu getMenu()
Returns:
The menu for the notation.

menuSelected

public void menuSelected(MenuEvent me)
Specified by:
menuSelected in interface MenuListener
See Also:
MenuListener.menuSelected(javax.swing.event.MenuEvent)

menuDeselected

public void menuDeselected(MenuEvent me)
Specified by:
menuDeselected in interface MenuListener
See Also:
MenuListener.menuDeselected(javax.swing.event.MenuEvent)

menuCanceled

public void menuCanceled(MenuEvent me)
Specified by:
menuCanceled in interface MenuListener
See Also:
MenuListener.menuCanceled(javax.swing.event.MenuEvent)


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook