JHotDraw 6.0b1

org.jhotdraw.samples.javadraw
Class AnimationDecorator

java.lang.Object
  extended by org.jhotdraw.standard.AbstractFigure
      extended by org.jhotdraw.standard.DecoratorFigure
          extended by org.jhotdraw.samples.javadraw.AnimationDecorator
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Figure, FigureChangeListener, Animatable, Storable

public class AnimationDecorator
extends DecoratorFigure
implements Animatable

See Also:
Serialized Form

Constructor Summary
AnimationDecorator()
           
AnimationDecorator(Figure figure)
           
 
Method Summary
 void animationStep()
          Perform a step of the animation.
 void basicDisplayBox(java.awt.Point origin, java.awt.Point corner)
          Forwards basicDisplayBox to its contained figure.
 void basicMoveBy(int x, int y)
          Forwards basicMoveBy to its contained figure.
 java.awt.Rectangle displayBox()
          Forwards displayBox to its contained figure.
 void read(StorableInput dr)
          Reads itself and the contained figure from the StorableInput.
 java.awt.Point velocity()
           
 void velocity(int xVelocity, int yVelocity)
           
 void write(StorableOutput dw)
          Writes itself and the contained figure to the StorableOutput.
 
Methods inherited from class org.jhotdraw.standard.DecoratorFigure
addDependendFigure, canConnect, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, decorate, draw, figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate, figures, findFigureInside, getAttribute, getAttribute, getDecoratedFigure, getDependendFigures, getTextHolder, handles, includes, initialize, moveBy, peelDecoration, release, removeDependendFigure, setAttribute, setAttribute, setDecoratedFigure
 
Methods inherited from class org.jhotdraw.standard.AbstractFigure
addFigureChangeListener, addToContainer, center, changed, clone, displayBox, displayBox, getZValue, invalidate, invalidateRectangle, isEmpty, listener, removeFigureChangeListener, removeFromContainer, setZValue, size, visit, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationDecorator

public AnimationDecorator()

AnimationDecorator

public AnimationDecorator(Figure figure)
Method Detail

velocity

public void velocity(int xVelocity,
                     int yVelocity)

velocity

public java.awt.Point velocity()

animationStep

public void animationStep()
Description copied from interface: Animatable
Perform a step of the animation.

Specified by:
animationStep in interface Animatable

basicMoveBy

public void basicMoveBy(int x,
                        int y)
Description copied from class: DecoratorFigure
Forwards basicMoveBy to its contained figure.

Overrides:
basicMoveBy in class DecoratorFigure
See Also:
AbstractFigure.moveBy(int, int)

basicDisplayBox

public void basicDisplayBox(java.awt.Point origin,
                            java.awt.Point corner)
Description copied from class: DecoratorFigure
Forwards basicDisplayBox to its contained figure.

Specified by:
basicDisplayBox in interface Figure
Overrides:
basicDisplayBox in class DecoratorFigure
Parameters:
origin - the new origin
corner - the new corner
See Also:
AbstractFigure.displayBox(java.awt.Point, java.awt.Point)

displayBox

public java.awt.Rectangle displayBox()
Description copied from class: DecoratorFigure
Forwards displayBox to its contained figure.

Specified by:
displayBox in interface Figure
Overrides:
displayBox in class DecoratorFigure
See Also:
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)

write

public void write(StorableOutput dw)
Description copied from class: DecoratorFigure
Writes itself and the contained figure to the StorableOutput.

Specified by:
write in interface Storable
Overrides:
write in class DecoratorFigure

read

public void read(StorableInput dr)
          throws java.io.IOException
Description copied from class: DecoratorFigure
Reads itself and the contained figure from the StorableInput.

Specified by:
read in interface Storable
Overrides:
read in class DecoratorFigure
Throws:
java.io.IOException

JHotDraw 6.0b1