|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
V - The type of values contained in the model.public interface ListSelectModel<V>
A model for selecting one or more values from a list.
The model must be thread-safe, synchronized on itself. Any iteration over values should include synchronization on the instance of this interface.
When the selection is changed, a ListSelectionEvent is fired.
When the state of a value (besides its selection, such as its enabled status) changes, a GenericPropertyChangeEvent event is fired referencing the value the state of which has changed.
| Field Summary |
|---|
| Fields inherited from interface com.guiseframework.model.ValueModel |
|---|
VALIDATOR_PROPERTY, VALUE_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Method Summary | |
|---|---|
void |
addListListener(ListListener<V> listListener)
Adds a list listener. |
void |
addListSelectionListener(ListSelectionListener<V> selectionListener)
Adds a list selection listener. |
void |
addSelectedIndexes(int... indexes)
Adds a selection at the given indices. |
int |
getSelectedIndex()
Determines the selected index. |
int[] |
getSelectedIndexes()
Determines the selected indices. |
ListSelectionPolicy<V> |
getSelectionPolicy()
|
boolean |
isIndexDisplayed(int index)
Determines the displayed status of a given index. |
boolean |
isIndexEnabled(int index)
Determines the enabled status of a given index. |
boolean |
isValueDisplayed(V value)
Determines the displayed status of the first occurrence of a given value. |
boolean |
isValueEnabled(V value)
Determines the enabled status of the first occurrence of a given value. |
void |
removeListListener(ListListener<V> listListener)
Removes a list listener. |
void |
removeListSelectionListener(ListSelectionListener<V> selectionListener)
Removes a list selection listener. |
void |
removeSelectedIndexes(int... indexes)
Removes a selection at the given indices. |
void |
setIndexDisplayed(int index,
boolean newDisplayed)
Sets the displayed status of a given index. |
void |
setIndexEnabled(int index,
boolean newEnabled)
Sets the enabled status of a given index. |
void |
setSelectedIndexes(int... indexes)
Sets the selected indices. |
void |
setValueDisplayed(V value,
boolean newDisplayed)
Sets the displayed status of the first occurrence of a given value. |
void |
setValueEnabled(V value,
boolean newEnabled)
Sets the enabled status of the first occurrence of a given value. |
| Methods inherited from interface com.guiseframework.model.SelectModel |
|---|
getSelectedValue, getSelectedValues, replace, setSelectedValues |
| Methods inherited from interface com.guiseframework.model.ValueModel |
|---|
clearValue, getDefaultValue, getValidator, getValue, getValueClass, isValidValue, resetValue, setValidator, setValue, validateValue |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from interface java.util.List |
|---|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
| Method Detail |
|---|
ListSelectionPolicy<V> getSelectionPolicy()
int getSelectedIndex()
SelectModel.getSelectedValue()int[] getSelectedIndexes()
SelectModel.getSelectedValues()
void setSelectedIndexes(int... indexes)
throws java.beans.PropertyVetoException
Throwable.getCause().
indexes - The indices to select.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.ListSelectionPolicy.getSetSelectedIndices(ListSelectModel, int[]),
#setSelectedValues(V[]),
addSelectedIndexes(int...)
void addSelectedIndexes(int... indexes)
throws java.beans.PropertyVetoException
Throwable.getCause().
indexes - The indices to add to the selection.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.ListSelectionPolicy.getAddSelectedIndices(ListSelectModel, int[]),
setSelectedIndexes(int[])
void removeSelectedIndexes(int... indexes)
throws java.beans.PropertyVetoException
Throwable.getCause().
indexes - The indices to remove from the selection.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.ListSelectionPolicy.getRemoveSelectedIndices(ListSelectModel, int[]),
setSelectedIndexes(int[])boolean isValueDisplayed(V value)
value - The value for which the displayed status is to be determined.
true if the value is displayed, else false.
java.lang.IndexOutOfBoundsException - if the given value does not occur in the model.
void setValueDisplayed(V value,
boolean newDisplayed)
value - The value to display.newDisplayed - Whether the value should be displayed.#DISPLAYED_PROPERTYboolean isIndexDisplayed(int index)
index - The index of the value for which the displayed status is to be determined.
true if the value at the given index is displayed, else false.
void setIndexDisplayed(int index,
boolean newDisplayed)
index - The index of the value to display.newDisplayed - Whether the value at the given index should be displayed.
java.lang.IndexOutOfBoundsException - if the given index is not within the range of the list.#DISPLAYED_PROPERTYboolean isValueEnabled(V value)
value - The value for which the enabled status is to be determined.
true if the value is enabled, else false.
java.lang.IndexOutOfBoundsException - if the given value does not occur in the model.
void setValueEnabled(V value,
boolean newEnabled)
value - The value to enable or disable.newEnabled - Whether the value should be enabled.#ENABLED_PROPERTYboolean isIndexEnabled(int index)
index - The index of the value for which the enabled status is to be determined.
true if the value at the given index is enabled, else false.
void setIndexEnabled(int index,
boolean newEnabled)
index - The index of the value to enable or disable.newEnabled - Whether the value at the given index should be enabled.
java.lang.IndexOutOfBoundsException - if the given index is not within the range of the list.#ENABLED_PROPERTYvoid addListListener(ListListener<V> listListener)
addListListener in interface ListListenable<V>listListener - The list listener to add.void removeListListener(ListListener<V> listListener)
removeListListener in interface ListListenable<V>listListener - The list listener to remove.void addListSelectionListener(ListSelectionListener<V> selectionListener)
selectionListener - The selection listener to add.void removeListSelectionListener(ListSelectionListener<V> selectionListener)
selectionListener - The selection listener to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||