net.kolls.railworld.segment
Class HiddenLUSegment

java.lang.Object
  extended by net.kolls.railworld.RailSegment
      extended by net.kolls.railworld.segment.TrackSegment
          extended by net.kolls.railworld.segment.LUSegment
              extended by net.kolls.railworld.segment.HiddenLUSegment

public class HiddenLUSegment
extends LUSegment

A hidden load/unload segment.

Author:
Steve Kollmansberger

Nested Class Summary
 
Nested classes/interfaces inherited from class net.kolls.railworld.segment.TrackSegment
TrackSegment.TSEP
 
Field Summary
 
Fields inherited from class net.kolls.railworld.segment.LUSegment
drawAc
 
Fields inherited from class net.kolls.railworld.segment.TrackSegment
cap, coords, POINT_BEGIN, POINT_END, railBedStroke, railStroke
 
Fields inherited from class net.kolls.railworld.RailSegment
dests, ec, MOUSE_NEAR, pts, RAIL_BED_WIDTH, RAIL_WIDTH, trains
 
Constructor Summary
HiddenLUSegment(RailSegment bg, RailSegment en, java.awt.geom.Line2D crds, Car[] accept, boolean drawAccept)
           
 
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.segment.LUSegment
canLU, doesDrawAccept, drawAccept, editPanel, isDynamic, lu, mouseOver, setDrawAccept
 
Methods inherited from class net.kolls.railworld.segment.TrackSegment
canErase, createSEP, dest, getCoords, getPoint, length, setCap
 
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
 

Constructor Detail

HiddenLUSegment

public HiddenLUSegment(RailSegment bg,
                       RailSegment en,
                       java.awt.geom.Line2D crds,
                       Car[] accept,
                       boolean drawAccept)
Parameters:
bg -
en -
crds -
accept -
drawAccept -
Method Detail

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 draw
gc - 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.