public class PivotFieldControl
extends org.zkoss.zul.Div
implements org.zkoss.zk.ui.IdSpace, org.zkoss.zk.ui.ext.AfterCompose
Modifier and Type | Field and Description |
---|---|
protected Map<String,Calculator> |
_calmap |
protected boolean |
_deferred |
protected String |
_layout |
protected PivotModelExt |
_model |
protected static String |
CHECKMARK_NULL_URI |
protected static String |
CHECKMARK_URI |
protected org.zkoss.zul.Grid |
clist |
protected static String |
DATA_FIELD_MENU_URI |
protected org.zkoss.zul.Grid |
dlist |
protected static String |
DRAG_GROUP |
static String |
DRAG_GROUP_KEY |
protected org.zkoss.zk.ui.event.EventListener |
FIELD_BTN_LISTENER |
protected org.zkoss.zul.RowRenderer |
FIELD_RENDERER |
protected org.zkoss.zk.ui.event.EventListener |
ITEM_DROP_LISTENER |
static String |
LABEL_RES_PREFIX |
protected static Map<String,String> |
LABELS |
static String |
LAYOUT_HORIZONTAL
The horizon layout, where the field lists are arranged horizontally.
|
static String |
LAYOUT_SQUARE
The square layout, where the field lists are arranged into a 2 by 2 square.
|
static String |
LAYOUT_VERTICAL
The vertical layout, where the field lists are arranged vertically.
|
protected org.zkoss.zul.Menupopup |
menuDF |
protected org.zkoss.zul.Menupopup |
menuFilterList |
protected org.zkoss.zul.Menupopup |
menuRCF |
protected org.zkoss.zul.Menuitem |
menuSortA |
protected org.zkoss.zul.Menuitem |
menuSortZ |
protected org.zkoss.zul.Menupopup |
menuSummary |
protected static String |
RC_FIELD_MENU_URI |
protected org.zkoss.zul.Grid |
rlist |
protected static String |
SUBTOTAL_MODAL_URI |
protected org.zkoss.zk.ui.event.EventListener |
SUMMARY_CLICK_LISTENER |
protected org.zkoss.zul.Grid |
ulist |
protected static Map<String,String> |
VIEW_URI |
Constructor and Description |
---|
PivotFieldControl() |
Modifier and Type | Method and Description |
---|---|
void |
afterCompose() |
protected static void |
clearChildren(org.zkoss.zk.ui.Component c) |
protected String |
getDataFieldContextMenuURI()
Override this method to provide a different zul template for the context
menu on data fields.
|
protected Map<String,String> |
getDefaultLabels()
Override this method to provide the default label list.
|
protected String |
getDragGroup() |
protected PivotField.Type |
getFieldType(org.zkoss.zul.Grid grid) |
protected Map<String,Object> |
getLabels() |
String |
getLayout()
Return layout type.
|
PivotModelExt |
getModel()
Return the pivot model associated with this control
|
protected String |
getRowColumnFieldContextMenuURI()
Override this method to provide a different zul template for the context
menu on row/column fields.
|
protected String |
getSubtotalModalWindowURI()
Override this method to provide a different zul template for the modal
window for subtotal selection.
|
Calculator[] |
getSubtotals(PivotField field) |
protected void |
initGrid(org.zkoss.zul.Grid grid) |
protected boolean |
isDataField(org.zkoss.zul.Row row) |
boolean |
isDeferredUpdate()
Return true if in deferred update mode.
|
protected boolean |
isRowOrColumnField(org.zkoss.zul.Row row) |
protected boolean |
isSortable(org.zkoss.zul.Row row) |
boolean |
isUpdated()
Return true if the PivotModel is up to date.
|
protected void |
loadLayout() |
void |
onClick$menuSortA(org.zkoss.zk.ui.event.Event event) |
void |
onClick$menuSortZ(org.zkoss.zk.ui.event.Event event) |
void |
onClick$menuSubtotal(org.zkoss.zk.ui.event.Event event) |
void |
setDeferredUpdate(boolean deferred)
Set deferred update mode.
|
void |
setLayout(String layout)
Set layout type.
|
void |
setModel(PivotModelExt model)
Set pivot model associated with this control.
|
void |
setSubtotals(PivotField field,
Calculator[] selected) |
protected void |
sortField(boolean ascending) |
void |
syncModel()
Reload underlying Grids from current model.
|
protected void |
syncModel(org.zkoss.zul.Grid grid,
PivotField.Type type) |
void |
update()
Update changes to PivotModel.
|
protected void |
updatePivotFields(org.zkoss.zul.Grid grid,
PivotField.Type type) |
clone, 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, getZclass, getZindex, getZIndex, service, 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, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, 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, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, 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
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected boolean _deferred
protected String _layout
protected PivotModelExt _model
protected final Map<String,Calculator> _calmap
protected org.zkoss.zul.Grid ulist
protected org.zkoss.zul.Grid clist
protected org.zkoss.zul.Grid rlist
protected org.zkoss.zul.Grid dlist
protected org.zkoss.zul.Menupopup menuRCF
protected org.zkoss.zul.Menupopup menuDF
protected org.zkoss.zul.Menupopup menuSummary
protected org.zkoss.zul.Menupopup menuFilterList
protected org.zkoss.zul.Menuitem menuSortA
protected org.zkoss.zul.Menuitem menuSortZ
protected final org.zkoss.zk.ui.event.EventListener SUMMARY_CLICK_LISTENER
protected final org.zkoss.zk.ui.event.EventListener ITEM_DROP_LISTENER
protected final org.zkoss.zk.ui.event.EventListener FIELD_BTN_LISTENER
protected final org.zkoss.zul.RowRenderer FIELD_RENDERER
public static final String LAYOUT_SQUARE
setLayout(String)
,
Constant Field Valuespublic static final String LAYOUT_VERTICAL
setLayout(String)
,
Constant Field Valuespublic static final String LAYOUT_HORIZONTAL
setLayout(String)
,
Constant Field Valuesprotected static final String DATA_FIELD_MENU_URI
protected static final String RC_FIELD_MENU_URI
protected static final String SUBTOTAL_MODAL_URI
public static final String LABEL_RES_PREFIX
public static final String DRAG_GROUP_KEY
protected static final String DRAG_GROUP
protected static final String CHECKMARK_URI
protected static final String CHECKMARK_NULL_URI
public void setDeferredUpdate(boolean deferred)
update()
. Also, in deferred update mode, dragging fields will
fire an event, so we have a chance to reflect the state on other
components.public boolean isDeferredUpdate()
public void update()
protected void updatePivotFields(org.zkoss.zul.Grid grid, PivotField.Type type)
public boolean isUpdated()
public String getLayout()
public void setLayout(String layout)
LAYOUT_SQUARE
layout
- LAYOUT_SQUARE
, LAYOUT_HORIZONTAL
,
LAYOUT_VERTICAL
public PivotModelExt getModel()
public void setModel(PivotModelExt model)
PivotModelExt
is required.public void syncModel()
public void afterCompose()
afterCompose
in interface org.zkoss.zk.ui.ext.AfterCompose
protected void syncModel(org.zkoss.zul.Grid grid, PivotField.Type type)
protected void loadLayout()
protected void initGrid(org.zkoss.zul.Grid grid)
public void onClick$menuSortA(org.zkoss.zk.ui.event.Event event)
public void onClick$menuSortZ(org.zkoss.zk.ui.event.Event event)
protected void sortField(boolean ascending)
public void onClick$menuSubtotal(org.zkoss.zk.ui.event.Event event) throws Exception
Exception
public Calculator[] getSubtotals(PivotField field)
public void setSubtotals(PivotField field, Calculator[] selected)
protected String getRowColumnFieldContextMenuURI()
protected String getDataFieldContextMenuURI()
protected String getSubtotalModalWindowURI()
protected Map<String,String> getDefaultLabels()
protected static final void clearChildren(org.zkoss.zk.ui.Component c)
protected final PivotField.Type getFieldType(org.zkoss.zul.Grid grid)
protected final boolean isDataField(org.zkoss.zul.Row row)
protected final boolean isRowOrColumnField(org.zkoss.zul.Row row)
protected final boolean isSortable(org.zkoss.zul.Row row)
protected final String getDragGroup()
Copyright © 2017. All rights reserved.