hep.wired.edit
Class AnimatedWiredEdit

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by org.freehep.swing.undo.AbstractDoableEdit
          extended by org.freehep.swing.undo.AnimatedEdit
              extended by hep.wired.edit.WiredEdit
                  extended by hep.wired.edit.AnimatedWiredEdit
All Implemented Interfaces:
Edit, WiredRegistry.ID, Serializable, UndoableEdit, org.freehep.swing.undo.DoableEdit, org.freehep.swing.undo.LinkableEdit
Direct Known Subclasses:
Rotate, Scale, Shear, Transform2D, Translate

public abstract class AnimatedWiredEdit
extends WiredEdit

Base class for an animated single edit. This class contains a shape to be animated in a certain number of frames, and handles the animation.

Version:
$Id: AnimatedWiredEdit.java 8598 2006-08-14 20:38:02Z duns $
Author:
Mark Donszelmann
See Also:
Serialized Form

Field Summary
 
Fields inherited from class hep.wired.edit.WiredEdit
format
 
Fields inherited from class org.freehep.swing.undo.AbstractDoableEdit
firstTimeDone
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
AnimatedWiredEdit()
          Creates an animated edit with zero frames and no shape.
AnimatedWiredEdit(Shape initialShape, int frames)
          Creates an animated edit with given initial shape and number of frames.
 
Method Summary
protected  void endAnimation()
          Ends the animation by removing the last drawn shape from the plot and changing the plot to normal mode again.
protected  Shape getShape()
          Returns the initial shape.
protected  Shape[] getShapes(Shape initialShape, int frames)
          Returns an array of 'frames' shapes deformed from the given initial shape.
protected  void showAnimation(int frameNo)
          Shows frameNo in the plot by drawing its shape.
protected  void startAnimation(boolean redo)
          Starts the animation by calling getShapes() to get the set of 'framed' shapes.
 String toString()
          Returns a string representation of the edit.
 
Methods inherited from class hep.wired.edit.WiredEdit
copy, getID, getRecordPlot, setRecordPlot
 
Methods inherited from class org.freehep.swing.undo.AnimatedEdit
createTransformedShape, getFrames, getNextEdit, getParent, getPreviousEdit, redo, redoEdit, setNextEdit, setParent, setPreviousEdit, undo, undoEdit
 
Methods inherited from class org.freehep.swing.undo.AbstractDoableEdit
canRedo, canUndo
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.undo.UndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit
 

Constructor Detail

AnimatedWiredEdit

public AnimatedWiredEdit()
Creates an animated edit with zero frames and no shape.


AnimatedWiredEdit

public AnimatedWiredEdit(Shape initialShape,
                         int frames)
Creates an animated edit with given initial shape and number of frames.

Method Detail

getShape

protected Shape getShape()
Returns the initial shape.


getShapes

protected Shape[] getShapes(Shape initialShape,
                            int frames)
Returns an array of 'frames' shapes deformed from the given initial shape.


startAnimation

protected void startAnimation(boolean redo)
Starts the animation by calling getShapes() to get the set of 'framed' shapes. The plot is set into fast mode.

Overrides:
startAnimation in class WiredEdit

showAnimation

protected void showAnimation(int frameNo)
Shows frameNo in the plot by drawing its shape.

Overrides:
showAnimation in class WiredEdit

endAnimation

protected void endAnimation()
Ends the animation by removing the last drawn shape from the plot and changing the plot to normal mode again.

Overrides:
endAnimation in class WiredEdit

toString

public String toString()
Returns a string representation of the edit.

Overrides:
toString in class WiredEdit


Copyright © 1996-2013 FreeHEP. All Rights Reserved.