Java javax.swing ListSelectionModel fields, constructors, methods, implement or subclass

Example usage for Java javax.swing ListSelectionModel fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing ListSelectionModel.

The text is from its open source code.

Field

intSINGLE_SELECTION
A value for the selectionMode property: select one list index at a time.
intSINGLE_INTERVAL_SELECTION
A value for the selectionMode property: select one contiguous range of indices at a time.
intMULTIPLE_INTERVAL_SELECTION
A value for the selectionMode property: select one or more contiguous ranges of indices at a time.

Method

voidaddListSelectionListener(ListSelectionListener x)
Add a listener to the list that's notified each time a change to the selection occurs.
voidaddSelectionInterval(int index0, int index1)
Changes the selection to be the set union of the current selection and the indices between index0 and index1 inclusive.
voidclearSelection()
Change the selection to the empty set.
intgetLeadSelectionIndex()
Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
intgetMaxSelectionIndex()
Returns the last selected index or -1 if the selection is empty.
intgetMinSelectionIndex()
Returns the first selected index or -1 if the selection is empty.
intgetSelectionMode()
Returns the current selection mode.
booleanisSelectedIndex(int index)
Returns true if the specified index is selected.
booleanisSelectionEmpty()
Returns true if no indices are selected.
voidremoveSelectionInterval(int index0, int index1)
Changes the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive.
voidsetAnchorSelectionIndex(int index)
Set the anchor selection index.
voidsetLeadSelectionIndex(int index)
Set the lead selection index.
voidsetSelectionInterval(int index0, int index1)
Changes the selection to be between index0 and index1 inclusive.
voidsetSelectionMode(int selectionMode)
Sets the selection mode.
voidsetValueIsAdjusting(boolean valueIsAdjusting)
Sets the valueIsAdjusting property, which indicates whether or not upcoming selection changes should be considered part of a single change.