Class MeshElement
- All Implemented Interfaces:
Serializable,Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl,Paginated
- Since:
- 5.0.6
- Author:
- henrichen
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrlNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo -
Field Summary
FieldsFields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidInternal check if there is any use of vflex and height before setRowsbooleanintReturns the active page (starting from 0).intReturns the number of pages.intReturns the page size, a.k.a., the number rows per page.Returns how to position the paging of mesh element at the client screen.getSpan()Return column span hint of this component.protected abstract booleanbooleanReturns whether the auto-paging facility is turned on when mold is "paging".booleanReturns whether the Paging component of this component is disabled.booleanReturns whether sizing grid/listbox/tree column width by its content.booleanisSpan()Returns whether distributes remaining empty space of this component to ANY column.protected abstract Paginalpgi()Returns the instance of the @{link Paginal}protected voidrenderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) voidsetActivePage(int pg) Sets the active page (starting from 0).voidsetAutopaging(boolean autopaging) Sets whether the auto-paging facility is turned on when mold is "paging".voidsetPageSize(int pgsz) Sets the page size, a.k.a., the number rows per page.voidsetPagingDisabled(boolean pagingDisabled) Sets whether to disable the Paging component of this componentvoidsetPagingPosition(String pagingPosition) Sets how to position the paging of mesh element at the client screen.voidsetSizedByContent(boolean byContent) Sets whether sizing grid/listbox/tree column width by its content; it equals set hflex="min" on each column.voidsetSpan(boolean span) Sets whether distributes remaining empty space of this component to ALL columns proportionally.voidSets column span hint of this component.Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesMethods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setSkeleton, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyMethods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Field Details
-
CSS_FLEX_AUTO_DISABLED_COUNT
- See Also:
-
-
Constructor Details
-
MeshElement
public MeshElement()
-
-
Method Details
-
getSpan
Return column span hint of this component.Default: null
- Returns:
- column span hint of this component.
- Since:
- 5.0.6
- See Also:
-
setSpan
Sets column span hint of this component.String number span indicates how this component distributes remaining empty space to the specified column(0-based). "0" means distribute remaining empty space to the 1st column; "1" means distribute remaining empty space to the 2nd column, etc.. The spanning column will grow to fit the extra remaining space.
Special span hint with "true" means span ALL columns proportionally per their original widths while null or "false" means NOT spanning any column.
Default: null. That is, NOT span any column.
Note span is meaningful only if there is remaining empty space for columns.
- Parameters:
span- the column span hint.- Since:
- 5.0.6
- See Also:
-
setSpan
public void setSpan(boolean span) Sets whether distributes remaining empty space of this component to ALL columns proportionally.Default: false. That is, NOT span any column.
Note span is meaningful only if there is remaining empty space for columns.
- Parameters:
span- whether to span the width of ALL columns to occupy the whole mesh element(grid/listbox/tree).- Since:
- 5.0.5
-
isSpan
public boolean isSpan()Returns whether distributes remaining empty space of this component to ANY column.Default: false.
- Returns:
- whether distributes remaining empty space of this component to ANY column.
- Since:
- 5.0.5
- See Also:
-
setSizedByContent
public void setSizedByContent(boolean byContent) Sets whether sizing grid/listbox/tree column width by its content; it equals set hflex="min" on each column.Default: false.
- Parameters:
byContent-- Since:
- 5.0.0
-
isSizedByContent
public boolean isSizedByContent()Returns whether sizing grid/listbox/tree column width by its content. Default is false.- Since:
- 5.0.0
- See Also:
-
setAutopaging
public void setAutopaging(boolean autopaging) Sets whether the auto-paging facility is turned on when mold is "paging". If it is set to true, thesetPageSize(int)is ignored; rather, the page size is automatically determined by the height of the Listbox dynamically. Note: Due to performance concern, Autopaging functionality does not supportDetailcomponents.- Parameters:
autopaging- true to turn on the auto-paging facility.- Since:
- 5.0.2
-
isAutopaging
public boolean isAutopaging()Returns whether the auto-paging facility is turned on when mold is "paging". If it is set to true, thesetPageSize(int)is ignored; rather, the page size is automatically determined by the height of the Listbox dynamically.- Returns:
- whether the "autopaging" facility is turned on.
- Since:
- 5.0.2
-
setPagingPosition
Sets how to position the paging of mesh element at the client screen. It is meaningless if the mold is not in "paging".- Parameters:
pagingPosition- how to position. It can only be "bottom" (the default), or "top", or "both".- Since:
- 3.0.4
-
isAutohidePaging
protected abstract boolean isAutohidePaging() -
getPagingPosition
Returns how to position the paging of mesh element at the client screen. It is meaningless if the mold is not in "paging".- Specified by:
getPagingPositionin interfacePaginated- Since:
- 3.0.4
-
pgi
Returns the instance of the @{link Paginal} -
getPageSize
public int getPageSize()Returns the page size, a.k.a., the number rows per page.- Throws:
IllegalStateException- ifpgi()returns null, i.e., mold is not "paging" and no external controller is specified.
-
setPageSize
public void setPageSize(int pgsz) throws org.zkoss.zk.ui.WrongValueException Sets the page size, a.k.a., the number rows per page.- Throws:
IllegalStateException- ifpgi()returns null, i.e., mold is not "paging" and no external controller is specified.org.zkoss.zk.ui.WrongValueException
-
getPageCount
public int getPageCount()Returns the number of pages. Note: there is at least one page even no item at all.- Since:
- 3.0.4
-
getActivePage
public int getActivePage()Returns the active page (starting from 0).- Since:
- 3.0.4
-
setActivePage
public void setActivePage(int pg) throws org.zkoss.zk.ui.WrongValueException Sets the active page (starting from 0).- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 3.0.4
-
isPagingDisabled
public boolean isPagingDisabled()Description copied from interface:PaginatedReturns whether the Paging component of this component is disabled.Default: false.
- Specified by:
isPagingDisabledin interfacePaginated- Returns:
- whether the paging component of this component is disabled
- Since:
- 8.0.3
-
setPagingDisabled
public void setPagingDisabled(boolean pagingDisabled) Sets whether to disable the Paging component of this component- Specified by:
setPagingDisabledin interfacePaginated- Parameters:
pagingDisabled-- Since:
- 8.0.3
-
checkBeforeSetRows
protected void checkBeforeSetRows() throws org.zkoss.zk.ui.UiExceptionInternal check if there is any use of vflex and height before setRows- Throws:
org.zkoss.zk.ui.UiException
-
renderProperties
- Overrides:
renderPropertiesin classXulElement- Throws:
IOException
-
evalCSSFlex
public boolean evalCSSFlex()- Overrides:
evalCSSFlexin classorg.zkoss.zk.ui.HtmlBasedComponent
-