Synergy Home Page

au.edu.swin.synergy.plugin.diagram
Class BViewport.BUndoableEdit

java.lang.Object
  |
  +--javax.swing.undo.AbstractUndoableEdit
        |
        +--au.edu.swin.synergy.plugin.diagram.BViewport.BUndoableEdit

public class BViewport.BUndoableEdit
extends AbstractUndoableEdit

Every time an edit is made, this will be used to determine what to do when it is undone or redone.

Author:
Tristan Austin
See Also:
Serialized Form

Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
BViewport.BUndoableEdit(BDrawable[] drawable, BScalarPoint point, int type)
           
BViewport.BUndoableEdit(BDrawable drawable, BScalarPoint point, int type)
          Creates a new undoable event for the specified drawable and type.
BViewport.BUndoableEdit(BDrawable drawable, BScalarPoint point, int param, int type)
           
BViewport.BUndoableEdit(BDrawable drawable, Point point, int type)
           
 
Method Summary
 String getPresentationName()
          Returns an appropriate description of the operation this edit represents.
 String getRedoPresentationName()
          If getPresentationName() returns "", returns AbstractUndoableEdit.RedoName.
 String getUndoPresentationName()
          If getPresentationName() returns "", returns AbstractUndoableEdit.UndoName.
 void redo()
          Re-apply the edit, assuming that it has been undone.
 void undo()
          Undo the edit that was made.
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, isSignificant, replaceEdit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BViewport.BUndoableEdit

public BViewport.BUndoableEdit(BDrawable drawable,
                               BScalarPoint point,
                               int type)
Creates a new undoable event for the specified drawable and type.
Parameters:
drawable - The element affected
point - The location it was removed from or added to
type - Whether it was added or removed

BViewport.BUndoableEdit

public BViewport.BUndoableEdit(BDrawable drawable,
                               Point point,
                               int type)

BViewport.BUndoableEdit

public BViewport.BUndoableEdit(BDrawable[] drawable,
                               BScalarPoint point,
                               int type)

BViewport.BUndoableEdit

public BViewport.BUndoableEdit(BDrawable drawable,
                               BScalarPoint point,
                               int param,
                               int type)
Method Detail

undo

public void undo()
          throws CannotUndoException
Undo the edit that was made.
Overrides:
undo in class AbstractUndoableEdit

redo

public void redo()
          throws CannotRedoException
Re-apply the edit, assuming that it has been undone.
Overrides:
redo in class AbstractUndoableEdit

getPresentationName

public String getPresentationName()
Returns an appropriate description of the operation this edit represents.
Overrides:
getPresentationName in class AbstractUndoableEdit
See Also:
getUndoPresentationName(), getRedoPresentationName()

getUndoPresentationName

public String getUndoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.UndoName. Otherwise returns AbstractUndoableEdit.UndoName followed by a space and getPresentationName()
Overrides:
getUndoPresentationName in class AbstractUndoableEdit
See Also:
getPresentationName()

getRedoPresentationName

public String getRedoPresentationName()
If getPresentationName() returns "", returns AbstractUndoableEdit.RedoName. Otherwise returns AbstractUndoableEdit.RedoName followed by a space and getPresentationName()
Overrides:
getRedoPresentationName in class AbstractUndoableEdit
See Also:
getPresentationName()

Synergy Home Page