public class Area2DChangeROIEdit extends AbstractROIEdit
Constructor and Description |
---|
Area2DChangeROIEdit(ROI2DArea roi,
BooleanMask2D oldMask) |
Area2DChangeROIEdit(ROI2DArea roi,
BooleanMask2D oldMask,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(javax.swing.undo.UndoableEdit edit) |
void |
die()
Sets
alive to false. |
ROI2DArea |
getROI2DArea() |
void |
redo()
Throws
CannotRedoException if canRedo returns false. |
void |
undo()
Throws
CannotUndoException if canUndo returns false . |
getROI
canRedo, canUndo, getIcon, getPresentationName, getRedoPresentationName, getSource, getUndoPresentationName, isMergeable, isSignificant, replaceEdit, setMergeable, toString
public Area2DChangeROIEdit(ROI2DArea roi, BooleanMask2D oldMask, java.lang.String name)
public Area2DChangeROIEdit(ROI2DArea roi, BooleanMask2D oldMask)
public ROI2DArea getROI2DArea()
public void undo() throws javax.swing.undo.CannotUndoException
AbstractIcyUndoableEdit
CannotUndoException
if canUndo
returns false
.
Sets hasBeenDone
to false
. Subclasses should override to undo the
operation represented by this edit. Override should begin with
a call to super.undo
in interface javax.swing.undo.UndoableEdit
undo
in class AbstractIcyUndoableEdit
javax.swing.undo.CannotUndoException
- if canUndo
returns false
AbstractIcyUndoableEdit.canUndo()
public void redo() throws javax.swing.undo.CannotRedoException
AbstractIcyUndoableEdit
CannotRedoException
if canRedo
returns false. Sets
hasBeenDone
to true
.
Subclasses should override to redo the operation represented by
this edit. Override should begin with a call to super.redo
in interface javax.swing.undo.UndoableEdit
redo
in class AbstractIcyUndoableEdit
javax.swing.undo.CannotRedoException
- if canRedo
returns false
AbstractIcyUndoableEdit.canRedo()
public boolean addEdit(javax.swing.undo.UndoableEdit edit)
addEdit
in interface javax.swing.undo.UndoableEdit
addEdit
in class AbstractIcyUndoableEdit
public void die()
AbstractIcyUndoableEdit
alive
to false. Note that this is a one way operation; dead edits cannot be
resurrected.undo
or redo
to a dead edit results in an exception being
thrown.
Typically an edit is killed when it is consolidated by another edit's addEdit
or
replaceEdit
method, or when it is dequeued from an UndoManager
.
die
in interface javax.swing.undo.UndoableEdit
die
in class AbstractIcyUndoableEdit