Class CarTypes
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.jmrit.operations.rollingstock.RollingStockAttribute
-
- jmri.jmrit.operations.rollingstock.cars.CarTypes
-
- All Implemented Interfaces:
PropertyChangeFirer,PropertyChangeProvider,InstanceManagerAutoDefault
public class CarTypes extends RollingStockAttribute implements InstanceManagerAutoDefault
Represents the types of cars a railroad can have.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCARTYPES_CHANGED_PROPERTYstatic java.lang.StringCARTYPES_NAME_CHANGED_PROPERTY-
Fields inherited from class jmri.jmrit.operations.rollingstock.RollingStockAttribute
list, maxName, maxNameLength, maxNameSubStringLength, MIN_NAME_LENGTH
-
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description CarTypes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddName(java.lang.String type)voidchangeDefaultNames(java.lang.String type)Changes the car types from descriptive to AAR, or the other way.voiddeleteName(java.lang.String type)protected java.lang.StringgetDefaultNames()intgetMaxFullNameLength()Get the maximum character length of a car type including the sub type characters.intgetMaxNameLength()Get the maximum character length of a car type when printing on a manifest or switch list.voidload(org.jdom2.Element root)voidreplaceName(java.lang.String oldName, java.lang.String newName)protected voidsetDirtyAndFirePropertyChange(java.lang.String p, java.lang.Object old, java.lang.Object n)voidstore(org.jdom2.Element root)Create an XML element to represent this Entry.-
Methods inherited from class jmri.jmrit.operations.rollingstock.RollingStockAttribute
containsName, dispose, getComboBox, getMaxNameSubStringLength, getMinNameLength, getNames, load, setNames, setValues, sort, store, updateComboBox
-
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
CARTYPES_CHANGED_PROPERTY
public static final java.lang.String CARTYPES_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
CARTYPES_NAME_CHANGED_PROPERTY
public static final java.lang.String CARTYPES_NAME_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CarTypes
public CarTypes()
-
-
Method Detail
-
getDefaultNames
protected java.lang.String getDefaultNames()
- Overrides:
getDefaultNamesin classRollingStockAttribute
-
changeDefaultNames
public void changeDefaultNames(java.lang.String type)
Changes the car types from descriptive to AAR, or the other way. Only removes the default car type names from the list- Parameters:
type- Setup.DESCRIPTIVE or Setup.AAR
-
addName
public void addName(java.lang.String type)
- Overrides:
addNamein classRollingStockAttribute
-
deleteName
public void deleteName(java.lang.String type)
- Overrides:
deleteNamein classRollingStockAttribute
-
replaceName
public void replaceName(java.lang.String oldName, java.lang.String newName)
-
getMaxNameLength
public int getMaxNameLength()
Get the maximum character length of a car type when printing on a manifest or switch list. Car "subtypes" or characters after the hyphen are ignored.- Overrides:
getMaxNameLengthin classRollingStockAttribute- Returns:
- the maximum character length of a car type
-
getMaxFullNameLength
public int getMaxFullNameLength()
Get the maximum character length of a car type including the sub type characters.- Returns:
- the maximum character length of a car type
-
store
public void store(org.jdom2.Element root)
Create an XML element to represent this Entry. This member has to remain synchronized with the detailed DTD in operations-cars.dtd.- Parameters:
root- The common Element for operations-cars.dtd.
-
load
public void load(org.jdom2.Element root)
-
setDirtyAndFirePropertyChange
protected void setDirtyAndFirePropertyChange(java.lang.String p, java.lang.Object old, java.lang.Object n)
-
-