public interface ItsNatListMultSel extends ItsNatList
This component family uses a javax.swing.ListSelectionModel
to keep
track of selection states. When a list item is selected (usually by clicking it) the selection
state is updated accordingly using the selection model (this one fires any listener registered).
By default this component type uses a javax.swing.DefaultListModel
data model.
Modifier and Type | Method and Description |
---|---|
javax.swing.ListSelectionModel |
getListSelectionModel()
Returns the current selection model.
|
int[] |
getSelectedIndices()
Returns an array with indices of the current selected elements.
|
void |
setListData(java.util.List<java.lang.Object> listData)
Constructs a
javax.swing.ListModel from a java.util.List and then
applies ItsNatList.setListModel(javax.swing.ListModel) to it. |
void |
setListData(java.lang.Object[] listData)
Constructs a
javax.swing.ListModel from an array of objects and then
applies ItsNatList.setListModel(javax.swing.ListModel) to it. |
void |
setListSelectionModel(javax.swing.ListSelectionModel selectionModel)
Sets the new selection model.
|
void |
setSelectedIndices(int[] indices)
Sets the current selected elements.
|
createDefaultListModel, getEditingIndex, getEditorActivatorEvent, getItsNatListCellEditor, getItsNatListCellRenderer, getItsNatListStructure, getItsNatListUI, getListModel, getSelectedIndex, indexOf, isEditing, isEditingEnabled, setEditingEnabled, setEditorActivatorEvent, setItsNatListCellEditor, setItsNatListCellRenderer, setListModel, setSelectedIndex, startEditingAt
getElement, getItsNatElementComponentUI
addEventListener, addEventListener, addEventListener, addEventListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, disableEventListener, disableEventListener, dispose, enableEventListener, enableEventListener, getArtifact, getArtifact, getItsNatComponentManager, getItsNatComponentUI, getItsNatDocument, getNode, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, isDisposed, isEnabled, registerArtifact, removeArtifact, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setEnabled, setEventListenerParams, setEventListenerParams, setNode
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue
void setListData(java.lang.Object[] listData)
javax.swing.ListModel
from an array of objects and then
applies ItsNatList.setListModel(javax.swing.ListModel)
to it.
Submitted array must not change, because no changes are detected.
listData
- an array of Objects containing the items of the new list modelsetListData(java.util.List)
void setListData(java.util.List<java.lang.Object> listData)
javax.swing.ListModel
from a java.util.List
and then
applies ItsNatList.setListModel(javax.swing.ListModel)
to it.
Submitted list must not change, because no changes are detected.
listData
- a java.util.List
containing the items of the new list modelsetListData(Object[])
javax.swing.ListSelectionModel getListSelectionModel()
javax.swing.DefaultListSelectionModel
instance.setListSelectionModel(javax.swing.ListSelectionModel)
void setListSelectionModel(javax.swing.ListSelectionModel selectionModel)
If the new selection model is the current defined then is "reset", component listener is removed and added again. Use this technique if you want to add a listener to be executed before the default component listener.
selectionModel
- the new selection model.getListSelectionModel()
int[] getSelectedIndices()
setSelectedIndices(int[])
void setSelectedIndices(int[] indices)
indices
- index array of the new selected elements.getSelectedIndices()
Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.