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
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 affectedpoint
- The location it was removed from or added totype
- 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)
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()