hep.wired.edit
Class Transform2D
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
org.freehep.swing.undo.AbstractDoableEdit
org.freehep.swing.undo.AnimatedEdit
hep.wired.edit.WiredEdit
hep.wired.edit.AnimatedWiredEdit
hep.wired.edit.Transform2D
- All Implemented Interfaces:
- GraphicsPanelEdit, Edit, WiredRegistry.ID, Serializable, UndoableEdit, org.freehep.swing.undo.DoableEdit, org.freehep.swing.undo.LinkableEdit
public class Transform2D
- extends AnimatedWiredEdit
- implements GraphicsPanelEdit
Transforms a plot in 2D.
- Version:
- $Id: Transform2D.java 8598 2006-08-14 20:38:02Z duns $
- Author:
- Mark Donszelmann
- See Also:
- Serialized Form
Fields inherited from class org.freehep.swing.undo.AbstractDoableEdit |
firstTimeDone |
Constructor Summary |
Transform2D()
Creates a transform edit with no changes. |
Transform2D(double sx,
double shy,
double shx,
double sy,
double tx,
double ty)
Creates a transform edit with given scaling, shearing and translation. |
Transform2D(double sx,
double shy,
double shx,
double sy,
double tx,
double ty,
Shape shape,
int frames)
Creates a transform edit with given scaling, shearing, translation,
animation shape and number of frames. |
Methods inherited from class org.freehep.swing.undo.AnimatedEdit |
getFrames, getNextEdit, getParent, getPreviousEdit, redo, setNextEdit, setParent, setPreviousEdit, undo |
Methods inherited from class org.freehep.swing.undo.AbstractDoableEdit |
canRedo, canUndo |
Transform2D
public Transform2D()
- Creates a transform edit with no changes.
Transform2D
public Transform2D(double sx,
double shy,
double shx,
double sy,
double tx,
double ty)
- Creates a transform edit with given scaling, shearing and translation.
Transform2D
public Transform2D(double sx,
double shy,
double shx,
double sy,
double tx,
double ty,
Shape shape,
int frames)
- Creates a transform edit with given scaling, shearing, translation,
animation shape and number of frames.
copy
public WiredEdit copy(RecordPlot plot)
- Description copied from class:
WiredEdit
- Creates a copy of the edit which is attached to the plot, and thus can be
(re/un)done.
- Specified by:
copy
in class WiredEdit
getShapes
protected Shape[] getShapes(Shape shape,
int steps)
- Description copied from class:
AnimatedWiredEdit
- Returns an array of 'frames' shapes deformed from the given initial
shape.
- Overrides:
getShapes
in class AnimatedWiredEdit
createTransformedShape
public Shape createTransformedShape(Component component,
Shape shape)
- Overrides:
createTransformedShape
in class org.freehep.swing.undo.AnimatedEdit
getPresentationName
public String getPresentationName()
- Specified by:
getPresentationName
in interface UndoableEdit
- Overrides:
getPresentationName
in class AbstractUndoableEdit
addEdit
public boolean addEdit(UndoableEdit edit)
- Specified by:
addEdit
in interface UndoableEdit
- Overrides:
addEdit
in class AbstractUndoableEdit
isSupportedBy
public boolean isSupportedBy(GraphicsPanel p)
- Description copied from interface:
GraphicsPanelEdit
- Returns true if this edit is supported by the given graphics panel.
- Specified by:
isSupportedBy
in interface GraphicsPanelEdit
- Parameters:
p
- panel by which this edit will be handled.
- Returns:
- true if the edit is supported.
redoEdit
protected void redoEdit()
- Specified by:
redoEdit
in class org.freehep.swing.undo.AnimatedEdit
undoEdit
protected void undoEdit()
- Specified by:
undoEdit
in class org.freehep.swing.undo.AnimatedEdit
toString
public String toString()
- Description copied from class:
AnimatedWiredEdit
- Returns a string representation of the edit.
- Overrides:
toString
in class AnimatedWiredEdit
Copyright © 1996-2013 FreeHEP. All Rights Reserved.