|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuic.model.ExtendedListSelectionModel
public class ExtendedListSelectionModel
List selection model, that handles 2 extra selection types
| Field Summary | |
|---|---|
static int |
EXTENDED_INTERVAL_SELECTION
Selection model that looks most like java standard multi selection interval selection Use when list will mostly contain one selected item, but CAN have more selections |
static int |
NO_SELECTION
No selection possible |
| Fields inherited from interface javax.swing.ListSelectionModel |
|---|
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION |
| Constructor Summary | |
|---|---|
ExtendedListSelectionModel()
|
|
| Method Summary | |
|---|---|
void |
addListSelectionListener(ListSelectionListener listener)
Add a listener to the list that's notified each time a change to the selection occurs. |
void |
addSelectionInterval(int index0,
int index1)
Change the selection to be the set union of the current selection and the indices between index0 and index1 inclusive. |
void |
clearSelection()
Change the selection to the empty set. |
protected void |
fireValueChanged(int index0,
int index1)
Fires the valueChanged event to all listeners |
int |
getAnchorSelectionIndex()
Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval(). |
int |
getLeadSelectionIndex()
Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval(). |
int |
getMaxSelectionIndex()
Returns the last selected index or -1 if the selection is empty. |
int |
getMinSelectionIndex()
Returns the first selected index or -1 if the selection is empty. |
int |
getSelectionMode()
Returns the current selection mode. |
boolean |
getValueIsAdjusting()
Returns true if the value is undergoing a series of changes. |
void |
insertIndexInterval(int index,
int length,
boolean before)
Insert length indices beginning before/after index. |
boolean |
isSelectedIndex(int index)
Returns true if the specified index is selected. |
boolean |
isSelectionEmpty()
Returns true if no indices are selected. |
void |
removeIndexInterval(int index0,
int index1)
Remove the indices in the interval index0,index1 (inclusive) from the selection model. |
void |
removeListSelectionListener(ListSelectionListener listener)
Remove a listener from the list that's notified each time a change to the selection occurs. |
void |
removeSelectionInterval(int index0,
int index1)
Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive. |
void |
setAnchorSelectionIndex(int index)
Set the anchor selection index. |
void |
setLeadSelectionIndex(int index)
Set the lead selection index. |
void |
setSelectionInterval(int index0,
int index1)
Change the selection to be between index0 and index1 inclusive. |
void |
setSelectionMode(int selectionMode)
Set the selection mode. |
void |
setValueIsAdjusting(boolean valueIsAdjusting)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int EXTENDED_INTERVAL_SELECTION
public static int NO_SELECTION
| Constructor Detail |
|---|
public ExtendedListSelectionModel()
| Method Detail |
|---|
public void addListSelectionListener(ListSelectionListener listener)
addListSelectionListener in interface ListSelectionModelpublic void removeListSelectionListener(ListSelectionListener listener)
removeListSelectionListener in interface ListSelectionModel
public void addSelectionInterval(int index0,
int index1)
addSelectionInterval in interface ListSelectionModelpublic void clearSelection()
clearSelection in interface ListSelectionModelpublic int getAnchorSelectionIndex()
getAnchorSelectionIndex in interface ListSelectionModelpublic int getLeadSelectionIndex()
getLeadSelectionIndex in interface ListSelectionModelpublic void setAnchorSelectionIndex(int index)
setAnchorSelectionIndex in interface ListSelectionModelpublic void setLeadSelectionIndex(int index)
setLeadSelectionIndex in interface ListSelectionModelpublic int getMinSelectionIndex()
getMinSelectionIndex in interface ListSelectionModelpublic int getMaxSelectionIndex()
getMaxSelectionIndex in interface ListSelectionModelpublic int getSelectionMode()
getSelectionMode in interface ListSelectionModelpublic void setSelectionMode(int selectionMode)
setSelectionMode in interface ListSelectionModelpublic boolean getValueIsAdjusting()
getValueIsAdjusting in interface ListSelectionModelpublic void setValueIsAdjusting(boolean valueIsAdjusting)
setValueIsAdjusting in interface ListSelectionModel
public void insertIndexInterval(int index,
int length,
boolean before)
insertIndexInterval in interface ListSelectionModelpublic boolean isSelectedIndex(int index)
isSelectedIndex in interface ListSelectionModelpublic boolean isSelectionEmpty()
isSelectionEmpty in interface ListSelectionModel
public void removeIndexInterval(int index0,
int index1)
removeIndexInterval in interface ListSelectionModel
public void removeSelectionInterval(int index0,
int index1)
removeSelectionInterval in interface ListSelectionModel
public void setSelectionInterval(int index0,
int index1)
setSelectionInterval in interface ListSelectionModel
protected void fireValueChanged(int index0,
int index1)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||