jmri.jmrit.operations.rollingstock.cars
Class CarTypes

java.lang.Object
  extended by jmri.jmrit.operations.rollingstock.cars.CarTypes

public class CarTypes
extends Object

Represents the types of cars a railroad can have.

Author:
Daniel Boudreau Copyright (C) 2008

Field Summary
static String CARTYPES_LENGTH_CHANGED_PROPERTY
           
static String CARTYPES_NAME_CHANGED_PROPERTY
           
protected  List<String> list
           
 
Constructor Summary
CarTypes()
           
 
Method Summary
 void addName(String type)
           
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void changeDefaultNames(String type)
          Changes the car types from descriptive to AAR, or the other way.
 boolean containsName(String type)
           
 void deleteName(String type)
           
 void dispose()
           
protected  void firePropertyChange(String p, Object old, Object n)
           
 JComboBox getComboBox()
           
 int getCurMaxNameLength()
           
 String[] getNames()
           
static CarTypes instance()
           
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void replaceName(String oldName, String newName)
           
 void setNames(String[] types)
           
 void updateComboBox(JComboBox box)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CARTYPES_LENGTH_CHANGED_PROPERTY

public static final String CARTYPES_LENGTH_CHANGED_PROPERTY
See Also:
Constant Field Values

CARTYPES_NAME_CHANGED_PROPERTY

public static final String CARTYPES_NAME_CHANGED_PROPERTY
See Also:
Constant Field Values

list

protected List<String> list
Constructor Detail

CarTypes

public CarTypes()
Method Detail

instance

public static CarTypes instance()

dispose

public void dispose()

getNames

public String[] getNames()

setNames

public void setNames(String[] types)

changeDefaultNames

public void changeDefaultNames(String type)
Changes the car types from descriptive to AAR, or the other way. Only removes the default car type names from the list


addName

public void addName(String type)

deleteName

public void deleteName(String type)

containsName

public boolean containsName(String type)

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