|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.tools.RoadAction
public class RoadAction
This implements create road user action
| Field Summary | |
|---|---|
protected int |
alphaConPos
DOCUMENT ME! |
protected Node |
alphaNode
DOCUMENT ME! |
protected java.awt.Point |
alphaPoint
DOCUMENT ME! |
protected int |
betaConPos
DOCUMENT ME! |
protected static int |
MIN_TURN_DISTANCE
DOCUMENT ME! |
protected EditModel |
model
DOCUMENT ME! |
protected java.awt.Point |
mousePoint
DOCUMENT ME! |
protected java.awt.Point |
startPoint
DOCUMENT ME! |
protected java.util.Vector |
turnPoints
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
RoadAction(EditModel em)
Creates a new RoadAction object. |
|
| Method Summary | |
|---|---|
boolean |
beingUsed()
DOCUMENT ME! |
protected Road |
createRoad(Node alpha,
Node beta)
DOCUMENT ME! |
protected int |
getBestConPosition(Node node,
java.awt.Point pa,
java.awt.Point pb)
DOCUMENT ME! |
void |
moveAction(View view,
java.awt.Point p)
Moves the current mouse point |
boolean |
nextAction(View view,
java.awt.Point p)
Performs a step in creating a road at given point. |
void |
paint(java.awt.Graphics g)
Paints a graphical representation of the status of this action |
void |
reset()
DOCUMENT ME! |
boolean |
startAction(View view,
java.awt.Point p)
Starts creating a road at given point |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int MIN_TURN_DISTANCE
protected EditModel model
protected Node alphaNode
protected java.awt.Point startPoint
protected java.awt.Point mousePoint
protected java.awt.Point alphaPoint
protected java.util.Vector turnPoints
protected int alphaConPos
protected int betaConPos
| Constructor Detail |
|---|
public RoadAction(EditModel em)
em - DOCUMENT ME!| Method Detail |
|---|
public boolean beingUsed()
beingUsed in interface ToolActionpublic void reset()
public boolean startAction(View view,
java.awt.Point p)
view - The main view. Needed to convert coordinatesp - The point to start the new road at
public boolean nextAction(View view,
java.awt.Point p)
view - DOCUMENT ME!p - The point
public void moveAction(View view,
java.awt.Point p)
view - DOCUMENT ME!p - The new position of the mouse cursorpublic void paint(java.awt.Graphics g)
g - The Graphics object to paint on
protected int getBestConPosition(Node node,
java.awt.Point pa,
java.awt.Point pb)
throws CannotConnectException,
InfraException
node - DOCUMENT ME!pa - DOCUMENT ME!pb - DOCUMENT ME!
CannotConnectException - DOCUMENT ME!
InfraException - DOCUMENT ME!
protected Road createRoad(Node alpha,
Node beta)
throws InfraException
alpha - DOCUMENT ME!beta - DOCUMENT ME!
InfraException - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||