public class Paging extends XulElement implements Paginal
Default getZclass()
: z-paging. (since 3.5.0)
AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED
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
|
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, setTooltip
focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
addAnnotation, addAnnotation, addCallback, 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, getCallback, 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, getShadowFellowIfAny, getShadowRoots, getShadowVariable, 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, removeCallback, 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, willSerialize
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEventListener, removeEventListener
public Paging()
public Paging(int totalsz, int pagesz)
totalsz
- the total # of itemspagesz
- the # of items per pagepublic int getPageSize()
Pageable
Default: 20.
getPageSize
in interface Pageable
public void setPageSize(int size) throws org.zkoss.zk.ui.WrongValueException
setPageSize
in interface Pageable
org.zkoss.zk.ui.WrongValueException
public int getTotalSize()
Paginal
getTotalSize
in interface Paginal
public void setTotalSize(int size) throws org.zkoss.zk.ui.WrongValueException
setTotalSize
in interface Paginal
org.zkoss.zk.ui.WrongValueException
public int getPageCount()
Pageable
getPageCount
in interface Pageable
public int getActivePage()
Pageable
getActivePage
in interface Pageable
public 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 Pageable
org.zkoss.zk.ui.WrongValueException
public int getPageIncrement()
Paginal
Default: 10.
getPageIncrement
in interface Paginal
public void setPageIncrement(int pginc) throws org.zkoss.zk.ui.WrongValueException
setPageIncrement
in interface Paginal
org.zkoss.zk.ui.WrongValueException
public boolean isDetailed()
Paginal
Paginal.getTotalSize()
.isDetailed
in interface Paginal
public void setDetailed(boolean detailed)
setDetailed
in interface Paginal
public boolean isAutohide()
Default: false.
isAutohide
in interface Paginal
public void setAutohide(boolean autohide)
setAutohide
in interface Paginal
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException
renderProperties
in class XulElement
IOException
public String getZclass()
getZclass
in class org.zkoss.zk.ui.HtmlBasedComponent
public boolean isVisible()
isVisible
in interface org.zkoss.zk.ui.Component
isVisible
in class org.zkoss.zk.ui.AbstractComponent
protected boolean isChildable()
isChildable
in class org.zkoss.zk.ui.AbstractComponent
public 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.ComponentCtrl
service
in class org.zkoss.zk.ui.HtmlBasedComponent
Copyright © 2016. All rights reserved.