|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ItsNatListMultSel
Is the base interface of multiple selection lists.
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.
| Method Summary | |
|---|---|
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 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. |
| Methods inherited from interface org.itsnat.comp.list.ItsNatList |
|---|
createDefaultListModel, getEditingIndex, getEditorActivatorEvent, getItsNatListCellEditor, getItsNatListCellRenderer, getItsNatListStructure, getItsNatListUI, getListModel, getSelectedIndex, indexOf, isEditing, isEditingEnabled, setEditingEnabled, setEditorActivatorEvent, setItsNatListCellEditor, setItsNatListCellRenderer, setListModel, setSelectedIndex, startEditingAt |
| Methods inherited from interface org.itsnat.comp.ItsNatElementComponent |
|---|
getElement, getItsNatElementComponentUI |
| Methods inherited from interface org.itsnat.core.ItsNatUserData |
|---|
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue |
| Method Detail |
|---|
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 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||