org.jscience.architecture.traffic.infrastructure
Class Car

java.lang.Object
  extended by org.jscience.architecture.traffic.infrastructure.Roaduser
      extended by org.jscience.architecture.traffic.infrastructure.Automobile
          extended by org.jscience.architecture.traffic.infrastructure.Car
All Implemented Interfaces:
java.lang.Cloneable, Selectable, SelectionStarter, TwoStageLoader, XMLSerializable
Direct Known Subclasses:
PacCar

public class Car
extends Automobile

A Car is the standard menace on our Roads.


Field Summary
protected  int length
          DOCUMENT ME!
protected  int passengers
          DOCUMENT ME!
protected  int speed
          DOCUMENT ME!
protected  int type
          DOCUMENT ME!
 
Fields inherited from class org.jscience.architecture.traffic.infrastructure.Automobile
soundFileName
 
Fields inherited from class org.jscience.architecture.traffic.infrastructure.Roaduser
color, cycleAsked, cycleMoved, delay, destNode, drivelaneStartTime, inQueueForSign, loadData, parentName, position, prevSign, prevWaitPos, prevWaitTl, prevWaitTlColor, startNode, voted, waitPos, waitTl, waitTlColor
 
Constructor Summary
Car()
          Empty constructor for loading
Car(Node new_startNode, Node new_destNode, int pos)
          Creates a new Car object.
 
Method Summary
 int getLength()
          DOCUMENT ME!
 java.lang.String getName()
          DOCUMENT ME!
 int getNumPassengers()
          DOCUMENT ME!
 int getSpeed()
          Returns the speed of this Roaduser in blocks per cycle
 int getType()
          DOCUMENT ME!
 java.lang.String getXMLName()
          DOCUMENT ME!
 void paint(java.awt.Graphics g, int x, int y, float zf)
          DOCUMENT ME!
 void paint(java.awt.Graphics g, int x, int y, float zf, double dlangle)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.architecture.traffic.infrastructure.Automobile
toot
 
Methods inherited from class org.jscience.architecture.traffic.infrastructure.Roaduser
addDelay, clone, didMove, didVote, getBounds, getCenterPoint, getChildren, getColor, getComplexBounds, getCurrentWaitPos, getCurrentWaitTl, getCurrentWaitTlColor, getCycleAsked, getCycleMoved, getDelay, getDescription, getDestNode, getDistance, getDrivelaneStartTime, getDriverName, getInQueueForSign, getPicture, getPosition, getPrevSign, getPrevWaitPos, getPrevWaitTl, getPrevWaitTlColor, getSelectionPoint, getSelectionPoints, getSound, getStartNode, getVehicleName, hasChildren, isSelectable, load, loadSecondStage, paint, paint, resetStats, saveChilds, saveSelf, setColor, setCycleAsked, setCycleMoved, setDelay, setDestNode, setDrivelaneStartTime, setInQueueForSign, setParentName, setPosition, setPrevSign, setStartNode, setVoted, setWaitPos
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected final int type
DOCUMENT ME!


length

protected final int length
DOCUMENT ME!

See Also:
Constant Field Values

passengers

protected final int passengers
DOCUMENT ME!

See Also:
Constant Field Values

speed

protected int speed
DOCUMENT ME!

Constructor Detail

Car

public Car(Node new_startNode,
           Node new_destNode,
           int pos)
Creates a new Car object.

Parameters:
new_startNode - DOCUMENT ME!
new_destNode - DOCUMENT ME!
pos - DOCUMENT ME!

Car

public Car()
Empty constructor for loading

Method Detail

getName

public java.lang.String getName()
DOCUMENT ME!

Specified by:
getName in class Roaduser
Returns:
DOCUMENT ME!

getSpeed

public int getSpeed()
Returns the speed of this Roaduser in blocks per cycle

Specified by:
getSpeed in class Roaduser
Returns:
DOCUMENT ME!

getLength

public int getLength()
DOCUMENT ME!

Specified by:
getLength in class Roaduser
Returns:
DOCUMENT ME!

getType

public int getType()
DOCUMENT ME!

Specified by:
getType in class Roaduser
Returns:
DOCUMENT ME!

getNumPassengers

public int getNumPassengers()
DOCUMENT ME!

Specified by:
getNumPassengers in class Roaduser
Returns:
DOCUMENT ME!

paint

public void paint(java.awt.Graphics g,
                  int x,
                  int y,
                  float zf)
DOCUMENT ME!

Overrides:
paint in class Automobile
Parameters:
g - DOCUMENT ME!
x - DOCUMENT ME!
y - DOCUMENT ME!
zf - DOCUMENT ME!

paint

public void paint(java.awt.Graphics g,
                  int x,
                  int y,
                  float zf,
                  double dlangle)
DOCUMENT ME!

Overrides:
paint in class Automobile
Parameters:
g - DOCUMENT ME!
x - DOCUMENT ME!
y - DOCUMENT ME!
zf - DOCUMENT ME!
dlangle - DOCUMENT ME!

getXMLName

public java.lang.String getXMLName()
DOCUMENT ME!

Specified by:
getXMLName in interface XMLSerializable
Overrides:
getXMLName in class Automobile
Returns:
DOCUMENT ME!