org.argouml.uml.ui
Class ActionModifier

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.argouml.uml.ui.UMLAction
          extended byorg.argouml.uml.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

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
ActionModifier(java.lang.String name, java.lang.String propertyName, java.lang.String getMethod, java.lang.String setMethod, ru.novosoft.uml.foundation.core.MClass 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, ru.novosoft.uml.foundation.core.MClass 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.
ActionModifier(java.lang.String name, java.lang.String propertyName, java.lang.String getMethod, java.lang.String setMethod, ru.novosoft.uml.foundation.core.MInterface minterface)
          Defines an Action object with the specified description which will use the given reflection methods to modify boolean values in an MInterface object.
ActionModifier(java.lang.String name, java.lang.String propertyName, java.lang.String getMethod, java.lang.String setMethod, ru.novosoft.uml.foundation.core.MInterface minterface, 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 MInterface object.
ActionModifier(java.lang.String name, java.lang.String propertyName, java.lang.String getMethod, java.lang.String setMethod, ru.novosoft.uml.model_management.MPackage mpackage)
          Defines an Action object with the specified description which will use the given reflection methods to modify boolean values in an MPackage object.
ActionModifier(java.lang.String name, java.lang.String propertyName, java.lang.String getMethod, java.lang.String setMethod, ru.novosoft.uml.model_management.MPackage mpackage, 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 MPackage object.
ActionModifier(java.lang.String name, java.lang.String propertyName, java.lang.String getMethod, java.lang.String setMethod, ru.novosoft.uml.behavior.use_cases.MUseCase museCase)
          Defines an Action object with the specified description which will use the given reflection methods to modify boolean values in a MUseCase object.
ActionModifier(java.lang.String name, java.lang.String propertyName, java.lang.String getMethod, java.lang.String setMethod, ru.novosoft.uml.behavior.use_cases.MUseCase museCase, 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 a MUseCase 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 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

ActionModifier

public ActionModifier(java.lang.String name,
                      java.lang.String propertyName,
                      java.lang.String getMethod,
                      java.lang.String setMethod,
                      ru.novosoft.uml.foundation.core.MClass 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 item
propertyName - the name of the modifier property to be amended
getMethod - the name of the getter method to retrieve the property
setMethod - the name of the setter method to change the property
mclass - 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,
                      ru.novosoft.uml.foundation.core.MClass 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 item
propertyName - the name of the modifier property to be amended
getMethod - the name of the getter method to retrieve the property
setMethod - the name of the setter method to change the property
mclass - the MClass object containing the modifier property.
enumClass - the class representing the enumeration
trueValue - The enumerated value representing true
falseValue - The enumerated value representing false

ActionModifier

public ActionModifier(java.lang.String name,
                      java.lang.String propertyName,
                      java.lang.String getMethod,
                      java.lang.String setMethod,
                      ru.novosoft.uml.foundation.core.MInterface minterface)
Defines an Action object with the specified description which will use the given reflection methods to modify boolean values in an MInterface object.

Parameters:
name - the text for the actions menu item
propertyName - the name of the modifier property to be amended
getMethod - the name of the getter method to retrieve the property
setMethod - the name of the setter method to change the property
minterface - the MInterface object containing the modifier property.

ActionModifier

public ActionModifier(java.lang.String name,
                      java.lang.String propertyName,
                      java.lang.String getMethod,
                      java.lang.String setMethod,
                      ru.novosoft.uml.foundation.core.MInterface minterface,
                      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 MInterface object.

Parameters:
name - the text for the actions menu item
propertyName - the name of the modifier property to be amended
getMethod - the name of the getter method to retrieve the property
setMethod - the name of the setter method to change the property
minterface - the MInterface object containing the modifier property.
enumClass - the class representing the enumeration
trueValue - The enumerated value representing true
falseValue - The enumerated value representing false

ActionModifier

public ActionModifier(java.lang.String name,
                      java.lang.String propertyName,
                      java.lang.String getMethod,
                      java.lang.String setMethod,
                      ru.novosoft.uml.model_management.MPackage mpackage)
Defines an Action object with the specified description which will use the given reflection methods to modify boolean values in an MPackage object.

Parameters:
name - the text for the actions menu item
propertyName - the name of the modifier property to be amended
getMethod - the name of the getter method to retrieve the property
setMethod - the name of the setter method to change the property
mpackage - the MPackage object containing the modifier property.

ActionModifier

public ActionModifier(java.lang.String name,
                      java.lang.String propertyName,
                      java.lang.String getMethod,
                      java.lang.String setMethod,
                      ru.novosoft.uml.model_management.MPackage mpackage,
                      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 MPackage object.

Parameters:
name - the text for the actions menu item
propertyName - the name of the modifier property to be amended
getMethod - the name of the getter method to retrieve the property
setMethod - the name of the setter method to change the prvoperty
mpackage - the MPackage object containing the modifier property.
enumClass - the class representing the enumeration
trueValue - The enumerated value representing true
falseValue - The enumerated value representing false

ActionModifier

public ActionModifier(java.lang.String name,
                      java.lang.String propertyName,
                      java.lang.String getMethod,
                      java.lang.String setMethod,
                      ru.novosoft.uml.behavior.use_cases.MUseCase museCase)

Defines an Action object with the specified description which will use the given reflection methods to modify boolean values in a MUseCase object.

Parameters:
name - the text for the actions menu item
propertyName - the name of the modifier property to be amended
getMethod - the name of the getter method to retrieve the property
setMethod - the name of the setter method to change the property
museCase - the use case object containing the modifier property.

ActionModifier

public ActionModifier(java.lang.String name,
                      java.lang.String propertyName,
                      java.lang.String getMethod,
                      java.lang.String setMethod,
                      ru.novosoft.uml.behavior.use_cases.MUseCase museCase,
                      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 a MUseCase object.

Parameters:
name - The text for the actions menu item.
propertyName - The name of the modifier property to be amended.
getMethod - The name of the getter method to retrieve the property.
setMethod - The name of the setter method to change the property.
museCase - The use case object containing the modifier property.
enumClass - The class representing the enumeration.
trueValue - The enumerated value representing true.
falseValue - The enumerated value representing false.
Method Detail

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


ArgoUML © 1996-2003 (20040125)ArgoUML Project HomeArgoUML Cookbook