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 |
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 |
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 |
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, setTooltip
focus, 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, setZIndexDirectly
addAnnotation, 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, willSerialize
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.HtmlBasedComponent
public int getPageSize()
Default: 20.
getPageSize
in interface org.zkoss.zul.ext.Pageable
public void setPageSize(int size) throws org.zkoss.zk.ui.WrongValueException
setPageSize
in interface org.zkoss.zul.ext.Pageable
org.zkoss.zk.ui.WrongValueException
public int getTotalSize()
public int getPageCount()
getPageCount
in interface org.zkoss.zul.ext.Pageable
public int getActivePage()
getActivePage
in interface org.zkoss.zul.ext.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 org.zkoss.zul.ext.Pageable
org.zkoss.zk.ui.WrongValueException
public 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_TITLE
public 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.ComponentCtrl
beforeChildAdded
in class org.zkoss.zk.ui.AbstractComponent
public void onChildRemoved(org.zkoss.zk.ui.Component child)
onChildRemoved
in interface org.zkoss.zk.ui.sys.ComponentCtrl
onChildRemoved
in class org.zkoss.zk.ui.AbstractComponent
public boolean insertBefore(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)
insertBefore
in interface org.zkoss.zk.ui.Component
insertBefore
in class org.zkoss.zk.ui.AbstractComponent
public 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 void onInitRender(org.zkoss.zk.ui.event.Event event)
public String getZclass()
getZclass
in class org.zkoss.zk.ui.HtmlBasedComponent
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException
renderProperties
in class org.zkoss.zul.impl.XulElement
IOException
public Object clone()
clone
in interface org.zkoss.zk.ui.Component
clone
in class org.zkoss.zul.impl.XulElement
public void sessionWillPassivate(org.zkoss.zk.ui.Page page)
sessionWillPassivate
in interface org.zkoss.zk.ui.sys.ComponentCtrl
sessionWillPassivate
in class org.zkoss.zk.ui.AbstractComponent
public void sessionDidActivate(org.zkoss.zk.ui.Page page)
sessionDidActivate
in interface org.zkoss.zk.ui.sys.ComponentCtrl
sessionDidActivate
in class org.zkoss.zk.ui.AbstractComponent
public boolean isChildable()
isChildable
in class org.zkoss.zk.ui.AbstractComponent
public void service(org.zkoss.zk.au.AuRequest request, boolean everError)
service
in interface org.zkoss.zk.ui.sys.ComponentCtrl
service
in class org.zkoss.zk.ui.HtmlBasedComponent
public void invalidate()
invalidate
in interface org.zkoss.zk.ui.Component
invalidate
in class org.zkoss.zk.ui.AbstractComponent
Copyright © 2017. All rights reserved.