Interface Paginal
- All Superinterfaces:
org.zkoss.zk.ui.ext.Disable,Pageable
- All Known Implementing Classes:
MeshElement.InternalPaging,Paging
It is used to provide an abstract contract between controller and controllee.
For example, Paging is a paging controller
while Grid is a paging controllee.
In other words, Grid (contains long content)
can be controlled by Paging.
The paging controller must implement this interface, while
the paging controllee shall access only this interface (rather than
Paging or so).
Note: If a component supports multiple pages but it cannot
be controlled by a paging controller, it shall implement
Pageable instead.
Example, Treechildren
is Pageable but not controllable by Paginal.
- Author:
- tomyeh
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener) Adds an event listener to specified event for this component.intReturns the number of page anchors shall appear at the client.intReturns the total number of items.booleanReturns whether to automatically hide the paging if there is only one page available.booleanReturns whether to show the detailed info, such asgetTotalSize().booleanremoveEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener) Removes an event listener.voidsetAutohide(boolean autohide) Sets whether to automatically hide the paging if there is only one page available.voidsetDetailed(boolean detailed) Sets whether to show the detailed info, such asgetTotalSize().voidsetPageIncrement(int pginc) Sets the number of page anchors shall appear at the client.voidsetTotalSize(int size) Sets the total number of items.Methods inherited from interface org.zkoss.zk.ui.ext.Disable
isDisabled, setDisabledMethods inherited from interface org.zkoss.zul.ext.Pageable
getActivePage, getPageCount, getPageSize, setActivePage, setPageSize
-
Method Details
-
isAutohide
boolean isAutohide()Returns whether to automatically hide the paging if there is only one page available.- Since:
- 7.0.1
-
setAutohide
void setAutohide(boolean autohide) Sets whether to automatically hide the paging if there is only one page available.- Since:
- 7.0.1
-
getTotalSize
int getTotalSize()Returns the total number of items. -
setTotalSize
void setTotalSize(int size) throws org.zkoss.zk.ui.WrongValueException Sets the total number of items.- Throws:
org.zkoss.zk.ui.WrongValueException
-
getPageIncrement
int getPageIncrement()Returns the number of page anchors shall appear at the client.Default: 10.
-
setPageIncrement
void setPageIncrement(int pginc) throws org.zkoss.zk.ui.WrongValueException Sets the number of page anchors shall appear at the client.- Throws:
org.zkoss.zk.ui.WrongValueException
-
isDetailed
boolean isDetailed()Returns whether to show the detailed info, such asgetTotalSize(). -
setDetailed
void setDetailed(boolean detailed) Sets whether to show the detailed info, such asgetTotalSize(). -
addEventListener
boolean addEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener) Adds an event listener to specified event for this component. The second registration is ignored and false is returned.The onPaging event is sent with an instance of
PagingEventto notify which page is selected.- Parameters:
evtnm- what event to listen (never null)- Returns:
- whether the listener is added; false if it was added before
- See Also:
-
removeEventListener
boolean removeEventListener(String evtnm, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event> listener) Removes an event listener.- Returns:
- whether the listener is removed; false if it was never added.
-