All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Interface java.awt.swing.SingleSelectionModel

public interface SingleSelectionModel
A model that supports at most one indexed selection.


Method Index

 o addChangeListener(ChangeListener)
Adds listener as a listener to changes in the model.
 o clearSelection()
Clears the selection (to -1).
 o getSelectedIndex()
 o isSelected()
Returns true if the selection model currently has a selected value.
 o removeChangeListener(ChangeListener)
Removes listener as a listener to changes in the model.
 o setSelectedIndex(int)
Sets the model's selected index to index.

Methods

 o getSelectedIndex
public abstract int getSelectedIndex()
Returns:
the model's selection, or -1 if there is no selection.
See Also:
setSelectedIndex
 o setSelectedIndex
public abstract void setSelectedIndex(int index)
Sets the model's selected index to index. Notifies any listeners if the model changes

See Also:
getSelectedIndex, addChangeListener
 o clearSelection
public abstract void clearSelection()
Clears the selection (to -1).

 o isSelected
public abstract boolean isSelected()
Returns true if the selection model currently has a selected value.

 o addChangeListener
public abstract void addChangeListener(ChangeListener listener)
Adds listener as a listener to changes in the model.

 o removeChangeListener
public abstract void removeChangeListener(ChangeListener listener)
Removes listener as a listener to changes in the model.


All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature