org.argouml.uml.diagram.ui
Class ActionModifier
java.lang.Object
javax.swing.AbstractAction
org.argouml.uml.ui.UMLAction
org.argouml.uml.diagram.ui.ActionModifier
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
- public class ActionModifier
- extends UMLAction
A class to perform the action of changing value of the modifiers on a
package, use case, interface or class.
- See Also:
- Serialized Form
Nested classes inherited from class javax.swing.AbstractAction |
|
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 |
ActionModifier(java.lang.String name,
java.lang.String propertyName,
java.lang.String getMethod,
java.lang.String setMethod,
java.lang.Object mclass)
Defines an Action object with the specified description which
will use the given reflection methods to modify boolean values
in an MClass object. |
ActionModifier(java.lang.String name,
java.lang.String propertyName,
java.lang.String getMethod,
java.lang.String setMethod,
java.lang.Object mclass,
java.lang.Class enumClass,
java.lang.Object trueValue,
java.lang.Object falseValue)
Defines an Action object with the specified description which
will use the given reflection methods to modify an enumerated
values in an MClass object. |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent ae)
To perform the action of changing a modifier |
boolean |
shouldBeEnabled()
The action is always enabled |
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 |
_property
private UMLBooleanProperty _property
object
private java.lang.Object object
mclassClass
java.lang.Class mclassClass
mpackageClass
java.lang.Class mpackageClass
minterfaceClass
java.lang.Class minterfaceClass
museCaseClass
java.lang.Class museCaseClass
trueValue
java.lang.Object trueValue
falseValue
java.lang.Object falseValue
ActionModifier
public ActionModifier(java.lang.String name,
java.lang.String propertyName,
java.lang.String getMethod,
java.lang.String setMethod,
java.lang.Object mclass)
- Defines an Action object with the specified description which
will use the given reflection methods to modify boolean values
in an
MClass
object.
- Parameters:
name
- the text for the actions menu itempropertyName
- the name of the modifier property to be amendedgetMethod
- the name of the getter method to retrieve the
propertysetMethod
- the name of the setter method to change the
propertymclass
- the MClass
object containing the
modifier property.
ActionModifier
public ActionModifier(java.lang.String name,
java.lang.String propertyName,
java.lang.String getMethod,
java.lang.String setMethod,
java.lang.Object mclass,
java.lang.Class enumClass,
java.lang.Object trueValue,
java.lang.Object falseValue)
- Defines an Action object with the specified description which
will use the given reflection methods to modify an enumerated
values in an
MClass
object.
- Parameters:
name
- the text for the actions menu itempropertyName
- the name of the modifier property to be amendedgetMethod
- the name of the getter method to retrieve the
propertysetMethod
- the name of the setter method to change the
propertymclass
- the MClass
object containing the
modifier property.enumClass
- the class representing the enumerationtrueValue
- The enumerated value representing truefalseValue
- The enumerated value representing false
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ae)
- To perform the action of changing a modifier
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
- Overrides:
actionPerformed
in class UMLAction
shouldBeEnabled
public boolean shouldBeEnabled()
- The action is always enabled
- Overrides:
shouldBeEnabled
in class UMLAction
- Returns:
- true if the action should be available.