org.granite.client.tide.collections.javafx
Class PagedCollection<E>

java.lang.Object
  extended by org.granite.client.tide.collections.AbstractPagedCollection<E>
      extended by org.granite.client.tide.collections.javafx.PagedCollection<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>, javafx.beans.Observable, javafx.collections.ObservableList<E>, TideEventObserver
Direct Known Subclasses:
PagedQuery

public abstract class PagedCollection<E>
extends AbstractPagedCollection<E>
implements javafx.collections.ObservableList<E>

Author:
William DRAI

Nested Class Summary
 class PagedCollection.ListChangeWrapper
           
 class PagedCollection.WrappedListListChangeListener
           
 
Nested classes/interfaces inherited from class org.granite.client.tide.collections.AbstractPagedCollection
AbstractPagedCollection.PagedCollectionIterator, AbstractPagedCollection.PagedCollectionResponder
 
Field Summary
protected  javafx.collections.ObservableList<E> wrappedList
           
 
Fields inherited from class org.granite.client.tide.collections.AbstractPagedCollection
count, filterRefresh, first, fullRefresh, initializing, last, max
 
Constructor Summary
PagedCollection()
           
 
Method Summary
 boolean add(E e)
           
 void add(int index, E element)
           
 boolean addAll(Collection<? extends E> c)
           
 boolean addAll(E... arg0)
           
 boolean addAll(int index, Collection<? extends E> c)
           
 void addListener(javafx.beans.InvalidationListener listener)
           
 void addListener(javafx.collections.ListChangeListener<? super E> listener)
           
 void addListener(PageChangeListener<E> listener)
           
 void clear()
          Clear collection content
 void fireItemsUpdated(int from, int to)
           
 void firePageChange(TideRpcEvent event)
          Notify listeners of remote page result
protected  List<E> getInternalWrappedList()
           
protected  List<E> getWrappedList()
           
 E remove(int index)
           
 void remove(int arg0, int arg1)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean removeAll(E... arg0)
           
 void removeListener(javafx.beans.InvalidationListener listener)
           
 void removeListener(javafx.collections.ListChangeListener<? super E> listener)
           
 void removeListener(PageChangeListener<E> listener)
           
 boolean retainAll(Collection<?> c)
           
 boolean retainAll(E... arg0)
           
 E set(int index, E element)
           
 boolean setAll(Collection<? extends E> coll)
           
 boolean setAll(E... arg0)
           
 List<E> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class org.granite.client.tide.collections.AbstractPagedCollection
contains, containsAll, find, findFault, findResult, fullRefresh, get, getResult, handleEvent, handleFault, handleResult, indexOf, initialize, isEmpty, iterator, lastIndexOf, listIterator, listIterator, refresh, setElementClass, setMaxResults, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size
 

Field Detail

wrappedList

protected javafx.collections.ObservableList<E> wrappedList
Constructor Detail

PagedCollection

public PagedCollection()
Method Detail

getInternalWrappedList

protected List<E> getInternalWrappedList()
Specified by:
getInternalWrappedList in class AbstractPagedCollection<E>

getWrappedList

protected List<E> getWrappedList()
Specified by:
getWrappedList in class AbstractPagedCollection<E>

setAll

public boolean setAll(Collection<? extends E> coll)
Specified by:
setAll in interface javafx.collections.ObservableList<E>

clear

@PreDestroy
public void clear()
Description copied from class: AbstractPagedCollection
Clear collection content

Specified by:
clear in interface Collection<E>
Specified by:
clear in interface List<E>
Overrides:
clear in class AbstractPagedCollection<E>

addListener

public void addListener(javafx.collections.ListChangeListener<? super E> listener)
Specified by:
addListener in interface javafx.collections.ObservableList<E>

removeListener

public void removeListener(javafx.collections.ListChangeListener<? super E> listener)
Specified by:
removeListener in interface javafx.collections.ObservableList<E>

addListener

public void addListener(javafx.beans.InvalidationListener listener)
Specified by:
addListener in interface javafx.beans.Observable

removeListener

public void removeListener(javafx.beans.InvalidationListener listener)
Specified by:
removeListener in interface javafx.beans.Observable

addListener

public void addListener(PageChangeListener<E> listener)

removeListener

public void removeListener(PageChangeListener<E> listener)

firePageChange

public void firePageChange(TideRpcEvent event)
Description copied from class: AbstractPagedCollection
Notify listeners of remote page result

Specified by:
firePageChange in class AbstractPagedCollection<E>
Parameters:
event - the remote event (ResultEvent or FaultEvent)

fireItemsUpdated

public void fireItemsUpdated(int from,
                             int to)

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>

add

public boolean add(E e)
Specified by:
add in interface Collection<E>
Specified by:
add in interface List<E>
Overrides:
add in class AbstractPagedCollection<E>

add

public void add(int index,
                E element)
Specified by:
add in interface List<E>
Overrides:
add in class AbstractPagedCollection<E>

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface List<E>
Overrides:
addAll in class AbstractPagedCollection<E>

addAll

public boolean addAll(int index,
                      Collection<? extends E> c)
Specified by:
addAll in interface List<E>
Overrides:
addAll in class AbstractPagedCollection<E>

addAll

public boolean addAll(E... arg0)
Specified by:
addAll in interface javafx.collections.ObservableList<E>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<E>
Specified by:
remove in interface List<E>
Overrides:
remove in class AbstractPagedCollection<E>

remove

public E remove(int index)
Specified by:
remove in interface List<E>
Overrides:
remove in class AbstractPagedCollection<E>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>
Specified by:
removeAll in interface List<E>
Overrides:
removeAll in class AbstractPagedCollection<E>

remove

public void remove(int arg0,
                   int arg1)
Specified by:
remove in interface javafx.collections.ObservableList<E>

removeAll

public boolean removeAll(E... arg0)
Specified by:
removeAll in interface javafx.collections.ObservableList<E>

retainAll

public boolean retainAll(E... arg0)
Specified by:
retainAll in interface javafx.collections.ObservableList<E>

setAll

public boolean setAll(E... arg0)
Specified by:
setAll in interface javafx.collections.ObservableList<E>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<E>
Specified by:
retainAll in interface List<E>
Overrides:
retainAll in class AbstractPagedCollection<E>

set

public E set(int index,
             E element)
Specified by:
set in interface List<E>
Overrides:
set in class AbstractPagedCollection<E>

subList

public List<E> subList(int fromIndex,
                       int toIndex)
Specified by:
subList in interface List<E>
Overrides:
subList in class AbstractPagedCollection<E>