|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.ui.Actions
Collects ArgoUML's global actions, and takes care of the "enabled" status of all these actions.
Which means:
Any instance of UMLAction may (at construction time)
tell Actions by calling addAction()
about UMLActions of which the availability depends on the currently
selected Target or the state of ArgoUML.
From here on, Actions will check the availability of all enlisted UMLActions after every Target change and after every ArgoUML state change (i.e. every user action), and downlight or enable the corresponding UI element, e.g. menu item or toolbar item.
Once UMLActions are enlisted, they can never be removed!
This class is a Singleton.
Field Summary | |
private static Vector |
allActions
allActions is the list of global UMLActions in ArgoUML. |
private static Actions |
INSTANCE
|
private static Logger |
LOG
|
Constructor Summary | |
private |
Actions()
|
Method Summary | |
static void |
addAction(UMLAction newAction)
Add actions to the global actions list. |
static Actions |
getInstance()
|
static boolean |
isGlobalAction(UMLAction action)
|
void |
targetAdded(TargetEvent e)
Fired when a target is added to the list of targets. |
void |
targetRemoved(TargetEvent e)
Fired when a target is removed from the list of targets |
void |
targetSet(TargetEvent e)
Fired when a total new set of targets is set |
static void |
updateAllEnabled()
Updates all global actions: check if enabled or not. |
private static void |
updateAllEnabled(TargetEvent e)
Updates all global actions as a consequence of the send TargetEvent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Logger LOG
private static final Actions INSTANCE
private static Vector allActions
allActions
is the list of global UMLActions in ArgoUML.
All these are UMLActions!
Constructor Detail |
private Actions()
Method Detail |
public static Actions getInstance()
public static void updateAllEnabled()
private static void updateAllEnabled(TargetEvent e)
e
- the target event, which is used to determine the new targetpublic static void addAction(UMLAction newAction)
newAction
- the new action to be addedpublic static boolean isGlobalAction(UMLAction action)
action
- the given action
public void targetAdded(TargetEvent e)
TargetListener
targetAdded
in interface TargetListener
e
- The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(
org.argouml.ui.targetmanager.TargetEvent)
public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved
in interface TargetListener
e
- The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(
org.argouml.ui.targetmanager.TargetEvent)
public void targetSet(TargetEvent e)
TargetListener
targetSet
in interface TargetListener
e
- The targetevent, name will be TARGET_SETTargetListener.targetSet(
org.argouml.ui.targetmanager.TargetEvent)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |