|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.TriStateCheckBoxListSelectionModel
public class TriStateCheckBoxListSelectionModel
Default data model for TriStateCheckBoxList selections. Instead of setting a new selection no matter what their currently selected state is as in regular listboxes, new selections have their values incremented in the selection list based on their current selection state and whether cycling is enabled.
TriStateCheckBoxList
,
Serialized FormField Summary | |
---|---|
protected boolean |
cycleEnabled
Whether the checkBox cycles through all three values |
protected boolean |
updateEnabled
Used internally to signal when values can be updated. |
Fields inherited from class com.sas.swing.visuals.CheckBoxListSelectionModel |
---|
isAdjusting, RB_KEY, selectionMode |
Constructor Summary | |
---|---|
TriStateCheckBoxListSelectionModel()
|
Method Summary | |
---|---|
void |
addMixedSelectionInterval(int index0,
int index1)
Sets all of the values to MIXED for all indices within range. |
void |
addSelectionInterval(int index0,
int index1)
Sets all of the values to ON for all indices within range. |
void |
clearSelection()
Sets all of the values to OFF for all indices. |
int |
getSelectedIndexValue(int index)
Returns the value at the given index. |
void |
insertIndexInterval(int index,
int length,
boolean before)
Insert length indices beginning before/after index. |
boolean |
isCycleEnabled()
Returns whether the checkbox cycles through all three values. |
boolean |
isUpdateEnabled()
Used internally to return whether values can be updated. |
void |
removeIndexInterval(int index0,
int index1)
Remove the indices in the interval index0,index1 (inclusive) from the selection model. |
void |
removeSelectionInterval(int index0,
int index1)
Sets all of the values to OFF for all indices within range. |
void |
setCycleEnabled(boolean b)
Sets whether each checkBox in the list should cycle through all three values. |
protected void |
setMixedState(int index,
boolean state)
Sets the given index to the given mixed state. |
void |
setSelectedIndexValue(int index,
int value)
Sets the given index to the given value. |
protected void |
setSelectedState(int index,
boolean state)
Sets the given index to the given selected state. |
void |
setSelectionInterval(int index0,
int index1)
Increments the values of all indices within the range if update is enabled. |
protected void |
setStates(int index,
boolean mixedState,
boolean selectedState)
Sets the given index to the given mixed and selected state. |
void |
setUpdateEnabled(boolean b)
Used internally to set whether values can be updated. |
Methods inherited from class com.sas.swing.visuals.CheckBoxListSelectionModel |
---|
getValueIsAdjusting, setSelectionMode, setValueIsAdjusting |
Field Detail |
---|
protected boolean cycleEnabled
protected boolean updateEnabled
Constructor Detail |
---|
public TriStateCheckBoxListSelectionModel()
Method Detail |
---|
public void setSelectedIndexValue(int index, int value)
index
- The index in which to changevalue
- The new value to be setpublic int getSelectedIndexValue(int index)
index
- The index to search on
public void setSelectionInterval(int index0, int index1)
setSelectionInterval
in interface javax.swing.ListSelectionModel
setSelectionInterval
in class CheckBoxListSelectionModel
index0
- The beginning indexindex1
- The ending indexpublic void addMixedSelectionInterval(int index0, int index1)
index0
- The beginning indexindex1
- The ending indexpublic void addSelectionInterval(int index0, int index1)
addSelectionInterval
in interface javax.swing.ListSelectionModel
addSelectionInterval
in class javax.swing.DefaultListSelectionModel
index0
- The beginning indexindex1
- The ending indexpublic void removeSelectionInterval(int index0, int index1)
removeSelectionInterval
in interface javax.swing.ListSelectionModel
removeSelectionInterval
in class javax.swing.DefaultListSelectionModel
index0
- The beginning indexindex1
- The ending indexpublic void clearSelection()
clearSelection
in interface javax.swing.ListSelectionModel
clearSelection
in class javax.swing.DefaultListSelectionModel
public void insertIndexInterval(int index, int length, boolean before)
insertIndexInterval
in interface javax.swing.ListSelectionModel
insertIndexInterval
in class javax.swing.DefaultListSelectionModel
public void removeIndexInterval(int index0, int index1)
removeIndexInterval
in interface javax.swing.ListSelectionModel
removeIndexInterval
in class javax.swing.DefaultListSelectionModel
protected void setStates(int index, boolean mixedState, boolean selectedState)
protected void setMixedState(int index, boolean state)
protected void setSelectedState(int index, boolean state)
public void setCycleEnabled(boolean b)
b
- if true, the checkBox cycles,
or else the checkBox switches between ON and OFF once those values
have been reached.public boolean isCycleEnabled()
public void setUpdateEnabled(boolean b)
public boolean isUpdateEnabled()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |