it.amattioli.applicate.browsing
Class PagedListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
java.lang.Object
it.amattioli.applicate.browsing.ListBrowserImpl<I,T>
it.amattioli.applicate.browsing.PagedListBrowserImpl<I,T>
- All Implemented Interfaces:
- Browser<I,T>, ListBrowser<I,T>, PagedListBrowser<I,T>, CommandListener, Selector<T>, it.amattioli.dominate.util.PropertyChangeEmitter, EventListener
public class PagedListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
- extends ListBrowserImpl<I,T>
- implements PagedListBrowser<I,T>
| Methods inherited from class it.amattioli.applicate.browsing.ListBrowserImpl |
addCommandListener, addCommandListener, addContentChangeListener, addOrder, addOrder, addPropertyChangeListener, addSelectionListener, commandDone, createFor, createFor, deselect, fillCollection, fireCommandEvent, fireContentChange, firePropertyChange, getFilter, getOrderProperty, getRepository, getReverseOrder, getSelectedIndex, getSelectedObject, getSelectedObjectBrowser, getSpecification, isEmptyList, isValidContent, isValidSelectionIndex, newObjectBrowser, refreshContent, refreshObject, release, removeContentChangeListener, removePropertyChangeListener, removeSelectionListener, select, select, setOrder, setOrder, setRepository, setSpecification, toString, useObjectBrowserClass, validateContent |
| Methods inherited from interface it.amattioli.applicate.browsing.ListBrowser |
addOrder, addPropertyChangeListener, deselect, fillCollection, getFilter, getOrderProperty, getReverseOrder, getSelectedIndex, getSelectedObjectBrowser, getSpecification, newObjectBrowser, removePropertyChangeListener, select, setOrder, setOrder, setSpecification, useObjectBrowserClass |
currPage
protected int currPage
PagedListBrowserImpl
public PagedListBrowserImpl()
PagedListBrowserImpl
public PagedListBrowserImpl(it.amattioli.dominate.Repository<I,T> repository)
findSelectedInPage
protected void findSelectedInPage()
firstPage
public void firstPage()
getList
public List<T> getList()
- Description copied from interface:
ListBrowser
- Retrieves the list of the browsing objects. This list will be the content of
the repository on which this browser is based, filtered using the criteria
specified by
setCriteria.
The list will be sorted using the property specified by setOrder.
If something causes the changing of the list of browsing objects a PropertyChange
event will be fired.
- Specified by:
getList in interface ListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>- Overrides:
getList in class ListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
- Returns:
- the list of the browsing objects
refreshPageLimits
protected void refreshPageLimits()
invalidateContent
protected void invalidateContent()
- Overrides:
invalidateContent in class ListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
nextPage
public void nextPage()
- Specified by:
nextPage in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getHasNextPage
public boolean getHasNextPage()
- Specified by:
getHasNextPage in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
previousPage
public void previousPage()
- Specified by:
previousPage in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getHasPreviousPage
public boolean getHasPreviousPage()
- Specified by:
getHasPreviousPage in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
setPage
public void setPage(int page)
- Specified by:
setPage in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
gotoPage
public void gotoPage(int page)
- Specified by:
gotoPage in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getCurrentPageNumber
public Long getCurrentPageNumber()
- Specified by:
getCurrentPageNumber in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getTotalPages
public Long getTotalPages()
- Specified by:
getTotalPages in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
setPageSize
public void setPageSize(int size)
- Specified by:
setPageSize in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getPageSize
public int getPageSize()
- Specified by:
getPageSize in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
setFilter
public void setFilter(it.amattioli.dominate.Filter filter)
- Description copied from interface:
ListBrowser
- Set the criteria to be used to filter the browsing objects.
The
ListBrowser.getList() method will return only the objects that
satisfy the specified criteria.
The browser will listen on property changes of the filter bean
so to refresh the browsing objects accordingly.
- Specified by:
setFilter in interface ListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>- Overrides:
setFilter in class ListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
- Parameters:
filter - the criteria that will be used to filter the browsing objects
getHasNext
public boolean getHasNext()
- Description copied from interface:
ListBrowser
- Indicate if there is an object next to the currently selected object.
- Specified by:
getHasNext in interface ListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>- Overrides:
getHasNext in class ListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
- Returns:
- true if there is an object next to the currently selected object,
false if the currently selected object is the last in the list
getHasPrevious
public boolean getHasPrevious()
- Description copied from interface:
ListBrowser
- Indicate if there is an object previous to the currently selected object.
- Specified by:
getHasPrevious in interface ListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>- Overrides:
getHasPrevious in class ListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
- Returns:
- true if there is an object previous to the currently selected object,
false if the currently selected object is the first in the list
next
public void next()
- Description copied from interface:
ListBrowser
- Move the selection to the object next to the currently selected object.
If the currently selected object is the last of the list, nothing will happen.
- Specified by:
next in interface ListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>- Overrides:
next in class ListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
previous
public void previous()
- Description copied from interface:
ListBrowser
- Move the selection to the object previous to the currently selected object.
If the currently selected object is the first of the list, nothing will happen.
- Specified by:
previous in interface ListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>- Overrides:
previous in class ListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
select
public void select(int index)
- Description copied from interface:
ListBrowser
- Select an object using its index inside the list retrieved using
ListBrowser.getList().
After the selection a SelectionEvent will be notified to all
the objects that has been registered using
#addContentChangeListener(BrowserSelectionListener).
- Specified by:
select in interface ListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>- Overrides:
select in class ListBrowserImpl<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
- Parameters:
index - the index inside the list retrieved using ListBrowser.getList()
of the object to be selected
getListAll
public List<T> getListAll()
- Specified by:
getListAll in interface PagedListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
Copyright © 2011. All Rights Reserved.