|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.locations.Location
public class Location
Represents a location on the layout
| Constructor Summary | |
|---|---|
Location(Element e)
Construct this Entry from XML. |
|
Location(String id,
String name)
|
|
| Method Summary | |
|---|---|
boolean |
acceptsTypeName(String type)
|
void |
addDropRS()
Increments the number of cars and or engines that will be dropped off by trains at this location. |
void |
addPickupRS()
Increments the number of cars and or engines that will be picked up by a train at this location. |
Pool |
addPool(String name)
|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addRS(RollingStock rs)
Adds rolling stock to a specific location. |
Track |
addTrack(String name,
String type)
Adds a track to this location. |
void |
addTypeName(String type)
Adds the specific type of rolling stock to the will service list |
void |
deleteDropRS()
Decrements the number of cars and or engines that will be dropped off by trains at this location. |
void |
deletePickupRS()
Decrements the number of cars and or engines that will be picked up by a train at this location. |
void |
deleteRS(RollingStock rs)
|
void |
deleteTrack(Track track)
|
void |
deleteTypeName(String type)
|
void |
dispose()
|
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
String |
getComment()
|
String |
getDefaultPrinterName()
|
int |
getDropRS()
|
String |
getId()
|
int |
getLength()
|
int |
getLocationOps()
|
String |
getName()
|
int |
getNumberRS()
Gets the number of cars and engines at this location |
int |
getPickupRS()
|
Pool |
getPoolByName(String name)
|
List<Pool> |
getPoolsByNameList()
|
String |
getStatus()
|
boolean |
getSwitchList()
Used to determine if switch list is needed for this location |
Track |
getTrackById(String id)
|
Track |
getTrackByName(String name,
String type)
Get track location by name and type |
List<String> |
getTracksByMovesList(String type)
Sort ids by track moves. |
List<String> |
getTracksByNameList(String type)
Sort ids by track location name. |
int |
getTrainDirections()
|
Point |
getTrainIconEast()
|
Point |
getTrainIconNorth()
|
Point |
getTrainIconSouth()
|
Point |
getTrainIconWest()
|
int |
getUsedLength()
|
boolean |
hasPools()
|
boolean |
isTrackAtLocation(Track track)
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
register(Pool pool)
|
void |
register(Track track)
Remember a NamedBean Object created outside the manager. |
void |
removePool(Pool pool)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
resetMoves()
Reset the move count for all tracks at this location |
void |
setComment(String comment)
|
void |
setDefaultPrinterName(String name)
|
void |
setLength(int length)
Set total length of all tracks for this location |
void |
setLocationOps(int ops)
Set the operations mode for this location |
void |
setName(String name)
|
void |
setNumberRS(int number)
Sets the number of cars and or engines on for this location |
void |
setStatus()
Automatically sets the print status for this location's switch list |
void |
setStatus(String status)
Sets the print status for this location's switch list |
void |
setSwitchList(boolean switchList)
When true, a switchlist is desired for this location. |
void |
setTrainDirections(int direction)
|
void |
setTrainIconEast(Point point)
|
void |
setTrainIconNorth(Point point)
|
void |
setTrainIconSouth(Point point)
|
void |
setTrainIconWest(Point point)
|
void |
setUsedLength(int length)
|
Element |
store()
Create an XML element to represent this Entry. |
String |
toString()
|
void |
updateComboBox(JComboBox box)
Updates a JComboBox with all of the track locations for this location. |
void |
updateComboBox(JComboBox box,
RollingStock rs,
boolean filter,
boolean destination)
Updates a JComboBox with tracks that can service the rolling stock. |
void |
updatePoolComboBox(JComboBox box)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String _id
protected String _name
protected int _IdNumber
protected int _numberRS
protected int _pickupRS
protected int _dropRS
protected int _locationOps
protected int _trainDir
protected int _length
protected int _usedLength
protected String _comment
protected boolean _switchList
protected String _defaultPrinter
protected String _status
protected Point _trainIconEast
protected Point _trainIconWest
protected Point _trainIconNorth
protected Point _trainIconSouth
protected Hashtable<String,Track> _trackHashTable
protected int _idPoolNumber
protected Hashtable<String,Pool> _poolHashTable
public static final int NORMAL
public static final int STAGING
public static final int EAST
public static final int WEST
public static final int NORTH
public static final int SOUTH
public static final String UNKNOWN
public static final String PRINTED
public static final String CSV_GENERATED
public static final String MODIFIED
public static final String TRACK_LISTLENGTH_CHANGED_PROPERTY
public static final String TYPES_CHANGED_PROPERTY
public static final String TRAINDIRECTION_CHANGED_PROPERTY
public static final String LENGTH_CHANGED_PROPERTY
public static final String USEDLENGTH_CHANGED_PROPERTY
public static final String NAME_CHANGED_PROPERTY
public static final String SWITCHLIST_CHANGED_PROPERTY
public static final String DISPOSE_CHANGED_PROPERTY
public static final String STATUS_CHANGED_PROPERTY
public static final String POOL_LENGTH_CHANGED_PROPERTY
| Constructor Detail |
|---|
public Location(String id,
String name)
public Location(Element e)
e - Consist XML element| Method Detail |
|---|
public String getId()
public void setName(String name)
public String toString()
toString in class Objectpublic String getName()
public void setLength(int length)
length - public int getLength()
public void setUsedLength(int length)
public int getUsedLength()
public void setLocationOps(int ops)
ops - NORMAL STAGINGpublic int getLocationOps()
public void setTrainDirections(int direction)
public int getTrainDirections()
public void setNumberRS(int number)
number - public int getNumberRS()
public void setSwitchList(boolean switchList)
switchList - public boolean getSwitchList()
public void setDefaultPrinterName(String name)
public String getDefaultPrinterName()
public void setStatus()
public void setStatus(String status)
status - UNKNOWN PRINTED MODIFIEDpublic String getStatus()
public void setTrainIconEast(Point point)
public Point getTrainIconEast()
public void setTrainIconWest(Point point)
public Point getTrainIconWest()
public void setTrainIconNorth(Point point)
public Point getTrainIconNorth()
public void setTrainIconSouth(Point point)
public Point getTrainIconSouth()
public void addRS(RollingStock rs)
rs - public void deleteRS(RollingStock rs)
public void addPickupRS()
public void deletePickupRS()
public void addDropRS()
public void deleteDropRS()
public int getPickupRS()
public int getDropRS()
public void setComment(String comment)
public String getComment()
public void addTypeName(String type)
type - of rolling stock that location will servicepublic void deleteTypeName(String type)
public boolean acceptsTypeName(String type)
public Track addTrack(String name,
String type)
name - of tracktype - of track
public void register(Track track)
public void deleteTrack(Track track)
public Track getTrackByName(String name,
String type)
name - track's nametype - track type
public Track getTrackById(String id)
public List<String> getTracksByNameList(String type)
type - track type: Track.YARD, Track.SIDING, Track.INTERCHANGE, Track.STAGING
public List<String> getTracksByMovesList(String type)
type - track type: Track.YARD, Track.SIDING, Track.INTERCHANGE, Track.STAGING
public boolean isTrackAtLocation(Track track)
public void resetMoves()
public void updateComboBox(JComboBox box)
box - JComboBox to be updated.
public void updateComboBox(JComboBox box,
RollingStock rs,
boolean filter,
boolean destination)
box - JComboBox to be updated.rs - Rolling Stock to be servicedfilter - When true, remove tracks not able to service rs.destination - When true, the tracks are destinations for the rs.public Pool addPool(String name)
public void removePool(Pool pool)
public Pool getPoolByName(String name)
public void register(Pool pool)
public void updatePoolComboBox(JComboBox box)
public List<Pool> getPoolsByNameList()
public boolean hasPools()
public void dispose()
public Element store()
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpublic void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
protected void firePropertyChange(String p,
Object old,
Object n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||