Class CarLengths
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.jmrit.operations.rollingstock.RollingStockAttribute
-
- jmri.jmrit.operations.rollingstock.cars.CarLengths
-
- All Implemented Interfaces:
PropertyChangeFirer
,PropertyChangeProvider
,InstanceManagerAutoDefault
public class CarLengths extends RollingStockAttribute implements InstanceManagerAutoDefault
Represents the lengths that cars can have.
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
CAR_MIN_NAME_LENGTH
static java.lang.String
CARLENGTHS_CHANGED_PROPERTY
static java.lang.String
CARLENGTHS_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 CarLengths()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addName(java.lang.String length)
void
deleteName(java.lang.String length)
protected java.lang.String
getDefaultNames()
protected int
getMinNameLength()
void
load(org.jdom2.Element root)
void
replaceName(java.lang.String oldName, java.lang.String newName)
protected void
setDirtyAndFirePropertyChange(java.lang.String p, java.lang.Object old, java.lang.Object n)
void
setNames(java.lang.String[] lengths)
void
sort()
void
store(org.jdom2.Element root)
Create an XML element to represent this Entry.-
Methods inherited from class jmri.jmrit.operations.rollingstock.RollingStockAttribute
containsName, dispose, getComboBox, getMaxNameLength, getMaxNameSubStringLength, getNames, load, setValues, store, updateComboBox
-
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
CARLENGTHS_CHANGED_PROPERTY
public static final java.lang.String CARLENGTHS_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
CARLENGTHS_NAME_CHANGED_PROPERTY
public static final java.lang.String CARLENGTHS_NAME_CHANGED_PROPERTY
- See Also:
- Constant Field Values
-
CAR_MIN_NAME_LENGTH
protected static final int CAR_MIN_NAME_LENGTH
-
-
Constructor Detail
-
CarLengths
public CarLengths()
-
-
Method Detail
-
getDefaultNames
protected java.lang.String getDefaultNames()
- Overrides:
getDefaultNames
in classRollingStockAttribute
-
setNames
public void setNames(java.lang.String[] lengths)
- Overrides:
setNames
in classRollingStockAttribute
-
addName
public void addName(java.lang.String length)
- Overrides:
addName
in classRollingStockAttribute
-
deleteName
public void deleteName(java.lang.String length)
- Overrides:
deleteName
in classRollingStockAttribute
-
replaceName
public void replaceName(java.lang.String oldName, java.lang.String newName)
-
sort
public void sort()
- Overrides:
sort
in classRollingStockAttribute
-
getMinNameLength
protected int getMinNameLength()
- Overrides:
getMinNameLength
in classRollingStockAttribute
-
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)
-
-