|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.routes.RouteLocation
public class RouteLocation
Represents a location in a route, a location can appear more than once in a route.
| Field Summary | |
|---|---|
protected int |
_carMoves
|
protected String |
_comment
|
protected String |
_departureTime
|
protected boolean |
_drops
|
protected double |
_grade
|
protected String |
_id
|
protected Location |
_location
|
protected String |
_locationId
|
protected int |
_maxCarMoves
|
protected int |
_maxTrainLength
|
protected boolean |
_pickups
|
protected int |
_sequenceId
|
protected int |
_trainDir
|
protected int |
_trainIconX
|
protected int |
_trainIconY
|
protected int |
_trainLength
|
protected int |
_trainWeight
|
protected int |
_wait
|
static String |
DELETED
|
static String |
DEPARTURE_TIME_CHANGED_PROPERTY
|
static String |
DISPOSE
|
static String |
DROP_CHANGED_PROPERTY
|
static int |
EAST
|
static String |
EAST_DIR
|
(package private) static org.slf4j.Logger |
log
|
static String |
MAXMOVES_CHANGED_PROPERTY
|
static int |
NORTH
|
static String |
NORTH_DIR
|
(package private) PropertyChangeSupport |
pcs
|
static String |
PICKUP_CHANGED_PROPERTY
|
static int |
SOUTH
|
static String |
SOUTH_DIR
|
static String |
TRAIN_DIRECTION_CHANGED_PROPERTY
|
static int |
WEST
|
static String |
WEST_DIR
|
| Constructor Summary | |
|---|---|
RouteLocation(org.jdom.Element e)
Construct this Entry from XML. |
|
RouteLocation(String id,
Location location)
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
boolean |
canDrop()
|
boolean |
canPickup()
|
void |
dispose()
|
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
int |
getCarMoves()
|
String |
getComment()
|
String |
getDepartureTime()
|
String |
getFormatedDepartureTime()
|
double |
getGrade()
|
String |
getId()
|
Location |
getLocation()
|
int |
getMaxCarMoves()
Get the maximum number of moves for this location |
int |
getMaxTrainLength()
|
String |
getName()
|
int |
getSequenceId()
|
int |
getTrainDirection()
Gets the binary representation of the train's direction at this location |
String |
getTrainDirectionString()
Gets the String representation of the train's direction at this location |
int |
getTrainIconX()
|
int |
getTrainIconY()
|
int |
getTrainLength()
|
int |
getTrainWeight()
|
int |
getWait()
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
setCanDrop(boolean drops)
When true allow car drops at this location |
void |
setCanPickup(boolean pickups)
When true allow car pick ups at this location |
void |
setCarMoves(int moves)
Set the number of moves that this location has when building a train |
void |
setComment(String comment)
|
void |
setDepartureTime(String time)
|
protected void |
setDirtyAndFirePropertyChange(String p,
Object old,
Object n)
|
void |
setGrade(double grade)
|
void |
setMaxCarMoves(int moves)
|
void |
setMaxTrainLength(int length)
|
void |
setSequenceId(int sequence)
|
void |
setTrainDirection(int direction)
|
void |
setTrainIconCoordinates()
Set the train icon panel coordinates to the location defaults. |
void |
setTrainIconX(int x)
|
void |
setTrainIconY(int y)
|
void |
setTrainLength(int length)
Set the train length departing this location when building a train |
void |
setTrainWeight(int weight)
Set the train weight departing this location when building a train |
void |
setWait(int time)
|
org.jdom.Element |
store()
Create an XML element to represent this Entry. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String _id
protected Location _location
protected String _locationId
protected int _trainDir
protected int _maxTrainLength
protected int _maxCarMoves
protected boolean _drops
protected boolean _pickups
protected int _sequenceId
protected double _grade
protected int _wait
protected String _departureTime
protected int _trainIconX
protected int _trainIconY
protected String _comment
protected int _carMoves
protected int _trainWeight
protected int _trainLength
public static final int EAST
public static final int WEST
public static final int NORTH
public static final int SOUTH
public static final String EAST_DIR
public static final String WEST_DIR
public static final String NORTH_DIR
public static final String SOUTH_DIR
public static final String DISPOSE
public static final String DELETED
public static final String DROP_CHANGED_PROPERTY
public static final String PICKUP_CHANGED_PROPERTY
public static final String MAXMOVES_CHANGED_PROPERTY
public static final String TRAIN_DIRECTION_CHANGED_PROPERTY
public static final String DEPARTURE_TIME_CHANGED_PROPERTY
PropertyChangeSupport pcs
static org.slf4j.Logger log
| Constructor Detail |
|---|
public RouteLocation(String id,
Location location)
public RouteLocation(org.jdom.Element e)
e - Consist XML element| Method Detail |
|---|
public String toString()
toString in class Objectpublic String getId()
public String getName()
public Location getLocation()
public int getSequenceId()
public void setSequenceId(int sequence)
public void setComment(String comment)
public String getComment()
public void setTrainDirection(int direction)
public int getTrainDirection()
public String getTrainDirectionString()
public void setMaxTrainLength(int length)
public int getMaxTrainLength()
public void setTrainLength(int length)
length - public int getTrainLength()
public void setTrainWeight(int weight)
weight - public int getTrainWeight()
public void setMaxCarMoves(int moves)
public int getMaxCarMoves()
public void setCanDrop(boolean drops)
drops - when true drops allowed at this locationpublic boolean canDrop()
public void setCanPickup(boolean pickups)
pickups - when true pick ups allowed at this locationpublic boolean canPickup()
public void setCarMoves(int moves)
moves - public int getCarMoves()
public void setWait(int time)
public int getWait()
public void setDepartureTime(String time)
public String getDepartureTime()
public String getFormatedDepartureTime()
public void setGrade(double grade)
public double getGrade()
public void setTrainIconX(int x)
public int getTrainIconX()
public void setTrainIconY(int y)
public int getTrainIconY()
public void setTrainIconCoordinates()
public void dispose()
public org.jdom.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)
protected void setDirtyAndFirePropertyChange(String p,
Object old,
Object n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||