org.zkoss.zul
Class Paging

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Paging
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl, Pageable, Paginal

public class Paging
extends XulElement
implements Paginal

Paging of long content.

Default HtmlBasedComponent.getSclass(): paging.

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Paging()
           
Paging(int totalsz, int pagesz)
          Contructor.
 
Method Summary
 int getActivePage()
          Returns the active page (starting from 0).
 java.lang.String getInnerTags()
          Returns the inner HTML tags of this component.
 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.
 boolean isAutohide()
          Returns whether to automatically hide this component if there is only one page available.
 boolean isChildable()
           
 boolean isDetailed()
          Returns whether to show the detailed info, such as Paginal.getTotalSize().
 boolean isVisible()
           
 void setActivePage(int pg)
          Sets the active page (starting 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 the detailed info, such as Paginal.getTotalSize().
 void setPageIncrement(int pginc)
          Sets the number of page anchors shall appear at the client.
 void setPageSize(int size)
          Sets the number of items per page.
 void setTotalSize(int size)
          Sets the total number of items.
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getAllOnClickAttrs, getContext, getInnerAttrs, getOuterAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addEventListener, appendAsapAttr, focus, getDraggable, getDroppable, getHeight, getLeft, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, isAsapRequired, newExtraCtrl, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isListenerAvailable, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.zkoss.zul.ext.Paginal
addEventListener, removeEventListener
 

Constructor Detail

Paging

public Paging()

Paging

public Paging(int totalsz,
              int pagesz)
Contructor.

Parameters:
totalsz - the total # of items
pagesz - the # of items per page
Method Detail

getPageSize

public int getPageSize()
Description copied from interface: Pageable
Returns the number of items per page.

Default: 20.

Specified by:
getPageSize in interface Pageable

setPageSize

public void setPageSize(int size)
                 throws org.zkoss.zk.ui.WrongValueException
Description copied from interface: Pageable
Sets the number of items per page.

Specified by:
setPageSize in interface Pageable
Throws:
org.zkoss.zk.ui.WrongValueException

getTotalSize

public int getTotalSize()
Description copied from interface: Paginal
Returns the total number of items.

Specified by:
getTotalSize in interface Paginal

setTotalSize

public void setTotalSize(int size)
                  throws org.zkoss.zk.ui.WrongValueException
Description copied from interface: Paginal
Sets the total number of items.

Specified by:
setTotalSize in interface Paginal
Throws:
org.zkoss.zk.ui.WrongValueException

getPageCount

public int getPageCount()
Description copied from interface: Pageable
Returns the number of pages. Note: there is at least one page even no item at all.

Specified by:
getPageCount in interface Pageable

getActivePage

public int getActivePage()
Description copied from interface: Pageable
Returns the active page (starting from 0).

Specified by:
getActivePage in interface Pageable

setActivePage

public void setActivePage(int pg)
                   throws org.zkoss.zk.ui.WrongValueException
Description copied from interface: Pageable
Sets the active page (starting from 0).

Specified by:
setActivePage in interface Pageable
Throws:
org.zkoss.zk.ui.WrongValueException

getPageIncrement

public int getPageIncrement()
Description copied from interface: Paginal
Returns the number of page anchors shall appear at the client.

Default: 10.

Specified by:
getPageIncrement in interface Paginal

setPageIncrement

public void setPageIncrement(int pginc)
                      throws org.zkoss.zk.ui.WrongValueException
Description copied from interface: Paginal
Sets the number of page anchors shall appear at the client.

Specified by:
setPageIncrement in interface Paginal
Throws:
org.zkoss.zk.ui.WrongValueException

isDetailed

public boolean isDetailed()
Description copied from interface: Paginal
Returns whether to show the detailed info, such as Paginal.getTotalSize().

Specified by:
isDetailed in interface Paginal

setDetailed

public void setDetailed(boolean detailed)
Description copied from interface: Paginal
Sets whether to show the detailed info, such as Paginal.getTotalSize().

Specified by:
setDetailed in interface Paginal

isAutohide

public boolean isAutohide()
Returns whether to automatically hide this component if there is only one page available.

Default: false.


setAutohide

public void setAutohide(boolean autohide)
Sets whether to automatically hide this component if there is only one page available.


getInnerTags

public java.lang.String getInnerTags()
Returns the inner HTML tags of this component.

Used only for component development. Not accessible by application developers.


isVisible

public boolean isVisible()
Specified by:
isVisible in interface org.zkoss.zk.ui.Component
Overrides:
isVisible in class org.zkoss.zk.ui.AbstractComponent

isChildable

public boolean isChildable()
Specified by:
isChildable in interface org.zkoss.zk.ui.Component
Overrides:
isChildable in class org.zkoss.zk.ui.AbstractComponent


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.