edu.washington.cs.supple.customization.command
Class ActionRemoveDynamicElement

java.lang.Object
  extended byedu.washington.cs.supple.customization.command.ActionRemoveDynamicElement
All Implemented Interfaces:
Action

public class ActionRemoveDynamicElement
extends java.lang.Object
implements Action

Removing a dynamic window allows to shortcut dialogs. E.g., pressing the print button on the toolbar may automatically invoke the print function instead of displaying the printer dialog.

Author:
raphael

Field Summary
protected  Reference actionReference
           
protected  UiObject creator
           
protected  java.util.Collection dependencies
           
 
Constructor Summary
ActionRemoveDynamicElement(Reference actionReference, java.util.Collection dependencies, UiObject creator)
          Creates a remove dynamic element action.
 
Method Summary
 boolean equals(Action c)
           
 void execute(State state, UiObject location, Command executer)
          Executes an action.
 void executeRedo(State s, HistoryRecord record, Command executer)
          Executes a redo action.
 void executeReversal(State s, HistoryRecord record, Command executer)
          Executes a reverse action.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

actionReference

protected Reference actionReference

dependencies

protected java.util.Collection dependencies

creator

protected UiObject creator
Constructor Detail

ActionRemoveDynamicElement

public ActionRemoveDynamicElement(Reference actionReference,
                                  java.util.Collection dependencies,
                                  UiObject creator)
Creates a remove dynamic element action. "creator" defines the UiObject (e.g. button) that created the dynamic element (e.g. window). It is required to also define what the system should do instead of displaying the dynamic element. The action that will be executed instead of displaying the dynamic element is referenced by "actionReference". In order to be able to execute "actionReference", it might be required that certain state variable have values. For instance, the invocation of the print command requires the value of the state variable numberOfCopies. These dependencies are passed as a collection of references.

Parameters:
actionReference -
dependencies -
creator -
Method Detail

execute

public void execute(State state,
                    UiObject location,
                    Command executer)
Description copied from interface: Action
Executes an action.

Specified by:
execute in interface Action
Parameters:
state -
location -
executer -

executeReversal

public void executeReversal(State s,
                            HistoryRecord record,
                            Command executer)
Description copied from interface: Action
Executes a reverse action.

Specified by:
executeReversal in interface Action
Parameters:
s -
record -
executer -

executeRedo

public void executeRedo(State s,
                        HistoryRecord record,
                        Command executer)
Description copied from interface: Action
Executes a redo action.

Specified by:
executeRedo in interface Action
Parameters:
s -
record -
executer -

toString

public java.lang.String toString()

equals

public boolean equals(Action c)