net.openai.ai.nn.gui.properties
Class ClassSelectorModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--net.openai.ai.nn.gui.properties.ClassSelectorModel
All Implemented Interfaces:
javax.swing.ComboBoxModel, javax.swing.ListModel, java.io.Serializable

public class ClassSelectorModel
extends javax.swing.AbstractListModel
implements javax.swing.ComboBoxModel

Model for a Class-selector DropDown Displays the values of a list of SelectionEntries

Version:
$Id: ClassSelectorModel.java,v 1.1 2002/03/17 18:04:48 tweber Exp $ History:
$Log: ClassSelectorModel.java,v $
Revision 1.1 2002/03/17 18:04:48 tweber
First release of the propertysystem
Author:
Thomas Weber
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
ClassSelectorModel()
          Creates a new instance of a ClassSelectorModel without entries
ClassSelectorModel(java.util.Vector entries)
          Creates a new instance of a ClassSelectorModel.
 
Method Summary
 java.lang.Object getElementAt(int row)
          Returns the SelectionEntry at a specific row.
 java.lang.Object getSelectedItem()
          Returns the name of the currently selected SelectEntry
 int getSize()
          Returns the number of entries in the internal list.
 void setEntries(java.util.Vector entries)
          Sets internal list of SelectionEntries
 void setSelectedItem(java.lang.Object obj)
          Selects a specific DropDown-entry.
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
 

Constructor Detail

ClassSelectorModel

public ClassSelectorModel()
Creates a new instance of a ClassSelectorModel without entries


ClassSelectorModel

public ClassSelectorModel(java.util.Vector entries)
Creates a new instance of a ClassSelectorModel. Displays and uses the SelectionEntries of the given Vector.

Parameters:
entries - Vector of SelectionEntries to be displayed in the DropDown-list
Method Detail

getSelectedItem

public java.lang.Object getSelectedItem()
Returns the name of the currently selected SelectEntry

Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
Returns:
Name of the currently selected SelectEntry-item

setSelectedItem

public void setSelectedItem(java.lang.Object obj)
Selects a specific DropDown-entry.

Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
Parameters:
obj - Name of the SelectEntry to be selected.

getElementAt

public java.lang.Object getElementAt(int row)
Returns the SelectionEntry at a specific row.

Specified by:
getElementAt in interface javax.swing.ListModel
Parameters:
row -
Returns:
Name of a specific SelectionEntry

getSize

public int getSize()
Returns the number of entries in the internal list.

Specified by:
getSize in interface javax.swing.ListModel
Returns:
Amount of SelectionEntries

setEntries

public void setEntries(java.util.Vector entries)
Sets internal list of SelectionEntries

Parameters:
entries - Vector of SelectionEntries to be used in the DropDown-box


Copyright - 2001 OpenAI Labs. All Rights Reserved.