org.opensolaris.opengrok.search.scope
Class ConfigurationComboModel

java.lang.Object
  extended by org.opensolaris.opengrok.search.scope.ConfigurationComboModel
All Implemented Interfaces:
javax.swing.ComboBoxModel, javax.swing.ListModel

public class ConfigurationComboModel
extends java.lang.Object
implements javax.swing.ComboBoxModel


Constructor Summary
ConfigurationComboModel()
          Creates a new instance of ConfigurationComboModel
 
Method Summary
 void addListDataListener(javax.swing.event.ListDataListener l)
          Adds a listener to the list that's notified each time a change to the data model occurs.
 java.lang.Object getElementAt(int index)
          Returns the value at the specified index.
 java.lang.Object getSelectedItem()
          Returns the selected item
 int getSize()
          Returns the length of the list.
 void refresh()
           
 void removeListDataListener(javax.swing.event.ListDataListener l)
          Removes a listener from the list that's notified each time a change to the data model occurs.
 void setSelectedItem(java.lang.Object anItem)
          Set the selected item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationComboModel

public ConfigurationComboModel()
Creates a new instance of ConfigurationComboModel

Method Detail

refresh

public void refresh()

setSelectedItem

public void setSelectedItem(java.lang.Object anItem)
Set the selected item. The implementation of this method should notify all registered ListDataListeners that the contents have changed.

Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
Parameters:
anItem - the list object to select or null to clear the selection

getElementAt

public java.lang.Object getElementAt(int index)
Returns the value at the specified index.

Specified by:
getElementAt in interface javax.swing.ListModel
Parameters:
index - the requested index
Returns:
the value at index

removeListDataListener

public void removeListDataListener(javax.swing.event.ListDataListener l)
Removes a listener from the list that's notified each time a change to the data model occurs.

Specified by:
removeListDataListener in interface javax.swing.ListModel
Parameters:
l - the ListDataListener to be removed

addListDataListener

public void addListDataListener(javax.swing.event.ListDataListener l)
Adds a listener to the list that's notified each time a change to the data model occurs.

Specified by:
addListDataListener in interface javax.swing.ListModel
Parameters:
l - the ListDataListener to be added

getSize

public int getSize()
Returns the length of the list.

Specified by:
getSize in interface javax.swing.ListModel
Returns:
the length of the list

getSelectedItem

public java.lang.Object getSelectedItem()
Returns the selected item

Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel
Returns:
The selected item or null if there is no selection