|
||||||||||
| 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.cars.CarManager
public class CarManager
Manages the cars.
| Field Summary | |
|---|---|
protected Hashtable<String,Kernel> |
_kernelHashTable
|
static String |
KERNELLISTLENGTH_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 | |
|---|---|
CarManager()
|
|
| Method Summary | |
|---|---|
void |
deleteKernel(String name)
Delete a Kernel by name |
List<String> |
getByFinalDestinationList()
|
Car |
getById(String id)
Get rolling stock by id |
List<String> |
getByKernelList()
Sort by car kernel names |
List<String> |
getByLoadList()
Sort by car loads |
List<String> |
getByLocationList()
Sort by rolling stock location |
Car |
getByRoadAndNumber(String road,
String number)
Get Car by road and number |
List<String> |
getByRweList()
Sort by car return when empty location and track |
List<String> |
getByTrainDestinationList(Train train)
Get a list of Cars assigned to a train sorted by destination. |
Car |
getByTypeAndRoad(String type,
String road)
Get a Car by type and road. |
List<String> |
getCabooseRoadNames()
Get a list of car road names where the car was flagged as a caboose. |
int[] |
getCarsFrameTableColumnWidths()
|
List<String> |
getCarsLocationUnknown()
|
List<String> |
getFredRoadNames()
Get a list of car road names where the car was flagged with FRED |
Kernel |
getKernelByName(String name)
Get a Kernel by name |
JComboBox |
getKernelComboBox()
Get a comboBox loaded with current Kernel names |
List<String> |
getKernelNameList()
Get a list of kernel names |
protected Object |
getRsAttribute(RollingStock rs,
int attribute)
|
static CarManager |
instance()
|
Car |
newCar(String road,
String number)
Finds an existing Car or creates a new Car if needed requires car's road and number |
Kernel |
newKernel(String name)
Create a new Kernel |
void |
options(Element values)
|
void |
replaceLoad(String type,
String oldLoadName,
String newLoadName)
Replace car loads |
void |
setCarsFrameTableColumnWidths(int[] tableColumnWidths)
|
Element |
store()
Create an XML element to represent this Entry. |
void |
updateKernelComboBox(JComboBox box)
Update an existing comboBox with the current kernel names |
| Methods inherited from class jmri.jmrit.operations.rollingstock.RollingStockManager |
|---|
addPropertyChangeListener, deleteAll, deregister, dispose, firePropertyChange, getAvailableTrainList, getByBuiltList, getByColorList, getByDestinationList, getByIdList, getByList, getByMovesList, getByNumberList, getByOwnerList, getByRfid, getByRfidList, getByRoadNameList, getByTrainList, getByTrainList, 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,Kernel> _kernelHashTable
public static final String KERNELLISTLENGTH_CHANGED_PROPERTY
| Constructor Detail |
|---|
public CarManager()
| Method Detail |
|---|
public static CarManager instance()
public Car newCar(String road,
String number)
road - car roadnumber - car number
public Car getById(String id)
RollingStockManager
getById in class RollingStockManager
public Car getByRoadAndNumber(String road,
String number)
getByRoadAndNumber in class RollingStockManagerroad - Car roadnumber - Car number
public Car getByTypeAndRoad(String type,
String road)
getByTypeAndRoad in class RollingStockManagertype - car type.road - car road.
public Kernel newKernel(String name)
name -
public void deleteKernel(String name)
name - public Kernel getKernelByName(String name)
name -
public JComboBox getKernelComboBox()
public void updateKernelComboBox(JComboBox box)
box - comboBox requesting updatepublic List<String> getKernelNameList()
public List<String> getByLocationList()
getByLocationList in class RollingStockManagerpublic List<String> getByKernelList()
public List<String> getByLoadList()
public List<String> getByRweList()
public List<String> getByFinalDestinationList()
protected Object getRsAttribute(RollingStock rs,
int attribute)
getRsAttribute in class RollingStockManagerpublic List<String> getByTrainDestinationList(Train train)
train -
public List<String> getCabooseRoadNames()
public List<String> getFredRoadNames()
public void replaceLoad(String type,
String oldLoadName,
String newLoadName)
type - type of caroldLoadName - old load namenewLoadName - new load namepublic List<String> getCarsLocationUnknown()
public int[] getCarsFrameTableColumnWidths()
public void setCarsFrameTableColumnWidths(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 | |||||||||