Class DiagBounce

java.lang.Object
  extended byDiagBounce
All Implemented Interfaces:
EtchASketchAnimator

public class DiagBounce
extends java.lang.Object
implements EtchASketchAnimator

You must implement this class as described in the description for Homework #5. Note that it currently returns dummy values to avoid compiler errors.


Constructor Summary
DiagBounce(int theWidth, int theHeight)
           
 
Method Summary
 Point getPoint(Point currentPos)
          This is a callback method that gets called once for every animation step.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagBounce

public DiagBounce(int theWidth,
                  int theHeight)
Method Detail

getPoint

public Point getPoint(Point currentPos)
Description copied from interface: EtchASketchAnimator
This is a callback method that gets called once for every animation step. It must return the position of the new point of the etch-a-sketch. The initial position is (100, 100), and after that always has the value returned by the previous call to getPoint().

Specified by:
getPoint in interface EtchASketchAnimator
Parameters:
currentPos - The current position of the etch-a-sketch point
Returns:
The new position