Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ojb.tools.swing
Class SortingComboBoxModel  view SortingComboBoxModel download SortingComboBoxModel.java

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended byojb.tools.swing.SortingComboBoxModel
All Implemented Interfaces:
javax.swing.ComboBoxModel, javax.swing.ListModel, javax.swing.MutableComboBoxModel, java.io.Serializable

public class SortingComboBoxModel
extends javax.swing.AbstractListModel
implements javax.swing.MutableComboBoxModel

Version:
$Id: SortingComboBoxModel.java,v 1.2 2002/05/16 11:46:48 florianbruckner Exp $

Field Summary
(package private)  java.util.List aList
           
(package private)  java.lang.Object selectedItem
           
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
SortingComboBoxModel()
          Creates a new instance of SortingComboBoxModel
SortingComboBoxModel(java.util.List l)
           
 
Method Summary
 void addElement(java.lang.Object obj)
          This method adds given object to its data model.
 java.lang.Object getElementAt(int param)
          Retrieves a data element at a specified index.
 int getIndexOf(java.lang.Object o)
           
 java.lang.Object getSelectedItem()
          Returns the currently selected item in the combo box.
 int getSize()
          Return the number of data elements in the list.
 void insertElementAt(java.lang.Object obj, int param)
          This method inserts givent element to the data model, at the specified index.
 void removeElement(java.lang.Object obj)
          This method removes given element from the data model
 void removeElementAt(int param)
          This method removes elements located at the given index in the data model.
 void setSelectedItem(java.lang.Object obj)
          Sets the selected item in the combo box.
 
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
 

Field Detail

aList

java.util.List aList

selectedItem

java.lang.Object selectedItem
Constructor Detail

SortingComboBoxModel

public SortingComboBoxModel()
Creates a new instance of SortingComboBoxModel


SortingComboBoxModel

public SortingComboBoxModel(java.util.List l)
Method Detail

getElementAt

public java.lang.Object getElementAt(int param)
Description copied from interface: javax.swing.ListModel
Retrieves a data element at a specified index.

Specified by:
getElementAt in interface javax.swing.ListModel

getSize

public int getSize()
Description copied from interface: javax.swing.ListModel
Return the number of data elements in the list.

Specified by:
getSize in interface javax.swing.ListModel

addElement

public void addElement(java.lang.Object obj)
Description copied from interface: javax.swing.MutableComboBoxModel
This method adds given object to its data model.

Specified by:
addElement in interface javax.swing.MutableComboBoxModel

getSelectedItem

public java.lang.Object getSelectedItem()
Description copied from interface: javax.swing.ComboBoxModel
Returns the currently selected item in the combo box.

Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel

insertElementAt

public void insertElementAt(java.lang.Object obj,
                            int param)
Description copied from interface: javax.swing.MutableComboBoxModel
This method inserts givent element to the data model, at the specified index.

Specified by:
insertElementAt in interface javax.swing.MutableComboBoxModel

removeElement

public void removeElement(java.lang.Object obj)
Description copied from interface: javax.swing.MutableComboBoxModel
This method removes given element from the data model

Specified by:
removeElement in interface javax.swing.MutableComboBoxModel

removeElementAt

public void removeElementAt(int param)
Description copied from interface: javax.swing.MutableComboBoxModel
This method removes elements located at the given index in the data model.

Specified by:
removeElementAt in interface javax.swing.MutableComboBoxModel

setSelectedItem

public void setSelectedItem(java.lang.Object obj)
Description copied from interface: javax.swing.ComboBoxModel
Sets the selected item in the combo box. Classes implementing this interface should fire a javax.swing.event.ListDataEvent to all registered javax.swing.event.ListDataListeners to indicate that the selection has changed.

Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel

getIndexOf

public int getIndexOf(java.lang.Object o)