VTT Java
2010 Version

gov.nih.nlm.nls.vtt.Model
Class UndoManager

java.lang.Object
  extended by gov.nih.nlm.nls.vtt.Model.UndoManager

public class UndoManager
extends java.lang.Object

This is the undo manager java class which manages the list of Undo Java objects. This class is used directly in VTT for undo and redo operations.

History:

Version:
V-2010
Author:
NLM NLS Development Team, clu

Constructor Summary
UndoManager()
          Create an undo manager Java object with default values.
 
Method Summary
 void AddUndoNode(UndoNode undo)
          Add Undo node to undoNodes list.
 int GetIndex()
          Get the index.
 int GetSize()
          Get the size of the undo nodes list.
 UndoNode GetUndoNode(int index)
          Get the undo node of the specified index.
 java.util.Vector<UndoNode> GetUndoNodes()
          Get the undo nodes list.
 void IncreaseIndex()
          Increase index of current undo nodes list.
 boolean IsRedoable()
          Check if redoable.
 boolean IsUndoable()
          Check if undoable.
 void ReduceIndex()
          Decrease index of current undo nodes list.
 void Reset()
          Reset the undo manager.
 java.lang.String ToString()
          Converts undos to String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndoManager

public UndoManager()
Create an undo manager Java object with default values.

Method Detail

AddUndoNode

public void AddUndoNode(UndoNode undo)
Add Undo node to undoNodes list.

Parameters:
undo - the undo node to be added

GetIndex

public int GetIndex()
Get the index. The index is the current pointer on the undos list.

Returns:
The current index on the undos list

GetUndoNode

public UndoNode GetUndoNode(int index)
Get the undo node of the specified index.

Parameters:
index - the index of interest
Returns:
undo node of the specified index from the undo nodes list

GetSize

public int GetSize()
Get the size of the undo nodes list.

Returns:
the size of the undo nodes list

GetUndoNodes

public java.util.Vector<UndoNode> GetUndoNodes()
Get the undo nodes list.

Returns:
a vector of the undo nodes

IsUndoable

public boolean IsUndoable()
Check if undoable.

Returns:
a boolean flag of undoable for the indexed undo node

IsRedoable

public boolean IsRedoable()
Check if redoable.

Returns:
a boolean flag of redoable for the indexed undo node

IncreaseIndex

public void IncreaseIndex()
Increase index of current undo nodes list.


ReduceIndex

public void ReduceIndex()
Decrease index of current undo nodes list.


ToString

public java.lang.String ToString()
Converts undos to String representation.

Returns:
the string representation of undo nodes list

Reset

public void Reset()
Reset the undo manager.


VTT Java
2010 Version

Submit a bug or feature

Copyright © 2010 National Library of Medicine