|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.routes.Route
public class Route
Represents a route on the layout
| Field Summary | |
|---|---|
protected String |
_comment
|
protected String |
_id
|
protected int |
_IdNumber
|
protected String |
_name
|
protected Hashtable<String,RouteLocation> |
_routeHashTable
|
protected int |
_sequenceNum
|
static String |
DISPOSE
|
static int |
EAST
|
static String |
ERROR
|
static String |
LISTCHANGE_CHANGED_PROPERTY
|
(package private) static org.slf4j.Logger |
log
|
static int |
NORTH
|
static String |
OKAY
|
static String |
ORPHAN
|
(package private) PropertyChangeSupport |
pcs
|
static int |
SOUTH
|
static int |
WEST
|
| Constructor Summary | |
|---|---|
Route(org.jdom.Element e)
Construct this Entry from XML. |
|
Route(String id,
String name)
|
|
| Method Summary | |
|---|---|
RouteLocation |
addLocation(Location location)
Adds a location to the end of this route |
RouteLocation |
addLocation(Location location,
int sequence)
Add a route location at a specific place (sequence) in the route Allowable sequence numbers are 0 to max size of route; |
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
deleteLocation(RouteLocation rl)
Delete a RouteLocation |
void |
dispose()
|
JComboBox |
getComboBox()
|
String |
getComment()
|
RouteLocation |
getDepartsRouteLocation()
Get the first location in a route |
String |
getId()
|
RouteLocation |
getLastLocationByName(String name)
Get location by name (gets last route location with name) |
RouteLocation |
getLocationById(String id)
Get a RouteLocation by id |
List<String> |
getLocationsBySequenceList()
Get a list of RouteLocation ids sorted by route order |
String |
getName()
|
String |
getStatus()
Gets the status of the route: OKAY ORPHAN ERROR |
void |
moveLocationDown(RouteLocation rl)
Moves a RouteLocation later in the route by incrementing the sequenceId for the RouteLocation |
void |
moveLocationUp(RouteLocation rl)
Moves a RouteLocation earlier in the route by decrementing the sequenceId for the RouteLocation |
void |
propertyChange(PropertyChangeEvent e)
|
void |
register(RouteLocation rl)
Remember a NamedBean Object created outside the manager. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
setComment(String comment)
|
protected void |
setDirtyAndFirePropertyChange(String p,
Object old,
Object n)
|
void |
setName(String name)
|
org.jdom.Element |
store()
Create an XML element to represent this Entry. |
String |
toString()
|
void |
updateComboBox(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 String _comment
protected Hashtable<String,RouteLocation> _routeHashTable
protected int _IdNumber
protected int _sequenceNum
public static final int EAST
public static final int WEST
public static final int NORTH
public static final int SOUTH
public static final String LISTCHANGE_CHANGED_PROPERTY
public static final String DISPOSE
public static final String OKAY
public static final String ORPHAN
public static final String ERROR
PropertyChangeSupport pcs
static org.slf4j.Logger log
| Constructor Detail |
|---|
public Route(String id,
String name)
public Route(org.jdom.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 setComment(String comment)
public String getComment()
public void dispose()
public RouteLocation addLocation(Location location)
location -
public RouteLocation addLocation(Location location,
int sequence)
location - sequence -
public void register(RouteLocation rl)
public void deleteLocation(RouteLocation rl)
rl - public RouteLocation getDepartsRouteLocation()
public RouteLocation getLastLocationByName(String name)
name -
public RouteLocation getLocationById(String id)
id -
public List<String> getLocationsBySequenceList()
public void moveLocationUp(RouteLocation rl)
rl - public void moveLocationDown(RouteLocation rl)
rl - public String getStatus()
public JComboBox getComboBox()
public void updateComboBox(JComboBox box)
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 setDirtyAndFirePropertyChange(String p,
Object old,
Object n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||