org.argouml.uml.ui
Class ActionCompartmentDisplay

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--org.argouml.uml.ui.UMLAction
              |
              +--org.argouml.uml.ui.ActionCompartmentDisplay
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable

Deprecated. as of 0.15.2, replaced with ActionCompartmentDisplay, remove in 0.15.3, alexb

public class ActionCompartmentDisplay
extends UMLAction

A class to implement the actions involved in hiding and showing compartments on interfaces, classes and use cases.

This implementation extended to handle compartments for extension points on use cases.

The class declares a number of static instances, each with an actionPerformed method that performs the required action.

See Also:
Serialized Form

Field Summary
protected  java.lang.String _compartment
          Deprecated. A string indicating the action desired.
protected  boolean _display
          Deprecated. A flag to indicate whether the action should show or hide the relevant compartment.
static UMLAction HideAllCompartments
          Deprecated. Static instance to hide both compartments of a class.
static UMLAction HideAttrCompartment
          Deprecated. Static instance to hide the attribute compartment of a class.
static UMLAction HideExtPointCompartment
          Deprecated. Static instance to hide the extension point compartment of a use case.
static UMLAction HideOperCompartment
          Deprecated. Static instance to hide the operation compartment of a class.
static UMLAction ShowAllCompartments
          Deprecated. Static instance to show both compartments of a class.
static UMLAction ShowAttrCompartment
          Deprecated. Static instance to show the attribute compartment of a class.
static UMLAction ShowExtPointCompartment
          Deprecated. Static instance to show the extension point compartment of a use case.
static UMLAction ShowOperCompartment
          Deprecated. Static instance to show the operation compartment of a class.
 
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
protected ActionCompartmentDisplay(boolean d, java.lang.String c)
          Deprecated. Constructor for a new instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          Deprecated. Action method invoked when an event triggers this action.
 boolean shouldBeEnabled()
          Deprecated. Indicate whether this action should be enabled.
 
Methods inherited from class org.argouml.uml.ui.UMLAction
getMnemonic, getShortcut, getValue, isEnabled, markNeedsSave, putValue, stripJunk, 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

_display

protected boolean _display
Deprecated. 

A flag to indicate whether the action should show or hide the relevant compartment.


_compartment

protected java.lang.String _compartment
Deprecated. 

A string indicating the action desired.


ShowAttrCompartment

public static UMLAction ShowAttrCompartment
Deprecated. 

Static instance to show the attribute compartment of a class.


HideAttrCompartment

public static UMLAction HideAttrCompartment
Deprecated. 

Static instance to hide the attribute compartment of a class.


ShowOperCompartment

public static UMLAction ShowOperCompartment
Deprecated. 

Static instance to show the operation compartment of a class.


HideOperCompartment

public static UMLAction HideOperCompartment
Deprecated. 

Static instance to hide the operation compartment of a class.


ShowExtPointCompartment

public static UMLAction ShowExtPointCompartment
Deprecated. 

Static instance to show the extension point compartment of a use case.


HideExtPointCompartment

public static UMLAction HideExtPointCompartment
Deprecated. 

Static instance to hide the extension point compartment of a use case.


ShowAllCompartments

public static UMLAction ShowAllCompartments
Deprecated. 

Static instance to show both compartments of a class.


HideAllCompartments

public static UMLAction HideAllCompartments
Deprecated. 

Static instance to hide both compartments of a class.

Constructor Detail

ActionCompartmentDisplay

protected ActionCompartmentDisplay(boolean d,
                                   java.lang.String c)
Deprecated. 

Constructor for a new instance. Can only be called by this class or its children, since used to create static instances only.

Parameters:
d - true if the compartment is to be shown, false if it is to be hidden.
c - The text to be displayed for this action.
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Deprecated. 

Action method invoked when an event triggers this action.

The _compartment instance variable defines the action to take, and the _display instance variable whether it should set visibility or note.

Note. The _display instance variable is really redundant. Its value is implied by the operation.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class UMLAction
Parameters:
ae - The event that triggered us.

shouldBeEnabled

public boolean shouldBeEnabled()
Deprecated. 

Indicate whether this action should be enabled.

Always returns true in this implementation.

Overrides:
shouldBeEnabled in class UMLAction
Returns:
true if the action should be enabled, false otherwise. Always returns true in this implementation.


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