public class TransformEdit
extends javax.swing.undo.AbstractUndoableEdit
UndoableEdit
event which can undo a lossless transform of
Figure
s by applying the inverse of the transform to the figures.
This object is useful for undoing lossless transformations, such as the translation of figures.
If a lossy transforms is performed, such as rotation, scaling or shearing,
then undos should be performed with TransformRestoreEdit
instead.
Constructor and Description |
---|
TransformEdit(java.util.Collection<Figure> figures,
java.awt.geom.AffineTransform tx) |
TransformEdit(Figure figure,
java.awt.geom.AffineTransform tx)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit) |
java.lang.String |
getPresentationName() |
void |
redo() |
boolean |
replaceEdit(javax.swing.undo.UndoableEdit anEdit) |
java.lang.String |
toString() |
void |
undo() |
public TransformEdit(Figure figure, java.awt.geom.AffineTransform tx)
public TransformEdit(java.util.Collection<Figure> figures, java.awt.geom.AffineTransform tx)
public java.lang.String getPresentationName()
getPresentationName
in interface javax.swing.undo.UndoableEdit
getPresentationName
in class javax.swing.undo.AbstractUndoableEdit
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
addEdit
in interface javax.swing.undo.UndoableEdit
addEdit
in class javax.swing.undo.AbstractUndoableEdit
public boolean replaceEdit(javax.swing.undo.UndoableEdit anEdit)
replaceEdit
in interface javax.swing.undo.UndoableEdit
replaceEdit
in class javax.swing.undo.AbstractUndoableEdit
public void redo() throws javax.swing.undo.CannotRedoException
redo
in interface javax.swing.undo.UndoableEdit
redo
in class javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CannotRedoException
public void undo() throws javax.swing.undo.CannotUndoException
undo
in interface javax.swing.undo.UndoableEdit
undo
in class javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CannotUndoException
public java.lang.String toString()
toString
in class javax.swing.undo.AbstractUndoableEdit