All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class primitives.machines.SmallMachineDemo

java.lang.Object
   |
   +----primitives.machines.Machine
           |
           +----primitives.machines.SmallMachine
                   |
                   +----primitives.machines.SmallMachineDemo

public class SmallMachineDemo
extends SmallMachine
Used by SmallMachine

Variable Index

 o anotherJoint
integeral representation of the 2 locations of the right joint.
 o danotherJoints
Stores the 2 locations of the right joint.
 o t3

Constructor Index

 o SmallMachineDemo(Dimension)

Method Index

 o finalize()
Sets object fields to null
 o reachEnd()
streches the right joint.
 o redraw(Graphics)
Redraws the machine.
 o rotateJoint(double)
rotates the right joint with respect to the left joint.

Variables

 o danotherJoints
 private Coordinate danotherJoints[]
Stores the 2 locations of the right joint.

 o anotherJoint
 public ExtPoint anotherJoint[]
integeral representation of the 2 locations of the right joint.

 o t3
 Coordinate t3

Constructors

 o SmallMachineDemo
 public SmallMachineDemo(Dimension d)
Parameters:
d - the size of the rectangle to draw the machine in.

Methods

 o rotateJoint
 public void rotateJoint(double alpha) throws MachineException
rotates the right joint with respect to the left joint.

Parameters:
alpha - the angle in radians to rotate.
Throws: MachineException
if rotation is not physicaly possible.
Overrides:
rotateJoint in class SmallMachine
See Also:
rotateJoint
 o reachEnd
 public void reachEnd()
streches the right joint.

Overrides:
reachEnd in class SmallMachine
See Also:
reachEnd
 o redraw
 public void redraw(Graphics g)
Redraws the machine.

Parameters:
g - the graphic context to draw to.
Overrides:
redraw in class SmallMachine
 o finalize
 public void finalize() throws Throwable
Sets object fields to null

Throws: Throwable
.
Overrides:
finalize in class SmallMachine

All Packages  Class Hierarchy  This Package  Previous  Next  Index