|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractAction | +--org.argouml.uml.ui.UMLAction | +--org.argouml.uml.ui.UMLChangeAction | +--org.argouml.uml.ui.ActionAddExtensionPoint
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).
Field Summary |
---|
Fields inherited from class org.argouml.uml.ui.UMLAction |
---|
cat, 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 | |
---|---|
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 |
shouldBeEnabled()
A predicate to determine if this action should be enabled. |
static ActionAddExtensionPoint |
singleton()
Get the single instance of the action. |
Methods inherited from class org.argouml.uml.ui.UMLAction |
---|
getMnemonic, getShortcut, isEnabled, markNeedsSave, stripJunk, updateEnabled, updateEnabled |
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ActionAddExtensionPoint()
Constructor is private, since it cannot be called directly for a singleton. Make use of the access funtion.
Warning. There is a horrible piece of coding under all
this. The name of the icon MUST be the same as the tool tip with
spaces removed (Arrgh!). So we must have
AddExtensionPoint.gif
somewhere.
Method Detail |
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.
public void actionPerformed(java.awt.event.ActionEvent ae)
Called if this action is invoked.
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class UMLChangeAction
ae
- The action that caused us to be invoked.public boolean shouldBeEnabled()
A predicate to determine if this action should be enabled.
shouldBeEnabled
in class UMLAction
true
if the superclass believes we should be
enabled and the target is a use case. false
otherwise.
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2003 (20040229) | ArgoUML Project Home | ArgoUML Cookbook |