T - the type of the paginationpublic abstract class BasePagination<T extends BasePagination<T>> extends BaseDominoElement<elemental2.dom.HTMLElement,T> implements HasPagination
BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStylerHasPagination.PageChangedCallBack| Modifier and Type | Field and Description |
|---|---|
protected DominoElement<? extends elemental2.dom.HTMLElement> |
activePage |
protected List<DominoElement<? extends elemental2.dom.HTMLElement>> |
allPages |
protected DominoElement<elemental2.dom.HTMLElement> |
element |
protected int |
index |
protected boolean |
markActivePage |
protected DominoElement<? extends elemental2.dom.HTMLElement> |
nextElement |
protected HasPagination.PageChangedCallBack |
pageChangedCallBack |
protected int |
pagesCount |
protected DominoElement<elemental2.dom.HTMLUListElement> |
pagesElement |
protected int |
pageSize |
protected DominoElement<? extends elemental2.dom.HTMLElement> |
prevElement |
protected String |
size |
protected int |
totalCount |
| Constructor and Description |
|---|
BasePagination() |
| Modifier and Type | Method and Description |
|---|---|
int |
activePage() |
elemental2.dom.HTMLElement |
element() |
int |
getPagesCount() |
int |
getPageSize() |
int |
getTotalCount() |
T |
gotoFirst()
Go to the first page
|
T |
gotoFirst(boolean silent)
Go to the first page with boolean for notifying listeners or not
|
T |
gotoLast()
Go to the last page
|
T |
gotoLast(boolean silent)
Go to the last page with boolean for notifying listeners or not
|
T |
gotoPage(int page)
Go to a specific page number
|
T |
gotoPage(int page,
boolean silent)
Go to a specific page number with boolean for notifying listeners or not
|
T |
large()
Sets the size to large
|
T |
markActivePage()
Marks the current page as active
|
protected abstract void |
moveToPage(int page,
boolean silent) |
T |
nextPage()
Go to the next page of the current page
|
T |
nextPage(boolean silent)
Go to the next page of the current page with boolean for notifying listeners or not
|
T |
onPageChanged(HasPagination.PageChangedCallBack pageChangedCallBack)
Adds listener that will be called when a page is changed
|
T |
previousPage()
Go to the previous page of the current page
|
T |
previousPage(boolean silent)
Go to the previous page of the current page with boolean for notifying listeners or not
|
T |
setMarkActivePage(boolean markActivePage)
A boolean to mark the active page automatically
|
T |
setPageSize(int pageSize)
Sets the page size
|
T |
small()
Sets the size to small
|
HasPagination |
updatePages(int pages)
Updates the number of pages for this pagination
|
HasPagination |
updatePages(int pages,
int pageSize)
Updates the number of pages and the page size for this pagination
|
HasPagination |
updatePagesByTotalCount(int totalCount)
Updates the number of pages by providing the total number of items, the calculation will be
based on the page size
|
HasPagination |
updatePagesByTotalCount(int totalCount,
boolean silent)
Updates the number of pages by providing the total number of items, the calculation will be
based on the page size
|
HasPagination |
updatePagesByTotalCount(int totalCount,
int pageSize)
Updates the number of pages by providing the total number of items and the page size
|
HasPagination |
updatePagesByTotalCount(int totalCount,
int pageSize,
boolean silent)
Updates the number of pages by providing the total number of items and the page size
|
add, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, disable, elevate, elevate, enable, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isDisabled, isEmptyElement, isEqualNode, isForceHidden, isHidden, isReadOnly, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setReadOnly, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdatePages, updatePagesisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertyprotected DominoElement<elemental2.dom.HTMLUListElement> pagesElement
protected DominoElement<elemental2.dom.HTMLElement> element
protected DominoElement<? extends elemental2.dom.HTMLElement> activePage
protected DominoElement<? extends elemental2.dom.HTMLElement> prevElement
protected DominoElement<? extends elemental2.dom.HTMLElement> nextElement
protected List<DominoElement<? extends elemental2.dom.HTMLElement>> allPages
protected HasPagination.PageChangedCallBack pageChangedCallBack
protected String size
protected int index
protected boolean markActivePage
protected int pagesCount
protected int pageSize
protected int totalCount
public HasPagination updatePagesByTotalCount(int totalCount)
updatePagesByTotalCount in interface HasPaginationtotalCount - the total number of itemspublic HasPagination updatePagesByTotalCount(int totalCount, boolean silent)
updatePagesByTotalCount in interface HasPaginationtotalCount - the total number of itemssilent - boolean flag to switch triggering the callback on/off for this callpublic HasPagination updatePagesByTotalCount(int totalCount, int pageSize)
updatePagesByTotalCount in interface HasPaginationtotalCount - the total number of itemspageSize - the new page sizepublic HasPagination updatePagesByTotalCount(int totalCount, int pageSize, boolean silent)
updatePagesByTotalCount in interface HasPaginationtotalCount - the total number of itemspageSize - the new page sizesilent - boolean flag to switch triggering the callback on/off for this callpublic HasPagination updatePages(int pages)
HasPaginationupdatePages in interface HasPaginationpages - the new number of pagespublic HasPagination updatePages(int pages, int pageSize)
HasPaginationupdatePages in interface HasPaginationpages - the new number of pagespageSize - the new page sizepublic T gotoPage(int page)
gotoPage in interface HasPaginationpage - the number of the pagepublic T gotoPage(int page, boolean silent)
gotoPage in interface HasPaginationpage - the number of the pagesilent - true to not notifying listenerspublic T nextPage()
nextPage in interface HasPaginationpublic T previousPage()
previousPage in interface HasPaginationpublic T nextPage(boolean silent)
nextPage in interface HasPaginationsilent - true to not notifying listenerspublic T previousPage(boolean silent)
previousPage in interface HasPaginationsilent - true to not notifying listenerspublic T gotoFirst()
gotoFirst in interface HasPaginationpublic T gotoLast()
gotoLast in interface HasPaginationpublic T gotoFirst(boolean silent)
gotoFirst in interface HasPaginationsilent - true to not notifying listenerspublic T gotoLast(boolean silent)
gotoLast in interface HasPaginationsilent - true to not notifying listenerspublic T markActivePage()
markActivePage in interface HasPaginationpublic T setMarkActivePage(boolean markActivePage)
markActivePage - true to mark the active page automatically, false otherwisepublic T onPageChanged(HasPagination.PageChangedCallBack pageChangedCallBack)
onPageChanged in interface HasPaginationpageChangedCallBack - A HasPagination.PageChangedCallBackpublic T large()
public T small()
public int getTotalCount()
getTotalCount in interface HasPaginationpublic T setPageSize(int pageSize)
setPageSize in interface HasPaginationpageSize - the page sizepublic int getPageSize()
getPageSize in interface HasPaginationpublic int activePage()
activePage in interface HasPaginationpublic int getPagesCount()
getPagesCount in interface HasPaginationprotected abstract void moveToPage(int page,
boolean silent)
public elemental2.dom.HTMLElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>element in class BaseDominoElement<elemental2.dom.HTMLElement,T extends BasePagination<T>>Copyright © 2019–2022 Dominokit. All rights reserved.