|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.AbstractAction
org.tigris.gef.undo.UndoableAction
org.argouml.uml.ui.UMLAction
org.argouml.uml.diagram.ui.ActionCompartmentDisplay
A class to implement the actions involved in hiding and showing compartments on interfaces, classes and use cases.
This implementation may easily be extended for other compartments of other figs.
The class declares a number of static instances, each with an actionPerformed method that performs the required action.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.AbstractAction |
|
| Field Summary | |
private int |
cType
The compartment type: |
private boolean |
display
A flag to indicate whether the action should show or hide the relevant compartment. |
private static UMLAction |
HIDE_ALL_COMPARTMENTS
Static instance to hide both compartments of a class. |
private static UMLAction |
HIDE_ATTR_COMPARTMENT
Static instance to hide the attribute compartment of a class. |
private static UMLAction |
HIDE_EXTPOINT_COMPARTMENT
Static instance to hide the extension point compartment of a use case. |
private static UMLAction |
HIDE_OPER_COMPARTMENT
Static instance to hide the operation compartment of a class. |
private static UMLAction |
SHOW_ALL_COMPARTMENTS
Static instance to show both compartments of a class. |
private static UMLAction |
SHOW_ATTR_COMPARTMENT
Static instance to show the attribute compartment of a class. |
private static UMLAction |
SHOW_EXTPOINT_COMPARTMENT
Static instance to show the extension point compartment of a use case. |
private static UMLAction |
SHOW_OPER_COMPARTMENT
Static instance to show the operation compartment of a class. |
| 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 | |
protected |
ActionCompartmentDisplay(boolean d,
String c,
int type)
Constructor for a new instance. |
| Method Summary | |
void |
actionPerformed(ActionEvent ae)
Action method invoked when an event triggers this action. |
static Collection |
getActions()
Return the compartment show and/or hide actions needed for the selected Figs. |
| Methods inherited from class org.argouml.uml.ui.UMLAction |
getMnemonic, getValue, isEnabled, oldActionPerformed, 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 |
private boolean display
private int cType
0: attribute 1: operation 2: attribute and operation 3: extensionpoint
private static final UMLAction SHOW_ATTR_COMPARTMENT
private static final UMLAction HIDE_ATTR_COMPARTMENT
private static final UMLAction SHOW_OPER_COMPARTMENT
private static final UMLAction HIDE_OPER_COMPARTMENT
private static final UMLAction SHOW_EXTPOINT_COMPARTMENT
private static final UMLAction HIDE_EXTPOINT_COMPARTMENT
private static final UMLAction SHOW_ALL_COMPARTMENTS
private static final UMLAction HIDE_ALL_COMPARTMENTS
| Constructor Detail |
protected ActionCompartmentDisplay(boolean d,
String c,
int type)
d - true if the compartment is to be shown,
false if it is to be hiddenc - the text to be displayed for this actiontype - the type of compartment. See definition at cType| Method Detail |
public static Collection getActions()
public void actionPerformed(ActionEvent ae)
The cType instance variable defines the action to
take, and the display instance variable whether it should
set visibility or not.
ae - The event that triggered us.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ArgoUML © 1996-2005 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |