Package org.nuiton.jaxx.runtime.swing
Class OneClicListSelectionModel
- java.lang.Object
-
- org.nuiton.jaxx.runtime.swing.OneClicListSelectionModel
-
- All Implemented Interfaces:
ListSelectionModel
public class OneClicListSelectionModel extends Object implements ListSelectionModel
- Since:
- 1.5
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Field Summary
Fields Modifier and Type Field Description protected ListSelectionModeldelegateprotected ListModelmodel-
Fields inherited from interface javax.swing.ListSelectionModel
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION
-
-
Constructor Summary
Constructors Constructor Description OneClicListSelectionModel(JList list)OneClicListSelectionModel(ListSelectionModel delegate, ListModel model)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.ListSelectionModel
getSelectedIndices, getSelectedItemsCount
-
-
-
-
Field Detail
-
delegate
protected final ListSelectionModel delegate
-
model
protected final ListModel model
-
-
Constructor Detail
-
OneClicListSelectionModel
public OneClicListSelectionModel(JList list)
-
OneClicListSelectionModel
public OneClicListSelectionModel(ListSelectionModel delegate, ListModel model)
-
-
Method Detail
-
installModel
public static void installModel(JList list)
Convinient method to install a newOneClicListSelectionModelon a givenJList.- Parameters:
list- the list onwhcih install the selection model- Since:
- 2.5.4
-
getStates
protected boolean[] getStates(int selectedIndex)
-
setSelectionInterval
public void setSelectionInterval(int index0, int index1)- Specified by:
setSelectionIntervalin interfaceListSelectionModel
-
addSelectionInterval
public void addSelectionInterval(int index0, int index1)- Specified by:
addSelectionIntervalin interfaceListSelectionModel
-
removeSelectionInterval
public void removeSelectionInterval(int index0, int index1)- Specified by:
removeSelectionIntervalin interfaceListSelectionModel
-
getMinSelectionIndex
public int getMinSelectionIndex()
- Specified by:
getMinSelectionIndexin interfaceListSelectionModel
-
getMaxSelectionIndex
public int getMaxSelectionIndex()
- Specified by:
getMaxSelectionIndexin interfaceListSelectionModel
-
isSelectedIndex
public boolean isSelectedIndex(int index)
- Specified by:
isSelectedIndexin interfaceListSelectionModel
-
getAnchorSelectionIndex
public int getAnchorSelectionIndex()
- Specified by:
getAnchorSelectionIndexin interfaceListSelectionModel
-
setAnchorSelectionIndex
public void setAnchorSelectionIndex(int index)
- Specified by:
setAnchorSelectionIndexin interfaceListSelectionModel
-
getLeadSelectionIndex
public int getLeadSelectionIndex()
- Specified by:
getLeadSelectionIndexin interfaceListSelectionModel
-
setLeadSelectionIndex
public void setLeadSelectionIndex(int index)
- Specified by:
setLeadSelectionIndexin interfaceListSelectionModel
-
clearSelection
public void clearSelection()
- Specified by:
clearSelectionin interfaceListSelectionModel
-
isSelectionEmpty
public boolean isSelectionEmpty()
- Specified by:
isSelectionEmptyin interfaceListSelectionModel
-
insertIndexInterval
public void insertIndexInterval(int index, int length, boolean before)- Specified by:
insertIndexIntervalin interfaceListSelectionModel
-
removeIndexInterval
public void removeIndexInterval(int index0, int index1)- Specified by:
removeIndexIntervalin interfaceListSelectionModel
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean valueIsAdjusting)
- Specified by:
setValueIsAdjustingin interfaceListSelectionModel
-
getValueIsAdjusting
public boolean getValueIsAdjusting()
- Specified by:
getValueIsAdjustingin interfaceListSelectionModel
-
setSelectionMode
public void setSelectionMode(int selectionMode)
- Specified by:
setSelectionModein interfaceListSelectionModel
-
getSelectionMode
public int getSelectionMode()
- Specified by:
getSelectionModein interfaceListSelectionModel
-
addListSelectionListener
public void addListSelectionListener(ListSelectionListener x)
- Specified by:
addListSelectionListenerin interfaceListSelectionModel
-
removeListSelectionListener
public void removeListSelectionListener(ListSelectionListener x)
- Specified by:
removeListSelectionListenerin interfaceListSelectionModel
-
-