public class Biglistbox
extends org.zkoss.zul.impl.XulElement
Listbox including selection,
sorting, keystroke navigation, ROD(rendering-on-demand), and so on.
Event:
SelectEvent is sent when user changes the
selection.ScrollEventExt for onScroll is sent when user changes the scroll
position either x or y.ScrollEventExt for onScrollY is sent when user changes the scroll
position y.ScrollEventExt for onScrollX is sent when user changes the scroll
position x.SortEventExt is sent when user sort the column.CellClickEvent is sent when user click upon the cell field.
Default getZclass(): z-biglistbox.
Note: This component can only support those browsers which support HTML5/CSS3 selector. Like IE8+, Firefox, Safari, Opera, and Chrome.
| Constructor and Description |
|---|
Biglistbox() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCols()
Returns the number of columns within the viewport.
|
String |
getColWidth()
Returns the width of the single column
Default: 60px
|
int |
getFrozenCols()
Returns the size of the frozen columns.
|
<T> MatrixRenderer<T> |
getMatrixRenderer()
Returns the matrix renderer.
|
MatrixModel<?,?,?,?> |
getModel()
Returns the matrix model.
|
String |
getOddRowSclass()
Returns the style class for the odd rows.
|
int |
getPreloadSize()
Returns the number of items to preload when receiving the rendering
request from the client.
|
<T> MatrixRenderer<T> |
getRealMatrixRenderer()
Return the real matrix renderer, if
getMatrixRenderer() is null,
the default implementation is assumed. |
String |
getRowHeight()
Returns the height of the single row.
|
int |
getRows()
Returns the rows' size of the viewport.
|
int |
getSelectedIndex()
Returns the index of the selected item (-1 if no one is selected).
|
Object |
getSelectedObject()
Returns the selected object.
|
org.zkoss.zul.ext.Sortable |
getSortableModel()
Returns the sortable model, if any.
|
MatrixComparatorProvider<?> |
getSortAscending()
Returns the ascending sorter provider, or null if not available.
|
MatrixComparatorProvider<?> |
getSortDescending()
Returns the descending sorter provider, or null if not available.
|
String |
getZclass()
The default zclass is "z-biglistbox"
|
void |
invalidate() |
boolean |
isAutoCols()
Returns whether enables the auto adjusting cols size.
|
boolean |
isAutoRows()
Returns whether enables the auto adjusting rows size.
|
protected boolean |
isChildable() |
boolean |
isFixFrozenCols()
Returns whether is fix frozen columns, that means user cannot change the
size of the frozen columns dynamically.
|
void |
onInitRender()
Handles a private event, onInitRender.
|
void |
onPageAttached(org.zkoss.zk.ui.Page newpage,
org.zkoss.zk.ui.Page oldpage) |
void |
onPageDetached(org.zkoss.zk.ui.Page page) |
void |
onSort(SortEventExt event) |
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 |
setAutoCols(boolean autoCols)
Sets whether enables auto adjusting the number of cols.
|
void |
setAutoRows(boolean autoRows)
Sets whether enables auto adjusting the number of rows.
|
void |
setCols(int cols)
Sets the number of columns within the viewport.
|
void |
setColWidth(String colWidth)
Sets the width of the single column.
|
void |
setFixFrozenCols(boolean fixFrozenCols)
Sets to fix the frozen columns, if true, meaning the user cannot change
the size of the frozen columns dynamically.
|
void |
setFrozenCols(int fcols)
Sets the size of the frozen columns.
|
void |
setMatrixRenderer(MatrixRenderer<?> renderer)
Sets the matrix renderer.
|
void |
setMatrixRenderer(String clsnm)
Sets the matrix renderer from a class string.
|
void |
setModel(MatrixModel<?,?,?,?> model)
Sets the matrix model.
|
void |
setOddRowSclass(String scls)
Sets the style class for the odd rows.
|
void |
setRowHeight(String rowHeight)
Sets the height of the single row.
|
void |
setRows(int rows)
Sets the rows' size of the viewport.
|
void |
setSortAscending(MatrixComparatorProvider<?> sorter)
Sets the ascending sorter provider, or null for no sorter for the ascending order.
|
void |
setSortAscending(String clsnm)
Sets the ascending sorter provider with the class name, or null for no
sorter for the ascending order.
|
void |
setSortDescending(MatrixComparatorProvider<?> sorter)
Sets the descending sorter provider, or null for no sorter for the descending
order.
|
void |
setSortDescending(String clsnm)
Sets the descending sorter provider with the class name, or null for no sorter for
the descending order.
|
boolean |
sort(boolean ascending,
int columnIndex) |
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesaddSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, 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, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidatePartial, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializepublic void setAutoCols(boolean autoCols)
Default: true.
public boolean isAutoCols()
Default: true.
public void setAutoRows(boolean autoRows)
Default: true.
public boolean isAutoRows()
Default: true.
public void setFrozenCols(int fcols)
fcols - the size of the frozen columns, it cannot be negative.public int getFrozenCols()
Default: 0
public void setFixFrozenCols(boolean fixFrozenCols)
public boolean isFixFrozenCols()
Default: false
public MatrixComparatorProvider<?> getSortAscending()
public void setSortAscending(MatrixComparatorProvider<?> sorter)
sorter - the comparator provider used to return an sorter of the ascending order.public void setSortAscending(String clsnm) throws ClassNotFoundException, InstantiationException, IllegalAccessException
public MatrixComparatorProvider<?> getSortDescending()
public void setSortDescending(MatrixComparatorProvider<?> sorter)
sorter - he comparator provider used to return an sorter of the
descending order.public void setSortDescending(String clsnm) throws ClassNotFoundException, InstantiationException, IllegalAccessException
public String getOddRowSclass()
Default: getZclass()-odd.
public void setOddRowSclass(String scls)
public int getPreloadSize()
Default: 50
public int getRows()
Default: 30
public void setRows(int rows)
Default: 30, and it will be adjusted by client engine according with the browser height.
public int getCols()
Default: 30
public void setCols(int cols)
Default: 30, and it will be adjusted by client engine according with the browser width.
public String getRowHeight()
Default: 30px
public void setRowHeight(String rowHeight)
Default: 32px
public String getColWidth()
Default: 60px
public void setColWidth(String colWidth)
Default: 60px
public MatrixModel<?,?,?,?> getModel()
public void setModel(MatrixModel<?,?,?,?> model)
Note: the matrix model must implement Selectable interface
public void onInitRender()
public <T> MatrixRenderer<T> getRealMatrixRenderer()
getMatrixRenderer() is null,
the default implementation is assumed.public <T> MatrixRenderer<T> getMatrixRenderer()
public void setMatrixRenderer(MatrixRenderer<?> renderer)
public void setMatrixRenderer(String clsnm) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException
clsnm - the full package nameClassNotFoundExceptionNoSuchMethodExceptionIllegalAccessExceptionInstantiationExceptionInvocationTargetExceptionpublic void invalidate()
invalidate in interface org.zkoss.zk.ui.Componentinvalidate in class org.zkoss.zk.ui.AbstractComponentprotected boolean isChildable()
isChildable in class org.zkoss.zk.ui.AbstractComponentpublic int getSelectedIndex()
public Object getSelectedObject()
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class org.zkoss.zul.impl.XulElementIOExceptionpublic String getZclass()
getZclass in class org.zkoss.zk.ui.HtmlBasedComponentpublic 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 onSort(SortEventExt event)
public org.zkoss.zul.ext.Sortable getSortableModel()
public boolean sort(boolean ascending,
int columnIndex)
public 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 void onPageAttached(org.zkoss.zk.ui.Page newpage,
org.zkoss.zk.ui.Page oldpage)
onPageAttached in interface org.zkoss.zk.ui.sys.ComponentCtrlonPageAttached in class org.zkoss.zk.ui.AbstractComponentpublic void onPageDetached(org.zkoss.zk.ui.Page page)
onPageDetached in interface org.zkoss.zk.ui.sys.ComponentCtrlonPageDetached in class org.zkoss.zk.ui.AbstractComponentCopyright © 2026. All rights reserved.