public class Paging extends XulElement implements Paginal
Default getZclass()
: z-paging. (since 3.5.0)
HtmlBasedComponent.ExtraCtrl
AbstractComponent.Children
_zclass
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
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.
|
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component.
|
boolean |
isAutohide()
Returns whether to automatically hide this component if
there is only one page available.
|
protected boolean |
isChildable()
Returns whether this component can have a child.
|
boolean |
isDetailed()
Returns whether to show the detailed info, such as
Paginal.getTotalSize() . |
boolean |
isVisible()
Returns whether this component is visible.
|
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing
tags and children.
|
void |
service(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, setTooltip
focus, 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, setZIndexDirectly
addAnnotation, 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, 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 WrongValueException
setPageSize
in interface Pageable
WrongValueException
public int getTotalSize()
Paginal
getTotalSize
in interface Paginal
public void setTotalSize(int size) throws WrongValueException
setTotalSize
in interface Paginal
WrongValueException
public int getPageCount()
Pageable
getPageCount
in interface Pageable
public int getActivePage()
Pageable
getActivePage
in interface Pageable
public void setActivePage(int pg) throws WrongValueException
Note: In server side, active page starts from 0. But in browser UI, it starts from 1
setActivePage
in interface Pageable
WrongValueException
public int getPageIncrement()
Paginal
Default: 10.
getPageIncrement
in interface Paginal
public void setPageIncrement(int pginc) throws WrongValueException
setPageIncrement
in interface Paginal
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(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
renderProperties
in class XulElement
java.io.IOException
public java.lang.String getZclass()
HtmlBasedComponent
AbstractComponent.getMold()
).
Default: null (the default value depends on element).
HtmlBasedComponent.setZclass(java.lang.String)
) will completely replace the default style
of a component. In other words, the default style of a component
is associated with the default value of HtmlBasedComponent.getZclass()
.
Once it is changed, the default style won't be applied at all.
If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String)
instead.
getZclass
in class HtmlBasedComponent
HtmlBasedComponent.getSclass()
public boolean isVisible()
Component
isVisible
in interface Component
isVisible
in class AbstractComponent
Components.isRealVisible(org.zkoss.zk.ui.Component)
protected boolean isChildable()
AbstractComponent
Default: return true (means it can have children).
isChildable
in class AbstractComponent
public void service(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 ComponentCtrl
service
in class HtmlBasedComponent
everError
- whether any error ever occurred before
processing this request.AbstractComponent.setAuService(org.zkoss.zk.au.AuService)
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.