jmri
Class TransitSection

java.lang.Object
  extended by jmri.TransitSection

public class TransitSection
extends Object

This class holds information and options for a Section when assigned to a Transit. Corresponds to an allocatable "Section" of track assigned to a Transit.

A TransitSection holds the following information: Section ID Section Direction Sequence number of Section within the Transit Special actions list for train in this Section, if requested (see TransitSectionAction.java) Whether this Section is a primary section or an alternate section

A TransitSection is referenced via a list in its parent Transit, and is stored on disk when its parent Transit is stored.

Provides for delayed initializatio of Section when loading panel files, so that this is not dependent on order of items in the panel file.

Author:
Dave Duchamp Copyright (C) 2008

Constructor Summary
TransitSection(Section s, int seq, int direction)
          Main constructor method
TransitSection(Section s, int seq, int direction, boolean alt)
          Convenience constructor
TransitSection(String secName, int seq, int direction, boolean alt)
          Special constructor to delay Section initialization
 
Method Summary
 void addAction(TransitSectionAction act)
           
 int getDirection()
           
 Section getSection()
          Access methods
 String getSectionName()
           
 int getSequenceNumber()
           
 ArrayList<TransitSectionAction> getTransitSectionActionList()
          Get a copy of this TransitSection's TransitSectionAction list
 boolean isAlternate()
           
 void setAlternate(boolean alt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransitSection

public TransitSection(Section s,
                      int seq,
                      int direction)
Main constructor method


TransitSection

public TransitSection(Section s,
                      int seq,
                      int direction,
                      boolean alt)
Convenience constructor


TransitSection

public TransitSection(String secName,
                      int seq,
                      int direction,
                      boolean alt)
Special constructor to delay Section initialization

Method Detail

getSection

public Section getSection()
Access methods


getSectionName

public String getSectionName()

getDirection

public int getDirection()

getSequenceNumber

public int getSequenceNumber()

addAction

public void addAction(TransitSectionAction act)

isAlternate

public boolean isAlternate()

setAlternate

public void setAlternate(boolean alt)

getTransitSectionActionList

public ArrayList<TransitSectionAction> getTransitSectionActionList()
Get a copy of this TransitSection's TransitSectionAction list



Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads