fr.ifremer.coser.ui.util
Class CoserListSelectionModel
java.lang.Object
jaxx.runtime.swing.OneClicListSelectionModel
fr.ifremer.coser.ui.util.CoserListSelectionModel
- All Implemented Interfaces:
- EventListener, ListDataListener, ListSelectionModel
public class CoserListSelectionModel
- extends jaxx.runtime.swing.OneClicListSelectionModel
- implements ListDataListener
Model de selection fonctionnant avec les intances des objects selectionnée
et non par indices.
Etend OneClicListSelectionModel pour sélectionner par simple clic.
Implemente ListDataListener pour que la selection apres changement
des données reste la même au niveau des objets (sinon, les indices
ne correspondent pas au données précédent le changement.
ATTENTION : selectedObjects ne reflete pas la selection
de la liste. Certains de ces élements peuvent être mémorisé selectionné,
mais non présente dans le modele de la liste, donc hors selection.
- Version:
- $Revision: 416 $
Last update : $Date: 2010-12-15 16:01:13 +0100 (mer., 15 déc. 2010) $
By : $Author: chatellier $
- Author:
- chatellier
| Fields inherited from class jaxx.runtime.swing.OneClicListSelectionModel |
delegate, model |
| Methods inherited from class jaxx.runtime.swing.OneClicListSelectionModel |
addListSelectionListener, getAnchorSelectionIndex, getLeadSelectionIndex, getMaxSelectionIndex, getMinSelectionIndex, getSelectionMode, getStates, getValueIsAdjusting, insertIndexInterval, isSelectedIndex, isSelectionEmpty, removeIndexInterval, removeListSelectionListener, removeSelectionInterval, setAnchorSelectionIndex, setLeadSelectionIndex, setSelectionMode, setValueIsAdjusting |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
selectedObjects
protected Set<Object> selectedObjects
- Selection objects.
coserListModel
protected CoserListModel coserListModel
- List model.
CoserListSelectionModel
public CoserListSelectionModel(ListSelectionModel delegate,
CoserListModel coserListModel)
- Constuctor.
- Parameters:
delegate - coserListModel -
setSelectedObjects
public void setSelectedObjects(Collection<?> objects)
- Replace selection.
- Parameters:
objects - new selected objects
intervalAdded
public void intervalAdded(ListDataEvent e)
- Specified by:
intervalAdded in interface ListDataListener
intervalRemoved
public void intervalRemoved(ListDataEvent e)
- Specified by:
intervalRemoved in interface ListDataListener
contentsChanged
public void contentsChanged(ListDataEvent e)
- Specified by:
contentsChanged in interface ListDataListener
setSelectionInterval
public void setSelectionInterval(int index0,
int index1)
- Specified by:
setSelectionInterval in interface ListSelectionModel- Overrides:
setSelectionInterval in class jaxx.runtime.swing.OneClicListSelectionModel
addSelectionInterval
public void addSelectionInterval(int index0,
int index1)
- Specified by:
addSelectionInterval in interface ListSelectionModel- Overrides:
addSelectionInterval in class jaxx.runtime.swing.OneClicListSelectionModel
registerSelection
protected void registerSelection(int index0,
int index1)
fillSelection
public void fillSelection()
- Fill selection.
clearSelection
public void clearSelection()
- Specified by:
clearSelection in interface ListSelectionModel- Overrides:
clearSelection in class jaxx.runtime.swing.OneClicListSelectionModel
Copyright © 2010-2011 Ifremer. All Rights Reserved.