Spirograph Problem Set Javadocs

spirograph
Class AccelHandler

java.lang.Object
  extended byspirograph.AccelHandler
All Implemented Interfaces:
java.lang.Runnable

public class AccelHandler
extends java.lang.Object
implements java.lang.Runnable

This class contains a Thread that continuously prompts the user's class for an acceleration and stores the result in a Coord. Other objects (such as DotPanel) can monitor the Coord for updates.

Copyright © 1998 Massachusetts Institute of Technology.
Copyright © 2002-2003 Franklin W. Olin College of Engineering.

Version:
$Id: AccelHandler.java,v 1.7 2004/02/09 20:55:03 gus Exp $
Author:
Luis Sarmenta, lfgs@cag.lcs.mit.edu, Henry Wong, henryw@mit.edu
See Also:
Accelerator, DotPanel, Coord

Field Summary
static int ACCELMODE
          Acceleration control mode
static int POSMODE
          Position control mode
static int VELMODE
          Velocity control mdde
 
Constructor Summary
AccelHandler(Accelerator Accel, Coord myCoord, Coord otherCoord)
          Creates a new AccelHandler.
 
Method Summary
 void run()
          Prompt the user's class for an accleration and pass the info to a Coord.
 void setAccel(Accelerator Accel)
          Changes the current Accelerator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POSMODE

public static final int POSMODE
Position control mode

See Also:
Constant Field Values

VELMODE

public static final int VELMODE
Velocity control mdde

See Also:
Constant Field Values

ACCELMODE

public static final int ACCELMODE
Acceleration control mode

See Also:
Constant Field Values
Constructor Detail

AccelHandler

public AccelHandler(Accelerator Accel,
                    Coord myCoord,
                    Coord otherCoord)
Creates a new AccelHandler. Does not start a new Thread.

Parameters:
Accel - Provides behavior based on student code
myCoord - Our position for this Dimension
otherCoord - Our position in the other Dimension
Method Detail

setAccel

public void setAccel(Accelerator Accel)
Changes the current Accelerator.

Parameters:
Accel - the new Accelerator

run

public void run()
Prompt the user's class for an accleration and pass the info to a Coord.

Specified by:
run in interface java.lang.Runnable

Spirograph Problem Set Javadocs