Class EtchASketch

java.lang.Object
  extended byEtchASketch

public class EtchASketch
extends java.lang.Object

EtchASketch - A program that creates and runs an automated EtchASketch where an application can add a controller that tells the EtchASketch how to move over time.

Author:
Ben Bederson Copyright (C) 2003 University of Maryland
See Also:
EtchASketchAnimator

Constructor Summary
EtchASketch()
          Creates a new EtchASketch and displays it.
EtchASketch(EtchASketchAnimator animator)
          Creates a new EtchASketch and displays it.
 
Method Summary
 Point getCurrentPos()
           
 int getDrawableHeight()
          Gets the height of the etch-a-sketch that can be drawn into.
 int getDrawableWidth()
          Gets the width of the etch-a-sketch that can be drawn into.
 void setEtchASketchAnimator(EtchASketchAnimator animator)
          Specifies the controller for the etch-a-sketch.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EtchASketch

public EtchASketch()
Creates a new EtchASketch and displays it. It will be positioned on the screen to the right of the previous EtchASketch, or on the next row if there is not enough room in the current row.


EtchASketch

public EtchASketch(EtchASketchAnimator animator)
Creates a new EtchASketch and displays it. It will be positioned on the screen to the right of the previous EtchASketch, or on the next row if there is not enough room in the current row.

Parameters:
animator - The controller for this etch-a-sketch
Method Detail

setEtchASketchAnimator

public void setEtchASketchAnimator(EtchASketchAnimator animator)
Specifies the controller for the etch-a-sketch. It's getPoint() method gets called 10 times per second.

Parameters:
animator - The etch-a-sketch controller

getDrawableWidth

public int getDrawableWidth()
Gets the width of the etch-a-sketch that can be drawn into.

Returns:
width

getDrawableHeight

public int getDrawableHeight()
Gets the height of the etch-a-sketch that can be drawn into.

Returns:
height

getCurrentPos

public Point getCurrentPos()