org.jdesktop.binding
Interface SelectionModel

All Known Implementing Classes:
SelectionModelAdapter

public interface SelectionModel

A basic selection model interface that can be used in any situation where one or more contiguous or noncontiguous "rows" may be selected.

The SelectionModel is used to define which rows are selected in a collection of rows. From the perspective of the SelectionModel, index 0 is the first index. Any index value < 0 is invalid, as is any index greater than the size of the collection. It is up to the implementation of SelectionModel to ensure that the upper index is valid.

Author:
Richard Bair

Method Summary
 void addSelectionModelListener(SelectionModelListener listener)
          Add a listener to the list that's notified each time a change to the selection occurs.
 int[] getSelectionIndices()
           
 void removeSelectionModelListener(SelectionModelListener listener)
          Remove the given listener from the list that's notified each time a change to the selection occurs
 void setSelectionIndices(int[] indices)
           
 

Method Detail

setSelectionIndices

void setSelectionIndices(int[] indices)
Parameters:
indices -

getSelectionIndices

int[] getSelectionIndices()
Returns:

addSelectionModelListener

void addSelectionModelListener(SelectionModelListener listener)
Add a listener to the list that's notified each time a change to the selection occurs.

Parameters:
listener - The listener to be notified

removeSelectionModelListener

void removeSelectionModelListener(SelectionModelListener listener)
Remove the given listener from the list that's notified each time a change to the selection occurs

Parameters:
listener - the listener to be removed


Copyright © 2005 Sun Microsystems All Rights Reserved.