|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.rollingstock.RollingStockManager
jmri.jmrit.operations.rollingstock.engines.EngineManager
public class EngineManager
Manages the engines.
| Field Summary | |
|---|---|
protected Hashtable<String,Consist> |
_consistHashTable
|
static String |
CONSISTLISTLENGTH_CHANGED_PROPERTY
|
| Fields inherited from class jmri.jmrit.operations.rollingstock.RollingStockManager |
|---|
_hashTable, BY_BUILT, BY_COLOR, BY_DESTINATION, BY_LOCATION, BY_MOVES, BY_NUMBER, BY_OWNER, BY_RFID, BY_ROAD, BY_TRAIN, BY_TYPE, BY_VALUE, LISTLENGTH_CHANGED_PROPERTY |
| Constructor Summary | |
|---|---|
EngineManager()
|
|
| Method Summary | |
|---|---|
void |
deleteConsist(String name)
|
List<String> |
getAvailableTrainList(Train train)
return a list available engines (no assigned train) engines are ordered least recently moved to most recently moved. |
List<String> |
getByConsistList()
Sort by engine consist |
Engine |
getById(String id)
Get rolling stock by id |
List<String> |
getByModelList()
Sort by engine model |
Engine |
getByRoadAndNumber(String engineRoad,
String engineNumber)
Get rolling stock by road and number |
Consist |
getConsistByName(String name)
|
JComboBox |
getConsistComboBox()
Creates a combo box containing all of the consist names |
List<String> |
getConsistNameList()
|
List<String> |
getEngineRoadNames(String model)
Get a list of engine road names. |
int[] |
getEnginesFrameTableColumnWidths()
|
protected Object |
getRsAttribute(RollingStock rs,
int attribute)
|
static EngineManager |
instance()
|
Consist |
newConsist(String name)
Creates a new consist if needed |
Engine |
newEngine(String engineRoad,
String engineNumber)
Finds an existing engine or creates a new engine if needed requires engine's road and number |
void |
options(Element values)
|
void |
setEnginesFrameTableColumnWidths(int[] tableColumnWidths)
|
Element |
store()
Create an XML element to represent this Entry. |
void |
updateConsistComboBox(JComboBox box)
|
| Methods inherited from class jmri.jmrit.operations.rollingstock.RollingStockManager |
|---|
addPropertyChangeListener, deleteAll, deregister, dispose, firePropertyChange, getByBuiltList, getByColorList, getByDestinationList, getByIdList, getByList, getByLocationList, getByMovesList, getByNumberList, getByOwnerList, getByRfid, getByRfidList, getByRoadNameList, getByTrainList, getByTrainList, getByTypeAndRoad, getByTypeList, getByTypeList, getByValueList, getNumEntries, register, removePropertyChangeListener, sortList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Hashtable<String,Consist> _consistHashTable
public static final String CONSISTLISTLENGTH_CHANGED_PROPERTY
| Constructor Detail |
|---|
public EngineManager()
| Method Detail |
|---|
public static EngineManager instance()
public Engine getById(String id)
RollingStockManager
getById in class RollingStockManager
public Engine getByRoadAndNumber(String engineRoad,
String engineNumber)
RollingStockManager
getByRoadAndNumber in class RollingStockManagerengineRoad - RollingStock roadengineNumber - RollingStock number
public Engine newEngine(String engineRoad,
String engineNumber)
engineRoad - engineNumber -
public Consist newConsist(String name)
name - of the consist
public void deleteConsist(String name)
public Consist getConsistByName(String name)
public JComboBox getConsistComboBox()
public void updateConsistComboBox(JComboBox box)
public List<String> getConsistNameList()
public List<String> getByModelList()
public List<String> getByConsistList()
protected Object getRsAttribute(RollingStock rs,
int attribute)
getRsAttribute in class RollingStockManagerpublic List<String> getAvailableTrainList(Train train)
getAvailableTrainList in class RollingStockManagertrain -
public List<String> getEngineRoadNames(String model)
public int[] getEnginesFrameTableColumnWidths()
public void setEnginesFrameTableColumnWidths(int[] tableColumnWidths)
public void options(Element values)
public Element store()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||