VdexReload 1.1.3 API

uk.ac.reload.moonunit.dom
Class ReloadSchemaDocument.UndoableMoveAction

java.lang.Object
  extended byuk.ac.reload.moonunit.dom.ReloadSchemaDocument.UndoableMoveAction
All Implemented Interfaces:
UndoableAction
Enclosing class:
ReloadSchemaDocument

protected class ReloadSchemaDocument.UndoableMoveAction
extends java.lang.Object
implements UndoableAction

Handles Undo/Redo for Moving Elements


Constructor Summary
ReloadSchemaDocument.UndoableMoveAction(org.jdom.Element oldParent, org.jdom.Element newParent, org.jdom.Element element)
          Constructor
 
Method Summary
 java.lang.String getName()
          Gets the name of the move element
 void redo()
          Redo's a move by removing an element from the old parent and adding it to the new parent at the given index
 void undo()
          Undo's a move by removing the element from the new parent and adding to the old parent at the given index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReloadSchemaDocument.UndoableMoveAction

public ReloadSchemaDocument.UndoableMoveAction(org.jdom.Element oldParent,
                                               org.jdom.Element newParent,
                                               org.jdom.Element element)
Constructor

Parameters:
oldParent - the old parent element from which the given element is moved newParent the new parent element to which the given element is moved element the element to move
Method Detail

undo

public void undo()
Undo's a move by removing the element from the new parent and adding to the old parent at the given index

Specified by:
undo in interface UndoableAction

redo

public void redo()
Redo's a move by removing an element from the old parent and adding it to the new parent at the given index

Specified by:
redo in interface UndoableAction

getName

public java.lang.String getName()
Gets the name of the move element

Specified by:
getName in interface UndoableAction
Returns:
the name associated with this action

VdexReload 1.1.3 API