public class ListModelArrayProxy<E> extends ListModelArray<E> implements javassist.util.proxy.Proxy, FormProxyObject, java.io.Serializable
AbstractListModel.DefaultSelectionControl<E>_array_selectionINTERNAL_EVENT| Constructor and Description |
|---|
ListModelArrayProxy(ListModelArray<E> origin,
java.lang.annotation.Annotation[] callerAnnots) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListDataListener(ListDataListener l)
Adds a listener to the list that's notified each time a change
to the data model occurs.
|
void |
addPagingEventListener(PagingListener l)
Adds a listener to the list of listeners to be notified when a PagingEvent
happens outside of standard Paging component
|
void |
addSelection(E obj) |
boolean |
addToSelection(E obj)
Add the specified object into selection.
|
void |
cacheSavePropertyBinding(java.lang.String property,
SavePropertyBinding s)
Cache save property binding by property string
|
void |
clearSelection()
Change the selection to the empty set.
|
java.lang.Object |
clone() |
java.util.Set<Pair<java.lang.String,SavePropertyBinding>> |
collectCachedSavePropertyBinding()
Collect all of collect cached save property bindings
|
protected <T> T |
createProxyObject(T t) |
boolean |
equals(java.lang.Object o) |
protected void |
fireSelectionEvent(E e)
Selectable's implementor use only.
|
E |
get(int index)
Get the value of this ListModelArray at specified index.
|
int |
getActivePage()
Returns the active page (starting from 0).
|
E |
getElementAt(int j)
Returns the value at the specified index.
|
java.lang.Object[] |
getInnerArray()
Get the inner real Object[].
|
ListModelArray<E> |
getOriginObject()
Returns the origin object.
|
int |
getPageCount()
Returns the number of pages.
|
int |
getPageSize()
Returns the number of items per page.
|
java.util.Set<E> |
getSelection()
Returns the current selection.
|
SelectionControl |
getSelectionControl()
Returns the selection control for the selection model, if any.
|
int |
getSize()
Returns the length of the list.
|
java.lang.String |
getSortDirection(java.util.Comparator<E> cmpr)
Returns the sort direction of this model for the given comparator.
|
int |
hashCode() |
int |
indexOf(java.lang.Object elm)
Returns the index of the specified element.
|
boolean |
isFormDirty()
Returns whether the form proxy object is dirty or not, including all
of its attributes.
|
boolean |
isSelected(java.lang.Object obj)
Returns whether an object is selected.
|
boolean |
isSelectionEmpty()
Returns true if the selection is currently empty.
|
boolean |
notifyChange(E element)
Notifies a change of the same element to trigger an event of
ListDataEvent.CONTENTS_CHANGED. |
void |
onDataChange(java.lang.Object o) |
void |
onDirtyChange() |
boolean |
removeFromSelection(java.lang.Object obj)
Remove the specified object from selection.
|
void |
removeListDataListener(ListDataListener l)
Removes a listener from the list that's notified each time
a change to the data model occurs.
|
void |
removePagingEventListener(PagingListener l)
Removes a listener from the list of listeners to be notified when a PagingEvent
happens outside of standard Paging component
|
void |
removeSelection(java.lang.Object obj) |
void |
resetFromOrigin()
Resets all of the changes of this form from the origin object.
|
void |
set(int index,
E value)
Change content of the Array at specified index.
|
void |
setActivePage(int pg)
Sets the active page (starting from 0).
|
protected void |
setDirty(boolean d) |
void |
setFormOwner(java.lang.Object owner,
FormBinding binding)
Sets the owner of this form with its binding.
|
void |
setHandler(javassist.util.proxy.MethodHandler mi) |
void |
setMultiple(boolean multiple)
Sets the selection mode to be multiple.
|
void |
setPageSize(int size)
Sets the number of items per page.
|
void |
setPath(java.lang.String property,
ProxyNode parent)
Set the property of current form proxy object and it's creator
|
void |
setSelection(java.util.Collection<? extends E> selection)
Replace the current selection with the given set.
|
void |
setSelectionControl(SelectionControl ctrl)
Sets the selection control for the selection model
|
void |
sort()
Sort the data model by default or assigned comparator.
|
void |
sort(java.util.Comparator<E> cmpr,
boolean ascending)
Sorts the data.
|
void |
submitToOrigin(BindContext ctx)
Saves all of the changes of this form to the origin object.
|
protected static boolean |
testEquals(java.lang.Object e,
java.lang.Object o) |
java.lang.String |
toString() |
fireEvent, isMultiple, newEmptySelection, readSelection, removeAllSelection, retainAllSelection, writeSelectionpublic ListModelArrayProxy(ListModelArray<E> origin, java.lang.annotation.Annotation[] callerAnnots)
public void onDirtyChange()
public void onDataChange(java.lang.Object o)
protected void setDirty(boolean d)
public void addListDataListener(ListDataListener l)
AbstractListModeladdListDataListener in interface ListModel<E>addListDataListener in class AbstractListModel<E>public void removeListDataListener(ListDataListener l)
AbstractListModelremoveListDataListener in interface ListModel<E>removeListDataListener in class AbstractListModel<E>public java.util.Set<E> getSelection()
AbstractListModelgetSelection in interface Selectable<E>getSelection in class AbstractListModel<E>public void setSelection(java.util.Collection<? extends E> selection)
AbstractListModelIf this represents a change to the current selection then notify each ListDataListener, including UI.
setSelection in interface Selectable<E>setSelection in class AbstractListModel<E>public boolean isSelected(java.lang.Object obj)
AbstractListModelisSelected in interface Selectable<E>isSelected in class AbstractListModel<E>public boolean isSelectionEmpty()
AbstractListModelisSelectionEmpty in interface Selectable<E>isSelectionEmpty in class AbstractListModel<E>public boolean addToSelection(E obj)
AbstractListModelIf this represents a change to the current selection then notify each ListDataListener, including UI.
addToSelection in interface Selectable<E>addToSelection in class AbstractListModel<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)
AbstractListModelIf this represents a change to the current selection then notify each ListDataListener, including UI.
removeFromSelection in interface Selectable<E>removeFromSelection in class AbstractListModel<E>obj - the object to be remove from selection.public void clearSelection()
AbstractListModelIf this represents a change to the current selection then notify each ListDataListener, including UI.
clearSelection in interface Selectable<E>clearSelection in class AbstractListModel<E>public void setMultiple(boolean multiple)
AbstractListModelsetMultiple in interface Selectable<E>setMultiple in class AbstractListModel<E>public int getPageSize()
PageableDefault: 20.
getPageSize in interface PageablegetPageSize in class AbstractListModel<E>public void setPageSize(int size)
throws WrongValueException
PageablesetPageSize in interface PageablesetPageSize in class AbstractListModel<E>WrongValueExceptionpublic int getPageCount()
PageablegetPageCount in interface PageablegetPageCount in class AbstractListModel<E>public int getActivePage()
PageablegetActivePage in interface PageablegetActivePage in class AbstractListModel<E>public void setActivePage(int pg)
throws WrongValueException
PageablesetActivePage in interface PageablesetActivePage in class AbstractListModel<E>WrongValueExceptionpublic void setSelectionControl(SelectionControl ctrl)
SelectablesetSelectionControl in interface Selectable<E>setSelectionControl in class AbstractListModel<E>public SelectionControl getSelectionControl()
SelectablegetSelectionControl in interface Selectable<E>getSelectionControl in class AbstractListModel<E>public void addPagingEventListener(PagingListener l)
PageableModeladdPagingEventListener in interface PageableModeladdPagingEventListener in class AbstractListModel<E>public void removePagingEventListener(PagingListener l)
PageableModelremovePagingEventListener in interface PageableModelremovePagingEventListener in class AbstractListModel<E>public E get(int index)
ListModelArrayget in class ListModelArray<E>index - the array index to be get value.public void set(int index,
E value)
ListModelArrayset in class ListModelArray<E>index - the array index to be set the new value.public java.lang.Object[] getInnerArray()
ListModelArraygetInnerArray in class ListModelArray<E>public int indexOf(java.lang.Object elm)
ListModelArrayindexOf in class ListModelArray<E>public boolean notifyChange(E element)
ListModelArrayListDataEvent.CONTENTS_CHANGED.notifyChange in class ListModelArray<E>public int getSize()
ListModelpublic E getElementAt(int j)
ListModelgetElementAt in interface ListModel<E>getElementAt in class ListModelArray<E>public void sort(java.util.Comparator<E> cmpr, boolean ascending)
ListModelArraypublic void sort()
Sortablesort in interface Sortable<E>sort in class ListModelArray<E>Sortable.sort(Comparator, boolean)public java.lang.String getSortDirection(java.util.Comparator<E> cmpr)
SortableDefault: "natural".
getSortDirection in interface Sortable<E>getSortDirection in class ListModelArray<E>public boolean equals(java.lang.Object o)
equals in class ListModelArray<E>public int hashCode()
hashCode in class ListModelArray<E>public java.lang.String toString()
toString in class ListModelArray<E>public java.lang.Object clone()
clone in class ListModelArray<E>protected void fireSelectionEvent(E e)
AbstractListModel Fires a selection event for component to scroll into view. The override
subclass must put the index0 of AbstractListModel.fireEvent(int, int, int) as
the view index to scroll. By default, the value -1 is assumed which means
no scroll into view.
The method is invoked when both methods are invoked. AbstractListModel.addToSelection(Object)
and AbstractListModel.setSelection(Collection).
fireSelectionEvent in class ListModelArray<E>e - selected object.public void addSelection(E obj)
addSelection in class ListModelArray<E>public void removeSelection(java.lang.Object obj)
removeSelection in class ListModelArray<E>public void setHandler(javassist.util.proxy.MethodHandler mi)
setHandler in interface javassist.util.proxy.Proxypublic ListModelArray<E> getOriginObject()
FormProxyObjectgetOriginObject in interface FormProxyObjectpublic void resetFromOrigin()
FormProxyObjectresetFromOrigin in interface FormProxyObjectpublic void submitToOrigin(BindContext ctx)
FormProxyObjectsubmitToOrigin in interface FormProxyObjectpublic boolean isFormDirty()
FormProxyObjectisFormDirty in interface FormProxyObjectpublic void setFormOwner(java.lang.Object owner,
FormBinding binding)
FormProxyObjectsetFormOwner in interface FormProxyObjectowner - the object associated with this form.public void setPath(java.lang.String property,
ProxyNode parent)
FormProxyObjectsetPath in interface FormProxyObjectproperty - p the propertyparent - parent the parent proxy nodepublic void cacheSavePropertyBinding(java.lang.String property,
SavePropertyBinding s)
FormProxyObjectcacheSavePropertyBinding in interface FormProxyObjectproperty - the property of save property bindings - the save property bindingpublic java.util.Set<Pair<java.lang.String,SavePropertyBinding>> collectCachedSavePropertyBinding()
FormProxyObjectcollectCachedSavePropertyBinding in interface FormProxyObjectprotected static boolean testEquals(java.lang.Object e,
java.lang.Object o)
protected <T> T createProxyObject(T t)
Copyright © 2005-2024 Potix Corporation. All Rights Reserved.