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

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

public class ActionMoveElement
extends java.lang.Object
implements Action

Moves an element from one location of the UIObject to another container type object.

Author:
raphael

Constructor Summary
ActionMoveElement(Reference target)
          Creates a move element action.
 
Method Summary
 boolean equals(Action c)
           
 void execute(State state, UiObject location, Command executer)
          The move is realized by performing a copy and a remove action in sequence.
 void executeRedo(State state, HistoryRecord record, Command executer)
          Move actions are not redone since they don't physically exist in the history.
 void executeReversal(State state, HistoryRecord record, Command executer)
          Move actions are not reversed since they don't physically exist in the history.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionMoveElement

public ActionMoveElement(Reference target)
Creates a move element action. A reference to the container type object which is the target location has to be passed as a parameter. The reference can be absolute or relative. The distinction is important if the same action is used for performing several moves of different objects (e.g. as part of a generalized move command). If the reference is absolute, all elements will be moved to the equivalent container. If the reference is relative, the target containers depend on the location of the element.

Parameters:
target -
Method Detail

execute

public void execute(State state,
                    UiObject location,
                    Command executer)
             throws ConditionViolationException
The move is realized by performing a copy and a remove action in sequence.

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

executeReversal

public void executeReversal(State state,
                            HistoryRecord record,
                            Command executer)
Move actions are not reversed since they don't physically exist in the history. Move actions generate a copy and a remove, both of which are reversed individually.

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

executeRedo

public void executeRedo(State state,
                        HistoryRecord record,
                        Command executer)
Move actions are not redone since they don't physically exist in the history. Move actions generate a copy and a remove, both of which are redone individually.

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

toString

public java.lang.String toString()

equals

public boolean equals(Action c)