public class Paging extends XulElement implements Paginal
Default getZclass(): z-paging. (since 3.5.0)
| Constructor and Description |
|---|
Paging() |
Paging(int totalsz,
int pagesz)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getActivePage()
Returns the active page (starting from 0).
|
int |
getPageCount()
Returns the number of pages.
|
int |
getPageIncrement()
Returns the number of page anchors shall appear at the client.
|
int |
getPageSize()
Returns the number of items per page.
|
int |
getTotalSize()
Returns the total number of items.
|
String |
getZclass() |
boolean |
isAutohide()
Returns whether to automatically hide this component if
there is only one page available.
|
protected boolean |
isChildable() |
boolean |
isDetailed()
Returns whether to show the detailed info, such as
Paginal.getTotalSize(). |
boolean |
isVisible() |
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Processes an AU request.
|
void |
setActivePage(int pg)
Set the active page
Note: In server side, active page starts from 0.
|
void |
setAutohide(boolean autohide)
Sets whether to automatically hide this component if
there is only one page available.
|
void |
setDetailed(boolean detailed)
Sets whether to show total size and index of items in current page
|
void |
setPageIncrement(int pginc)
Sets the number of page list icon when mold is "os"
|
void |
setPageSize(int size)
Sets the items to show in each page
|
void |
setTotalSize(int size)
Sets total size of items
|
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltipfocus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidth, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowRoots, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isInvalidated, isListenerAvailable, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEventListener, removeEventListenerpublic Paging()
public Paging(int totalsz,
int pagesz)
totalsz - the total # of itemspagesz - the # of items per pagepublic int getPageSize()
PageableDefault: 20.
getPageSize in interface Pageablepublic void setPageSize(int size)
throws org.zkoss.zk.ui.WrongValueException
setPageSize in interface Pageableorg.zkoss.zk.ui.WrongValueExceptionpublic int getTotalSize()
PaginalgetTotalSize in interface Paginalpublic void setTotalSize(int size)
throws org.zkoss.zk.ui.WrongValueException
setTotalSize in interface Paginalorg.zkoss.zk.ui.WrongValueExceptionpublic int getPageCount()
PageablegetPageCount in interface Pageablepublic int getActivePage()
PageablegetActivePage in interface Pageablepublic void setActivePage(int pg)
throws org.zkoss.zk.ui.WrongValueException
Note: In server side, active page starts from 0. But in browser UI, it starts from 1
setActivePage in interface Pageableorg.zkoss.zk.ui.WrongValueExceptionpublic int getPageIncrement()
PaginalDefault: 10.
getPageIncrement in interface Paginalpublic void setPageIncrement(int pginc)
throws org.zkoss.zk.ui.WrongValueException
setPageIncrement in interface Paginalorg.zkoss.zk.ui.WrongValueExceptionpublic boolean isDetailed()
PaginalPaginal.getTotalSize().isDetailed in interface Paginalpublic void setDetailed(boolean detailed)
setDetailed in interface Paginalpublic boolean isAutohide()
Default: false.
isAutohide in interface Paginalpublic void setAutohide(boolean autohide)
setAutohide in interface Paginalprotected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class XulElementIOExceptionpublic String getZclass()
getZclass in class org.zkoss.zk.ui.HtmlBasedComponentpublic boolean isVisible()
isVisible in interface org.zkoss.zk.ui.ComponentisVisible in class org.zkoss.zk.ui.AbstractComponentprotected boolean isChildable()
isChildable in class org.zkoss.zk.ui.AbstractComponentpublic void service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Default: in addition to what are handled by HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean),
it also handles onSelect.
service in interface org.zkoss.zk.ui.sys.ComponentCtrlservice in class org.zkoss.zk.ui.HtmlBasedComponentCopyright © 2015. All rights reserved.