portal.comp.list
Class DefaultSelectionModel

java.lang.Object
  extended byportal.comp.list.DefaultSelectionModel
All Implemented Interfaces:
Model, SelectionModel, java.io.Serializable

public class DefaultSelectionModel
extends java.lang.Object
implements SelectionModel

See Also:
Serialized Form

Constructor Summary
DefaultSelectionModel(ListDataModel listDataModel, SelectionMode selectionMode)
           
 
Method Summary
 void clearSelection()
           
 int getFirstSelected()
           
 SelectionMode getSelectionMode()
           
 boolean isSelected(int index)
           
 void setListDataModel(ListDataModel listDataModel)
           
 void setSelected(int index, boolean selected)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSelectionModel

public DefaultSelectionModel(ListDataModel listDataModel,
                             SelectionMode selectionMode)
Method Detail

setListDataModel

public void setListDataModel(ListDataModel listDataModel)
Specified by:
setListDataModel in interface SelectionModel

getFirstSelected

public int getFirstSelected()
Specified by:
getFirstSelected in interface SelectionModel
Returns:
the smallest index for which isSelected(index) returns true. It returns -1 when nothing is selected.

clearSelection

public void clearSelection()
Specified by:
clearSelection in interface SelectionModel

setSelected

public void setSelected(int index,
                        boolean selected)
Specified by:
setSelected in interface SelectionModel

isSelected

public boolean isSelected(int index)
Specified by:
isSelected in interface SelectionModel

getSelectionMode

public SelectionMode getSelectionMode()
Specified by:
getSelectionMode in interface SelectionModel