hep.wired.edit
Class WiredEdit

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
All Implemented Interfaces:
Edit, WiredRegistry.ID, Serializable, UndoableEdit, org.freehep.swing.undo.DoableEdit, org.freehep.swing.undo.LinkableEdit
Direct Known Subclasses:
AnimatedWiredEdit, NoOperation, Reset, SetScale, SetTranslate

public abstract class WiredEdit
extends org.freehep.swing.undo.AnimatedEdit
implements Edit

Base class for a non-animated single edit. This class keeps the plot when the edit is posted to the plot.

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

Field Summary
protected static org.freehep.util.ScientificFormat format
           
 
Fields inherited from class org.freehep.swing.undo.AbstractDoableEdit
firstTimeDone
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
WiredEdit()
          Creates an Edit with zero frames.
WiredEdit(int frames)
          Creates and edit with given frames.
 
Method Summary
abstract  WiredEdit copy(RecordPlot plot)
          Creates a copy of the edit which is attached to the plot, and thus can be (re/un)done.
protected  void endAnimation()
          Called when the animation is to be ended.
 String getID()
           
protected  RecordPlot getRecordPlot()
          Returns the record plot to which this edit was sent.
 void setRecordPlot(RecordPlot recordPlot)
          To be called as part of the copy procedure to set the recordPlot variable.
protected  void showAnimation(int frameNo)
          Called when the given frameNo is to be shown.
protected  void startAnimation(boolean redo)
          Called when an animation is started.
 String toString()
           
 
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
 

Field Detail

format

protected static org.freehep.util.ScientificFormat format
Constructor Detail

WiredEdit

public WiredEdit()
Creates an Edit with zero frames.


WiredEdit

public WiredEdit(int frames)
Creates and edit with given frames.

Method Detail

toString

public String toString()
Overrides:
toString in class org.freehep.swing.undo.AnimatedEdit

getID

public String getID()
Specified by:
getID in interface WiredRegistry.ID

getRecordPlot

protected RecordPlot getRecordPlot()
Returns the record plot to which this edit was sent. Returns null if the edit was not (yet) sent to a plot.


setRecordPlot

public void setRecordPlot(RecordPlot recordPlot)
To be called as part of the copy procedure to set the recordPlot variable.


copy

public abstract WiredEdit copy(RecordPlot plot)
Creates a copy of the edit which is attached to the plot, and thus can be (re/un)done.


startAnimation

protected void startAnimation(boolean redo)
Called when an animation is started. Redo is set when the animation is to run forward, e.g. the edit is (re-)done. Default implementation is a null method.

Specified by:
startAnimation in class org.freehep.swing.undo.AnimatedEdit

showAnimation

protected void showAnimation(int frameNo)
Called when the given frameNo is to be shown. Default implementation is a null method.

Specified by:
showAnimation in class org.freehep.swing.undo.AnimatedEdit

endAnimation

protected void endAnimation()
Called when the animation is to be ended. Default implementation is a null method.

Specified by:
endAnimation in class org.freehep.swing.undo.AnimatedEdit


Copyright © 1996-2013 FreeHEP. All Rights Reserved.