public class Pivottable
extends org.zkoss.zul.impl.XulElement
implements org.zkoss.zul.ext.Pageable
| Modifier and Type | Field and Description |
|---|---|
static String |
COLUMN_TITLE |
static String |
DATA_TITLE |
static String |
ROW_TITLE |
static String |
SCROLL_POS |
| Constructor and Description |
|---|
Pivottable() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addTitleCell(String type,
org.zkoss.zk.ui.Component component)
Add component in title cells
|
void |
beforeChildAdded(org.zkoss.zk.ui.Component newChild,
org.zkoss.zk.ui.Component refChild) |
void |
clearCustomSizes()
Clear custom sizes adjusted by user.
|
Object |
clone() |
int |
getActivePage()
Returns the active page (starting from 0).
|
org.zkoss.zk.ui.Component |
getColumnCell()
Return the component in column title cell.
|
org.zkoss.zk.ui.Component |
getDataCell()
Return the component in data title cell.
|
String |
getDataFieldOrient()
Return the value of data field orientation.
|
PivotModel |
getModel()
Returns pivot model.
|
int |
getPageCount()
Returns the number of pages.
|
int |
getPageSize()
Returns the number of items per page.
|
PivotRenderer |
getPivotRenderer()
Returns the pivot renderer.
|
org.zkoss.zk.ui.Component |
getRowCell()
Return the component in row title cell.
|
int |
getTotalSize()
Returns the total number of items.
|
String |
getZclass() |
boolean |
insertBefore(org.zkoss.zk.ui.Component newChild,
org.zkoss.zk.ui.Component refChild) |
void |
invalidate()
Invalidates the pivottable, causing it to rerender.
|
boolean |
isAutowrap()
Gets whether auto wrap the content and adjust row height.
|
boolean |
isChildable() |
boolean |
isFrozenColumnHeaders()
see:
setPageSize(int) |
boolean |
isGrandTotalForColumns()
Returns whether enables to show the grand total for columns.
|
boolean |
isGrandTotalForRows()
Returns whether enables to show the grand total for rows.
|
void |
onChildRemoved(org.zkoss.zk.ui.Component child) |
void |
onInitRender(org.zkoss.zk.ui.event.Event event)
Only internal use to prepare the rendering information from the pivot model.
|
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
service(org.zkoss.zk.au.AuRequest request,
boolean everError) |
void |
sessionDidActivate(org.zkoss.zk.ui.Page page) |
void |
sessionWillPassivate(org.zkoss.zk.ui.Page page) |
void |
setActivePage(int pg)
Set the active page
|
void |
setAutowrap(boolean autowrap)
Sets whether auto wrap the content and adjust row height
Note: It is strongly recommended NOT to use autowrap if
there are huge amount of cells in one page or the
performance at client side might be horrible.
|
void |
setDataFieldOrient(String orient)
Set the orientation of data fields, which determines how data are
arranged on the Pivottable when there are more than one data fields.
|
void |
setFrozenColumnHeaders(boolean frozenColumnHeaders)
Enable frozen column headers.
|
void |
setGrandTotalForColumns(boolean grandTotalForColumns)
Sets whether enables to show the grand total for columns.
|
void |
setGrandTotalForRows(boolean grandTotalForRows)
Sets whether enables to show the grand total for rows.
|
void |
setHeight(String height) |
void |
setModel(PivotModel model)
Sets the pivot model.
|
void |
setPageSize(int size)
Sets the items to show in each page
|
void |
setPivotRenderer(PivotRenderer renderer)
Sets the pivot renderer
|
getContext, getCtrlKeys, getPopup, 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, 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, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, willPassivate, willPassivate, willSerialize, willSerializepublic static final String SCROLL_POS
public static final String DATA_TITLE
public static final String COLUMN_TITLE
public static final String ROW_TITLE
public void setHeight(String height)
setHeight in class org.zkoss.zk.ui.HtmlBasedComponentpublic int getPageSize()
Default: 20.
getPageSize in interface org.zkoss.zul.ext.Pageablepublic void setPageSize(int size)
throws org.zkoss.zk.ui.WrongValueException
setPageSize in interface org.zkoss.zul.ext.Pageableorg.zkoss.zk.ui.WrongValueExceptionpublic int getTotalSize()
public int getPageCount()
getPageCount in interface org.zkoss.zul.ext.Pageablepublic int getActivePage()
getActivePage in interface org.zkoss.zul.ext.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 org.zkoss.zul.ext.Pageableorg.zkoss.zk.ui.WrongValueExceptionpublic void setGrandTotalForRows(boolean grandTotalForRows)
Default: true
public boolean isGrandTotalForRows()
Default: true.
public void setGrandTotalForColumns(boolean grandTotalForColumns)
Default: true
public boolean isGrandTotalForColumns()
Default: true.
public boolean addTitleCell(String type, org.zkoss.zk.ui.Component component)
type - DATA_TITLE, COLUMN_TITLE, ROW_TITLEpublic org.zkoss.zk.ui.Component getDataCell()
public org.zkoss.zk.ui.Component getColumnCell()
public org.zkoss.zk.ui.Component getRowCell()
public void beforeChildAdded(org.zkoss.zk.ui.Component newChild,
org.zkoss.zk.ui.Component refChild)
beforeChildAdded in interface org.zkoss.zk.ui.sys.ComponentCtrlbeforeChildAdded in class org.zkoss.zk.ui.AbstractComponentpublic void onChildRemoved(org.zkoss.zk.ui.Component child)
onChildRemoved in interface org.zkoss.zk.ui.sys.ComponentCtrlonChildRemoved in class org.zkoss.zk.ui.AbstractComponentpublic boolean insertBefore(org.zkoss.zk.ui.Component newChild,
org.zkoss.zk.ui.Component refChild)
insertBefore in interface org.zkoss.zk.ui.ComponentinsertBefore in class org.zkoss.zk.ui.AbstractComponentpublic String getDataFieldOrient()
column or row.public void setDataFieldOrient(String orient)
orient - accepts either column or row.
Throws an exception otherwise.public void clearCustomSizes()
public PivotModel getModel()
public void setModel(PivotModel model)
public void setPivotRenderer(PivotRenderer renderer)
public PivotRenderer getPivotRenderer()
public void setAutowrap(boolean autowrap)
autowrap - public boolean isAutowrap()
public boolean isFrozenColumnHeaders()
setPageSize(int)public void setFrozenColumnHeaders(boolean frozenColumnHeaders)
setPageSize(int) and fixed height/vflex.frozenColumnHeaders - public void onInitRender(org.zkoss.zk.ui.event.Event event)
public String getZclass()
getZclass in class org.zkoss.zk.ui.HtmlBasedComponentprotected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class org.zkoss.zul.impl.XulElementIOExceptionpublic Object clone()
clone in interface org.zkoss.zk.ui.Componentclone in class org.zkoss.zul.impl.XulElementpublic void sessionWillPassivate(org.zkoss.zk.ui.Page page)
sessionWillPassivate in interface org.zkoss.zk.ui.sys.ComponentCtrlsessionWillPassivate in class org.zkoss.zk.ui.AbstractComponentpublic void sessionDidActivate(org.zkoss.zk.ui.Page page)
sessionDidActivate in interface org.zkoss.zk.ui.sys.ComponentCtrlsessionDidActivate in class org.zkoss.zk.ui.AbstractComponentpublic boolean isChildable()
isChildable in class org.zkoss.zk.ui.AbstractComponentpublic void service(org.zkoss.zk.au.AuRequest request,
boolean everError)
service in interface org.zkoss.zk.ui.sys.ComponentCtrlservice in class org.zkoss.zk.ui.HtmlBasedComponentpublic void invalidate()
invalidate in interface org.zkoss.zk.ui.Componentinvalidate in class org.zkoss.zk.ui.AbstractComponentCopyright © 2023. All rights reserved.