public class TransformEdit
extends javax.swing.undo.AbstractUndoableEdit
UndoableEdit event which can undo a lossless transform of
Figures 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.UndoableEditgetPresentationName in class javax.swing.undo.AbstractUndoableEditpublic boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
addEdit in interface javax.swing.undo.UndoableEditaddEdit in class javax.swing.undo.AbstractUndoableEditpublic boolean replaceEdit(javax.swing.undo.UndoableEdit anEdit)
replaceEdit in interface javax.swing.undo.UndoableEditreplaceEdit in class javax.swing.undo.AbstractUndoableEditpublic void redo()
throws javax.swing.undo.CannotRedoException
redo in interface javax.swing.undo.UndoableEditredo in class javax.swing.undo.AbstractUndoableEditjavax.swing.undo.CannotRedoExceptionpublic void undo()
throws javax.swing.undo.CannotUndoException
undo in interface javax.swing.undo.UndoableEditundo in class javax.swing.undo.AbstractUndoableEditjavax.swing.undo.CannotUndoExceptionpublic java.lang.String toString()
toString in class javax.swing.undo.AbstractUndoableEdit