|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.operations.rollingstock.cars.CarLoads
public class CarLoads
Represents the loads that cars can have.
| Field Summary | |
|---|---|
protected String |
_emptyName
|
protected String |
_loadName
|
protected Hashtable<String,List<CarLoad>> |
list
|
static String |
LOAD_CHANGED_PROPERTY
|
static String |
LOAD_NAME_CHANGED_PROPERTY
|
(package private) static org.slf4j.Logger |
log
|
(package private) PropertyChangeSupport |
pcs
|
| Constructor Summary | |
|---|---|
CarLoads()
|
|
| Method Summary | |
|---|---|
void |
addName(String type,
String name)
Add a load name for the car type. |
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addType(String type)
Add a car type with specific loads |
boolean |
containsName(String type,
String name)
Determines if a car type can have a specific load name. |
void |
deleteName(String type,
String name)
|
void |
dispose()
|
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
JComboBox |
getComboBox(String type)
Gets the appropriate car loads for the car's type. |
int |
getCurMaxNameLength()
|
String |
getDefaultEmptyName()
|
String |
getDefaultLoadName()
|
String |
getDropComment(String type,
String name)
|
Hashtable<String,List<CarLoad>> |
getList()
|
String |
getLoadType(String type,
String name)
Get's the load type, empty or load. |
JComboBox |
getLoadTypesComboBox()
Gets a combobox with the available load types |
List<String> |
getNames(String type)
Gets the load names for a given car type |
String |
getPickupComment(String type,
String name)
|
String |
getPriority(String type,
String name)
Get's a load's priority. |
JComboBox |
getPriorityComboBox()
Gets a combobox with the available priorities |
JComboBox |
getSelectComboBox(String type)
Gets the appropriate car loads for the car's type. |
static CarLoads |
instance()
|
void |
load(org.jdom.Element e)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
replaceName(String type,
String oldName,
String newName)
|
void |
replaceType(String oldType,
String newType)
Replace a car type. |
void |
setDefaultEmptyName(String name)
|
void |
setDefaultLoadName(String name)
|
void |
setDropComment(String type,
String name,
String comment)
|
void |
setLoadType(String type,
String name,
String loadType)
Sets the load type, empty or load. |
void |
setPickupComment(String type,
String name,
String comment)
|
void |
setPriority(String type,
String name,
String priority)
Sets a loads priority. |
void |
store(org.jdom.Element root)
Create an XML element to represent this Entry. |
void |
updateComboBox(String type,
JComboBox box)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Hashtable<String,List<CarLoad>> list
protected String _emptyName
protected String _loadName
public static final String LOAD_CHANGED_PROPERTY
public static final String LOAD_NAME_CHANGED_PROPERTY
PropertyChangeSupport pcs
static org.slf4j.Logger log
| Constructor Detail |
|---|
public CarLoads()
| Method Detail |
|---|
public static CarLoads instance()
public void dispose()
public void addType(String type)
type - car type
public void replaceType(String oldType,
String newType)
oldType - old car typenewType - new car typepublic JComboBox getSelectComboBox(String type)
type -
public JComboBox getComboBox(String type)
type -
public JComboBox getPriorityComboBox()
public JComboBox getLoadTypesComboBox()
public List<String> getNames(String type)
type - car type
public void addName(String type,
String name)
type - car type.name - load name.
public void deleteName(String type,
String name)
public boolean containsName(String type,
String name)
type - car type.name - load name.
public void updateComboBox(String type,
JComboBox box)
public void replaceName(String type,
String oldName,
String newName)
public String getDefaultLoadName()
public void setDefaultLoadName(String name)
public String getDefaultEmptyName()
public void setDefaultEmptyName(String name)
public void setLoadType(String type,
String name,
String loadType)
type - car type.name - load name.loadType - load type: LOAD_TYPE_EMPTY or LOAD_TYPE_LOAD.
public String getLoadType(String type,
String name)
type - car type.name - load name.
public void setPriority(String type,
String name,
String priority)
type - car type.name - load name.priority - load priority, PRIORITY_LOW or PRIORITY_HIGH.
public String getPriority(String type,
String name)
type - car type.name - load name.
public void setPickupComment(String type,
String name,
String comment)
public String getPickupComment(String type,
String name)
public void setDropComment(String type,
String name,
String comment)
public String getDropComment(String type,
String name)
public int getCurMaxNameLength()
public Hashtable<String,List<CarLoad>> getList()
public void store(org.jdom.Element root)
public void load(org.jdom.Element e)
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
protected void firePropertyChange(String p,
Object old,
Object n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||