JHotDraw 6.0b1

org.jhotdraw.samples.javadraw
Class BouncingDrawing

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

public class BouncingDrawing
extends StandardDrawing
implements Animatable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jhotdraw.standard.CompositeFigure
_nHighestZ, _nLowestZ, fFigures
 
Constructor Summary
BouncingDrawing()
           
 
Method Summary
 Figure add(Figure figure)
          Adds a figure to the list of figures.
 void animationStep()
          Perform a step of the animation.
 Figure remove(Figure figure)
          Removes a figure from the composite.
 Figure replace(Figure figure, Figure replacement)
          Replaces a figure in the drawing without removing it from the drawing.
 
Methods inherited from class org.jhotdraw.standard.StandardDrawing
addDrawingChangeListener, basicDisplayBox, displayBox, drawingChangeListeners, figureInvalidated, figureRequestUpdate, fireDrawingTitleChanged, getTitle, handles, lock, orphan, removeDrawingChangeListener, setTitle, unlock
 
Methods inherited from class org.jhotdraw.standard.CompositeFigure
addAll, addAll, basicMoveBy, bringToFront, containsFigure, draw, draw, figureAt, figureChanged, figureCount, figureRemoved, figureRequestRemove, figures, figures, figuresReverse, findFigure, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, getFigureFromLayer, getLayer, includes, init, orphanAll, orphanAll, read, release, removeAll, removeAll, removeAll, sendToBack, sendToLayer, write
 
Methods inherited from class org.jhotdraw.standard.AbstractFigure
addDependendFigure, addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, getAttribute, getAttribute, getDecoratedFigure, getDependendFigures, getTextHolder, getZValue, invalidate, invalidateRectangle, isEmpty, listener, moveBy, removeDependendFigure, removeFigureChangeListener, removeFromContainer, setAttribute, setAttribute, setZValue, size, visit, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jhotdraw.framework.Drawing
addAll, addAll, bringToFront, containsFigure, draw, draw, figures, figures, figuresReverse, findFigure, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, getFigureFromLayer, getLayer, includes, init, orphanAll, orphanAll, release, removeAll, removeAll, sendToBack, sendToLayer
 
Methods inherited from interface org.jhotdraw.util.Storable
read, write
 
Methods inherited from interface org.jhotdraw.framework.FigureChangeListener
figureChanged, figureRemoved, figureRequestRemove
 

Constructor Detail

BouncingDrawing

public BouncingDrawing()
Method Detail

add

public Figure add(Figure figure)
Description copied from class: CompositeFigure
Adds a figure to the list of figures. Initializes the the figure's container.

Specified by:
add in interface Drawing
Overrides:
add in class StandardDrawing
Parameters:
figure - to be added to the drawing
Returns:
the figure that was inserted (might be different from the figure specified).

remove

public Figure remove(Figure figure)
Description copied from class: CompositeFigure
Removes a figure from the composite.

Specified by:
remove in interface Drawing
Overrides:
remove in class CompositeFigure
Parameters:
figure - that is part of the drawing and should be removed
Returns:
the figure that has been removed (might be different from the figure specified)
See Also:
CompositeFigure.removeAll(java.util.List)

replace

public Figure replace(Figure figure,
                      Figure replacement)
Description copied from class: CompositeFigure
Replaces a figure in the drawing without removing it from the drawing.

Specified by:
replace in interface Drawing
Overrides:
replace in class CompositeFigure
Parameters:
figure - figure to be replaced
replacement - figure that should replace the specified figure
Returns:
the figure that has been inserted (might be different from the figure specified)

animationStep

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

Specified by:
animationStep in interface Animatable

JHotDraw 6.0b1