|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uic.widgets.UICListSelectionModel
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 | |
UICListSelectionModel()
|
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()
|
int |
getMinSelectionIndex()
|
int |
getSelectionMode()
|
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 UICListSelectionModel()
Method Detail |
public void addListSelectionListener(ListSelectionListener listener)
addListSelectionListener
in interface ListSelectionModel
public void removeListSelectionListener(ListSelectionListener listener)
removeListSelectionListener
in interface ListSelectionModel
public void addSelectionInterval(int index0, int index1)
addSelectionInterval
in interface ListSelectionModel
public void clearSelection()
clearSelection
in interface ListSelectionModel
public int getAnchorSelectionIndex()
getAnchorSelectionIndex
in interface ListSelectionModel
public int getLeadSelectionIndex()
getLeadSelectionIndex
in interface ListSelectionModel
public void setAnchorSelectionIndex(int index)
setAnchorSelectionIndex
in interface ListSelectionModel
public void setLeadSelectionIndex(int index)
setLeadSelectionIndex
in interface ListSelectionModel
public int getMinSelectionIndex()
getMinSelectionIndex
in interface ListSelectionModel
public int getMaxSelectionIndex()
getMaxSelectionIndex
in interface ListSelectionModel
public int getSelectionMode()
getSelectionMode
in interface ListSelectionModel
public void setSelectionMode(int selectionMode)
setSelectionMode
in interface ListSelectionModel
public boolean getValueIsAdjusting()
getValueIsAdjusting
in interface ListSelectionModel
public void setValueIsAdjusting(boolean valueIsAdjusting)
setValueIsAdjusting
in interface ListSelectionModel
public void insertIndexInterval(int index, int length, boolean before)
insertIndexInterval
in interface ListSelectionModel
public boolean isSelectedIndex(int index)
isSelectedIndex
in interface ListSelectionModel
public 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 |