Where Am I? Class Hierarchy (JFC) All Classes (JFC)

Interface com.sun.java.swing.SingleSelectionModel

public interface SingleSelectionModel

A model that supports at most one indexed selection.


Method Index

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

Methods

getSelectedIndex
 public abstract int getSelectedIndex()
Returns:
the model's selection, or -1 if there is no selection.
See Also:
setSelectedIndex
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
clearSelection
 public abstract void clearSelection()
Clears the selection (to -1).

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

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

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


Where Am I? Class Hierarchy (JFC) All Classes (JFC)