jmri.jmrit.operations.trains
Class TrainSchedule

java.lang.Object
  extended by jmri.jmrit.operations.trains.TrainSchedule

public class TrainSchedule
extends Object

Represents a schedule for trains

Author:
Daniel Boudreau Copyright (C) 2010

Field Summary
protected  String _comment
           
protected  String _id
           
protected  String _name
           
protected  List<String> _trainIds
           
static String NAME_CHANGED_PROPERTY
           
 
Constructor Summary
TrainSchedule(Element e)
          Construct this Entry from XML.
TrainSchedule(String id, String name)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void addTrainId(String id)
           
 boolean containsTrainId(String id)
           
protected  void firePropertyChange(String p, Object old, Object n)
           
 String getComment()
           
 String getId()
           
 String getName()
           
 void propertyChange(PropertyChangeEvent e)
           
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void removeTrainId(String id)
           
 void setComment(String comment)
           
 void setName(String name)
           
 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

NAME_CHANGED_PROPERTY

public static final String NAME_CHANGED_PROPERTY
See Also:
Constant Field Values

_id

protected String _id

_name

protected String _name

_comment

protected String _comment

_trainIds

protected List<String> _trainIds
Constructor Detail

TrainSchedule

public TrainSchedule(String id,
                     String name)

TrainSchedule

public TrainSchedule(Element e)
Construct this Entry from XML. This member has to remain synchronized with the detailed DTD in operations-trains.xml

Parameters:
e - Consist XML element
Method Detail

getId

public String getId()

setName

public void setName(String name)

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()

setComment

public void setComment(String comment)

getComment

public String getComment()

addTrainId

public void addTrainId(String id)

removeTrainId

public void removeTrainId(String id)

containsTrainId

public boolean containsTrainId(String id)

store

public Element store()
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-config.xml.

Returns:
Contents in a JDOM Element

propertyChange

public void propertyChange(PropertyChangeEvent e)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)

firePropertyChange

protected void firePropertyChange(String p,
                                  Object old,
                                  Object n)


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