public class BindingListModelListModel<E> extends java.lang.Object implements BindingListModel<E>, Selectable<E>, java.io.Serializable, BindingListModelExt<E>
This is the BindingListModel
as a ListModel
to be used with
Listbox
, Grid
,
and DataBinder
.
Add or remove the contents of this model as a ListModel would cause the associated Listbox or Grid to change accordingly.
Modifier and Type | Field and Description |
---|---|
protected ListModel<E> |
_model
Deprecated.
|
Constructor and Description |
---|
BindingListModelListModel(ListModel<E> model)
Deprecated.
|
BindingListModelListModel(ListModel<E> model,
boolean distinct)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addListDataListener(ListDataListener l)
Deprecated.
Adds a listener to the list that's notified each time a change
to the data model occurs.
|
boolean |
addToSelection(E obj)
Deprecated.
Add the specified object into selection.
|
void |
clearSelection()
Deprecated.
Change the selection to the empty set.
|
E |
getElementAt(int index)
Deprecated.
Returns the value at the specified index.
|
ListModel<E> |
getInnerModel()
Deprecated.
|
java.util.Set<E> |
getSelection()
Deprecated.
Returns the current selection.
|
SelectionControl |
getSelectionControl()
Deprecated.
Returns the selection control for the selection model, if any.
|
int |
getSize()
Deprecated.
Returns the length of the list.
|
int[] |
indexesOf(java.lang.Object elm)
Deprecated.
Returns indexes of the given object inside a ListModel.
|
int |
indexOf(java.lang.Object obj)
Deprecated.
Returns index of the given object inside a ListModel.
|
boolean |
isDistinct()
Deprecated.
Returns true if all objects inside this ListModel is distinct.
|
boolean |
isMultiple()
Deprecated.
Returns whether the current selection mode is multiple.
|
boolean |
isSelected(java.lang.Object obj)
Deprecated.
Returns whether an object is selected.
|
boolean |
isSelectionEmpty()
Deprecated.
Returns true if the selection is currently empty.
|
boolean |
removeFromSelection(java.lang.Object obj)
Deprecated.
Remove the specified object from selection.
|
void |
removeListDataListener(ListDataListener l)
Deprecated.
Removes a listener from the list that's notified each time
a change to the data model occurs.
|
void |
setMultiple(boolean multiple)
Deprecated.
Sets the selection mode to be multiple.
|
void |
setSelection(java.util.Collection<? extends E> selection)
Deprecated.
Replace the current selection with the given set.
|
void |
setSelectionControl(SelectionControl ctrl)
Deprecated.
Sets the selection control for the selection model
|
public int indexOf(java.lang.Object obj)
BindingListModel
indexOf
in interface BindingListModel<E>
public E getElementAt(int index)
ListModel
getElementAt
in interface ListModel<E>
public int getSize()
ListModel
public void addListDataListener(ListDataListener l)
ListModel
addListDataListener
in interface ListModel<E>
public void removeListDataListener(ListDataListener l)
ListModel
removeListDataListener
in interface ListModel<E>
public void setSelectionControl(SelectionControl ctrl)
Selectable
setSelectionControl
in interface Selectable<E>
public SelectionControl getSelectionControl()
Selectable
getSelectionControl
in interface Selectable<E>
public java.util.Set<E> getSelection()
Selectable
getSelection
in interface Selectable<E>
public void setSelection(java.util.Collection<? extends E> selection)
Selectable
If this represents a change to the current selection then notify each ListDataListener, including UI.
setSelection
in interface Selectable<E>
public boolean isSelected(java.lang.Object obj)
Selectable
isSelected
in interface Selectable<E>
public boolean isSelectionEmpty()
Selectable
isSelectionEmpty
in interface Selectable<E>
public boolean addToSelection(E obj)
Selectable
If this represents a change to the current selection then notify each ListDataListener, including UI.
addToSelection
in interface Selectable<E>
obj
- the object to be as selection.obj
is not part of the data, or was already selected.public boolean removeFromSelection(java.lang.Object obj)
Selectable
If this represents a change to the current selection then notify each ListDataListener, including UI.
removeFromSelection
in interface Selectable<E>
obj
- the object to be remove from selection.public void clearSelection()
Selectable
If this represents a change to the current selection then notify each ListDataListener, including UI.
clearSelection
in interface Selectable<E>
public void setMultiple(boolean multiple)
Selectable
setMultiple
in interface Selectable<E>
public boolean isMultiple()
Selectable
isMultiple
in interface Selectable<E>
Selectable.setMultiple(boolean)
public int[] indexesOf(java.lang.Object elm)
BindingListModelExt
indexesOf
in interface BindingListModelExt<E>
elm
- the specified objectpublic boolean isDistinct()
BindingListModelExt
DataBinder
performance so there is no need
to scan the whole ListModel as long as find one.isDistinct
in interface BindingListModelExt<E>
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.