org.nakedobjects.viewer.lightweight.options
Class ObjectOption

java.lang.Object
  extended byorg.nakedobjects.viewer.lightweight.MenuOption
      extended byorg.nakedobjects.viewer.lightweight.options.AbstractObjectOption
          extended byorg.nakedobjects.viewer.lightweight.options.ObjectOption
All Implemented Interfaces:
UserAction

public class ObjectOption
extends AbstractObjectOption

Options for an underlying object determined dynamically by looking for methods starting with action, veto and option for specifying the action, vetoing the option and giving the option an name respectively.


Method Summary
protected static ObjectOption createOption(Action action, NakedObject object)
           
 Permission disabled(Workspace frame, ObjectView view, Location location)
           
 void execute(Workspace workspace, ObjectView view, Location at)
           
static void menuOptions(NakedClass cls, MenuOptionSet menuOptionSet)
           
static void menuOptions(NakedObject object, MenuOptionSet menuOptionSet)
          Queries the ObjectInterface class for the ObjectInterface for the specified object and looks for Options to offer to the user adding them to the MenuOptionSet.
 java.lang.String toString()
           
 
Methods inherited from class org.nakedobjects.viewer.lightweight.options.AbstractObjectOption
disabled, execute, getDescription
 
Methods inherited from class org.nakedobjects.viewer.lightweight.MenuOption
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createOption

protected static ObjectOption createOption(Action action,
                                           NakedObject object)

execute

public void execute(Workspace workspace,
                    ObjectView view,
                    Location at)
Specified by:
execute in class AbstractObjectOption

menuOptions

public static void menuOptions(NakedObject object,
                               MenuOptionSet menuOptionSet)
Queries the ObjectInterface class for the ObjectInterface for the specified object and looks for Options to offer to the user adding them to the MenuOptionSet.


menuOptions

public static void menuOptions(NakedClass cls,
                               MenuOptionSet menuOptionSet)

disabled

public Permission disabled(Workspace frame,
                           ObjectView view,
                           Location location)
Overrides:
disabled in class AbstractObjectOption

toString

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