net.kolls.railworld.segment
Class HiddenLUSegment
java.lang.Object
net.kolls.railworld.RailSegment
net.kolls.railworld.segment.TrackSegment
net.kolls.railworld.segment.LUSegment
net.kolls.railworld.segment.HiddenLUSegment
public class HiddenLUSegment
- extends LUSegment
A hidden load/unload segment.
- Author:
- Steve Kollmansberger
|
Method Summary |
boolean |
carHidden()
Should cars on this segment be drawn, or hidden?
Defaults to false (not hidden). |
void |
draw(int z,
java.awt.Graphics2D gc)
Draw the segment. |
void |
recomp()
Called when changes are made; recompute or update any associated values. |
| Methods inherited from class net.kolls.railworld.RailSegment |
click, destNZ, enter, getDest, getDests, getPoint, getPoints, nearEditPoint, pixelStep, setDest, setPoint, singleton, step, trains, update, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HiddenLUSegment
public HiddenLUSegment(RailSegment bg,
RailSegment en,
java.awt.geom.Line2D crds,
Car[] accept,
boolean drawAccept)
- Parameters:
bg - en - crds - accept - drawAccept -
recomp
public void recomp()
- Description copied from class:
RailSegment
- Called when changes are made; recompute or update any associated values.
- Overrides:
recomp in class LUSegment
draw
public void draw(int z,
java.awt.Graphics2D gc)
- Description copied from class:
RailSegment
- Draw the segment. Segments have several z-layers to allowed slightly overlaping pieces to still look nice.
z = 1 is a static layer (lowest)
z = 2 is a static layer (highest)
z = 3 is reserved
z = 4 is the dynamic layer. This is redrawn frequently, if requested by the segment.
- Overrides:
draw in class LUSegment
- Parameters:
z - The currently z-layer to drawgc - A Graphics2D graphics context.- See Also:
RailSegment.isDynamic()
carHidden
public boolean carHidden()
- Description copied from class:
RailSegment
- Should cars on this segment be drawn, or hidden?
Defaults to false (not hidden).
- Overrides:
carHidden in class RailSegment
- Returns:
- A boolean indicating if cars are hidden or not.