UndoRedo V1.2
by Matthew Ford
2005/06/27

au.com.forward.undoRedo
Class BranchUndoRedo

java.lang.Object
  extended by au.com.forward.undoRedo.UndoRedo
      extended by au.com.forward.undoRedo.BranchUndoRedo
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.undo.UndoableEdit

public class BranchUndoRedo
extends UndoRedo

An UndoRedo node that starts a Redo Branch.


Nested Class Summary
static class BranchUndoRedo.BranchUndoableEdit
          A dummy UndoableEdit for the BranchUndoRedo node to wrap.
 
Field Summary
static javax.swing.undo.UndoableEdit BRANCH_UNDOABLE_EDIT
           
 
Fields inherited from class au.com.forward.undoRedo.UndoRedo
ALL_REDONE_PREFIX, DEAD_FORMAT, edit, HTML_START, INSIGNIFICANT_FORMAT, REDONE_PREFIX, UNREACHABLE_FORMAT
 
Constructor Summary
BranchUndoRedo()
          Creates a new instance of BranchUndoRedo.
 
Method Summary
 boolean equalsComplement(UndoRedo complement)
          Returns true if the obj is the complement of this BranchUndoRedo.
 java.lang.String getBranchSuffix()
          Returns the current suffix.
 UndoRedo getComplement()
          Get the complement of this object, keep reference to edit.
 void setBranchSuffix(java.lang.String name)
          Sets the string suffix used for Branch Node lables.
 java.lang.String toString()
          Returns the string represenation of this BranchNode, includes the suffix.
 
Methods inherited from class au.com.forward.undoRedo.UndoRedo
addEdit, canRedo, canUndo, clone, die, equalsComplement, escapeHTML, getPresentationName, getRedoPresentationName, getUndoableEdit, getUndoPresentationName, isDead, isSignificant, isUndo, isUnreachable, redo, replaceEdit, setUnreachable, undo
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BRANCH_UNDOABLE_EDIT

public static final javax.swing.undo.UndoableEdit BRANCH_UNDOABLE_EDIT
Constructor Detail

BranchUndoRedo

public BranchUndoRedo()
Creates a new instance of BranchUndoRedo.
The wrapped UndoableEdit is a dummy.

Method Detail

equalsComplement

public boolean equalsComplement(UndoRedo complement)
Returns true if the obj is the complement of this BranchUndoRedo. UndoRedo complements wrap the same UndoableEdit object but have complementary undo settings. BranchUndoRedo should never have complements.

Parameters:
complement - the object to test
Returns:
true if the object is the complement of this BranchUndoRedo

setBranchSuffix

public void setBranchSuffix(java.lang.String name)
Sets the string suffix used for Branch Node lables.

Parameters:
name - the suffix to use.

getBranchSuffix

public java.lang.String getBranchSuffix()
Returns the current suffix.

Returns:
the current suffix added to the Branch Node lables.

toString

public java.lang.String toString()
Returns the string represenation of this BranchNode, includes the suffix.

Overrides:
toString in class UndoRedo
Returns:
the string representation of this BranchNode. Used for the Tree Node lable.

getComplement

public UndoRedo getComplement()
Get the complement of this object, keep reference to edit. Actually never have complement so just return clone.

Overrides:
getComplement in class UndoRedo
Returns:
the clone of this BranchUndoRedo node.

©2005, Forward Computing and Control Pty. Ltd
ACN 003 669 994   NSW Australia
All Rights Reserved.