jmri.jmrit.operations.rollingstock.cars
Class CarLengths

java.lang.Object
  extended by jmri.jmrit.operations.rollingstock.cars.CarLengths
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class CarLengths
extends Object
implements PropertyChangeListener

Represents the lengths that cars can have.

Author:
Daniel Boudreau Copyright (C) 2008

Field Summary
static String CARLENGTHS_CHANGED_PROPERTY
           
static String CARLENGTHS_NAME_CHANGED_PROPERTY
           
 
Constructor Summary
CarLengths()
           
 
Method Summary
 void addName(String length)
           
 void addPropertyChangeListener(PropertyChangeListener l)
           
 boolean containsName(String length)
           
 void deleteName(String length)
           
 void dispose()
           
protected  void firePropertyChange(String p, Object old, Object n)
           
 JComboBox getComboBox()
           
 int getCurMaxNameLength()
           
 String[] getNames()
           
static CarLengths instance()
           
 void propertyChange(PropertyChangeEvent e)
          The PropertyChangeListener interface in this class is intended to keep track of user name changes to individual NamedBeans.
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void replaceName(String oldName, String newName)
           
 void setNames(String[] lengths)
           
 void updateComboBox(JComboBox box)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CARLENGTHS_CHANGED_PROPERTY

public static final String CARLENGTHS_CHANGED_PROPERTY
See Also:
Constant Field Values

CARLENGTHS_NAME_CHANGED_PROPERTY

public static final String CARLENGTHS_NAME_CHANGED_PROPERTY
See Also:
Constant Field Values
Constructor Detail

CarLengths

public CarLengths()
Method Detail

instance

public static CarLengths instance()

dispose

public void dispose()

propertyChange

public void propertyChange(PropertyChangeEvent e)
The PropertyChangeListener interface in this class is intended to keep track of user name changes to individual NamedBeans. It is not completely implemented yet. In particular, listeners are not added to newly registered objects.

Specified by:
propertyChange in interface PropertyChangeListener

getNames

public String[] getNames()

setNames

public void setNames(String[] lengths)

addName

public void addName(String length)

deleteName

public void deleteName(String length)

containsName

public boolean containsName(String length)

replaceName

public void replaceName(String oldName,
                        String newName)

getComboBox

public JComboBox getComboBox()

updateComboBox

public void updateComboBox(JComboBox box)

getCurMaxNameLength

public int getCurMaxNameLength()

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)

firePropertyChange

protected void firePropertyChange(String p,
                                  Object old,
                                  Object n)


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads