|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.kolls.railworld.TrainUIController
net.kolls.railworld.tuic.TrainPainter
public class TrainPainter
Paints a train on the map. This follows each segment, and paints the car or partial car onto it.
| Field Summary | |
|---|---|
boolean |
didFollow
Did we submit new coords for this train yet? |
| Constructor Summary | |
|---|---|
TrainPainter(RailCanvas rc,
java.awt.Graphics2D mg,
boolean f,
Car sel)
Create a new TrainPainter. |
|
| Method Summary | |
|---|---|
void |
car(Car c,
CLoc begin,
CLoc end)
For each Car, including a beginning and ending position. |
static java.awt.image.BufferedImage |
image(Car c,
java.awt.Component mp)
Generates an image representing the Car. |
void |
segment(Car c,
java.awt.geom.Line2D l)
For each visible segment (there may be multiple segments per car, or even 0 if the car is hidden). |
| Methods inherited from class net.kolls.railworld.TrainUIController |
|---|
act |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean didFollow
| Constructor Detail |
|---|
public TrainPainter(RailCanvas rc,
java.awt.Graphics2D mg,
boolean f,
Car sel)
rc - The RailCanvas for submitting follow-me coordinates.mg - The graphics context to draw onf - Should we follow (move display to) the given car sel?sel - The selected car. A green selected arrow will be drawn on it.| Method Detail |
|---|
public void segment(Car c,
java.awt.geom.Line2D l)
TrainUIController
segment in class TrainUIControllerc - The Car involved.l - The current segment. There may be multiple calls to segment per Car.
public void car(Car c,
CLoc begin,
CLoc end)
TrainUIController
car in class TrainUIControllerc - The Car involved.begin - Starting position.end - Final position.
public static final java.awt.image.BufferedImage image(Car c,
java.awt.Component mp)
c - Car to generate image formp - A component used to derive the GraphicsConfiguration
BufferedImage containing the Car.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||