net.aerith.misao.gui
Class OpenCatalogPanel.CatalogSelectionComboBoxModel

java.lang.Object
  |
  +--javax.swing.AbstractListModel
        |
        +--javax.swing.DefaultListModel
              |
              +--net.aerith.misao.gui.OpenCatalogPanel.CatalogSelectionComboBoxModel
Enclosing class:
OpenCatalogPanel

protected class OpenCatalogPanel.CatalogSelectionComboBoxModel
extends javax.swing.DefaultListModel
implements javax.swing.ComboBoxModel

The CatalogSelectionComboBoxModel is a model of the combo box to select a catalog.

See Also:
Serialized Form

Field Summary
private  java.util.Vector catalog_list
          The list of catalog readers to be selected.
private  java.lang.Object selected_item
          The selected item.
 
Fields inherited from class javax.swing.DefaultListModel
delegate
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
OpenCatalogPanel.CatalogSelectionComboBoxModel()
          Constructs an empty CatalogSelectionComboBoxModel.
 
Method Summary
 void addCatalogReader(CatalogReader reader)
          Adds a catalog reader.
 CatalogReader getCatalogReaderAt(int index)
          Gets the catalog reader at the specified location.
 int getIndexOf(CatalogReader reader)
          Gets the location of the specified catalog reader.
 java.lang.Object getSelectedItem()
          Gets the selected item.
 void setSelectedItem(java.lang.Object item)
          Sets the item to be selected.
 
Methods inherited from class javax.swing.DefaultListModel
add, addElement, capacity, clear, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAllElements, removeElement, removeElementAt, removeRange, set, setElementAt, setSize, size, toArray, toString, trimToSize
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, removeListDataListener
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

catalog_list

private java.util.Vector catalog_list
The list of catalog readers to be selected.

selected_item

private java.lang.Object selected_item
The selected item.
Constructor Detail

OpenCatalogPanel.CatalogSelectionComboBoxModel

public OpenCatalogPanel.CatalogSelectionComboBoxModel()
Constructs an empty CatalogSelectionComboBoxModel.
Method Detail

getSelectedItem

public java.lang.Object getSelectedItem()
Gets the selected item.
Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
Returns:
the selected item.

setSelectedItem

public void setSelectedItem(java.lang.Object item)
Sets the item to be selected.
Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
Parameters:
item - the item to be selected.

addCatalogReader

public void addCatalogReader(CatalogReader reader)
Adds a catalog reader.
Parameters:
reader - a catalog reader to add to this combo box.

getCatalogReaderAt

public CatalogReader getCatalogReaderAt(int index)
Gets the catalog reader at the specified location.
Parameters:
index - the location of the catalog reader to get.
Returns:
the catalog reader at the specified location.

getIndexOf

public int getIndexOf(CatalogReader reader)
Gets the location of the specified catalog reader.
Parameters:
reader - a catalog reader to get the location.
Returns:
the location of the specified catalog reader.