org.argouml.uml.diagram.ui
Class ActionAddExtensionPoint

java.lang.Object
  extended by UndoableAction
      extended by org.argouml.uml.diagram.ui.ActionAddExtensionPoint

public final class ActionAddExtensionPoint
extends UndoableAction

A class to implement the addition of extension points to use cases.

This is a singleton. Implemented with a private constructor and a static access method. Marked as final, since it can't sensibly be subclassed (the access method wouldn't work properly).

Stereotype:
singleton

Constructor Summary
ActionAddExtensionPoint()
          Constructor is private, since it cannot be called directly for a singleton.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          Called if this action is invoked.
 boolean isEnabled()
          A predicate to determine if this action is enabled.
static ActionAddExtensionPoint singleton()
          Get the single instance of the action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionAddExtensionPoint

public ActionAddExtensionPoint()
Constructor is private, since it cannot be called directly for a singleton. Make use of the access funtion.

Method Detail

singleton

public static ActionAddExtensionPoint singleton()
Get the single instance of the action.

Since we are a singleton, this is the only way of accessing the instance, which is created if it does not exist.

Returns:
The singleton instance.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Called if this action is invoked.

Parameters:
ae - The action that caused us to be invoked.
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

isEnabled

public boolean isEnabled()
A predicate to determine if this action is enabled.

Returns:
true if the superclass affirms this action is enabled and the target is a use case. false otherwise.
See Also:
org.tigris.gef.undo.UndoableAction#isEnabled()


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook