org.nakedobjects.plugins.dnd.viewer.action
Class AbstractUserAction

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.action.AbstractUserAction
All Implemented Interfaces:
UserAction
Direct Known Subclasses:
AbstractObjectContent.DebugClearResolvedOption, AbstractObjectContent.ExplorationClone, AbstractObjectContent.ExplorationInstances, AbstractObjectOption, AbstractValueOption, ClearOneToManyAssociationOption, ClearOneToOneAssociationOption, CloseAllViewsForObjectOption, CloseAllViewsOption, CloseViewOption, DebugDumpSnapshotOption, DebugOption, DisposeObjectOption, IconizeViewOption, OpenViewOption, PrintOption, ReplaceViewOption, RevertFieldOption

public abstract class AbstractUserAction
extends java.lang.Object
implements UserAction

Each option that a user is shown in an objects popup menu a MenuOption. A MenuOption details: the name of an option (in the users language);

; a way to determine whether a user can select this option on the current object.


Field Summary
 
Fields inherited from interface org.nakedobjects.plugins.dnd.UserAction
DEBUG, EXPLORATION, USER
 
Constructor Summary
AbstractUserAction(java.lang.String name)
           
AbstractUserAction(java.lang.String name, NakedObjectActionType type)
           
 
Method Summary
 Consent disabled(View view)
          Indicate that this action is disabled
abstract  void execute(Workspace workspace, View view, Location at)
          Invoke this action.
 java.lang.String getDescription(View view)
          Returns the description of the action.
 java.lang.String getHelp(View view)
          Returns the help text for the action.
 java.lang.String getName(View view)
          Returns the stored name of the menu option.
 NakedObjectActionType getType()
          Returns the type of action: user, exploration, debug, or a set.
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractUserAction

public AbstractUserAction(java.lang.String name)

AbstractUserAction

public AbstractUserAction(java.lang.String name,
                          NakedObjectActionType type)
Method Detail

disabled

public Consent disabled(View view)
Description copied from interface: UserAction
Indicate that this action is disabled

Specified by:
disabled in interface UserAction

execute

public abstract void execute(Workspace workspace,
                             View view,
                             Location at)
Description copied from interface: UserAction
Invoke this action.

Specified by:
execute in interface UserAction

getDescription

public java.lang.String getDescription(View view)
Description copied from interface: UserAction
Returns the description of the action.

Specified by:
getDescription in interface UserAction

getHelp

public java.lang.String getHelp(View view)
Description copied from interface: UserAction
Returns the help text for the action.

Specified by:
getHelp in interface UserAction

getName

public java.lang.String getName(View view)
Returns the stored name of the menu option.

Specified by:
getName in interface UserAction

getType

public NakedObjectActionType getType()
Description copied from interface: UserAction
Returns the type of action: user, exploration, debug, or a set.

Specified by:
getType in interface UserAction

setName

public void setName(java.lang.String name)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.