|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zkmax.zul.Biglistbox
public class Biglistbox
A component to handle a huge data sets and provides the same and as many as
the functionalities of 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
HtmlBasedComponent.ExtraCtrl |
| Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
AbstractComponent.Children |
| Field Summary |
|---|
| Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
_zclass |
| Fields inherited from interface org.zkoss.zk.ui.Component |
|---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
| Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl |
|---|
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE |
| Constructor Summary | |
|---|---|
Biglistbox()
|
|
| Method Summary | ||
|---|---|---|
int |
getCols()
Returns the columns' size of the viewport. |
|
java.lang.String |
getColWidth()
Returns the width of the single column Default: 60px |
|
int |
getFrozenCols()
Returns the size of the frozen columns. |
|
|
getMatrixRenderer()
Returns the matrix renderer. |
|
MatrixModel<?,?,?,?> |
getModel()
Returns the matrix model. |
|
java.lang.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. |
|
|
getRealMatrixRenderer()
Return the real matrix renderer, if getMatrixRenderer() is null,
the default implementation is assumed. |
|
java.lang.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). |
|
java.lang.Object |
getSelectedObject()
Returns the selected object. |
|
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. |
|
java.lang.String |
getZclass()
The default zclass is "z-biglistbox" |
|
void |
invalidate()
Invalidates this component by setting the dirty flag such that it will be redraw the whole content of this component and its dependences later. |
|
boolean |
isAutoCols()
Returns whether enables the auto adjusting cols size. |
|
boolean |
isAutoRows()
Returns whether enables the auto adjusting rows size. |
|
protected boolean |
isChildable()
Returns whether this component can have a child. |
|
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 |
onSort(SortEventExt event)
|
|
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing tags and children. |
|
void |
service(AuRequest request,
boolean everError)
Processes an AU request. |
|
void |
sessionDidActivate(Page page)
Notification that the session, which owns this component, has just been activated (a.k.a., deserialized). |
|
void |
sessionWillPassivate(Page page)
Notification that the session, which owns this component, is about to be passivated (a.k.a., serialized). |
|
void |
setAutoCols(boolean autoCols)
Sets whether enables the auto adjusting cols size. |
|
void |
setAutoRows(boolean autoRows)
Sets whether enables the auto adjusting rows size. |
|
void |
setCols(int cols)
Sets the columns' size of the viewport. |
|
void |
setColWidth(java.lang.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(java.lang.String clsnm)
Sets the matrix renderer from a class string. |
|
void |
setModel(MatrixModel<?,?,?,?> model)
Sets the matrix model. |
|
void |
setOddRowSclass(java.lang.String scls)
Sets the style class for the odd rows. |
|
void |
setRowHeight(java.lang.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(java.lang.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(java.lang.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)
|
|
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
clone, getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidth, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Biglistbox()
| Method Detail |
|---|
public 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(java.lang.String clsnm)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessExceptionpublic MatrixComparatorProvider<?> getSortDescending()
public void setSortDescending(MatrixComparatorProvider<?> sorter)
sorter - he comparator provider used to return an sorter of the
descending order.
public void setSortDescending(java.lang.String clsnm)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessExceptionpublic java.lang.String getOddRowSclass()
Default: getZclass()-odd.
public void setOddRowSclass(java.lang.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 java.lang.String getRowHeight()
Default: 30px
public void setRowHeight(java.lang.String rowHeight)
Default: 32px
public java.lang.String getColWidth()
Default: 60px
public void setColWidth(java.lang.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(java.lang.String clsnm)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException
clsnm - the full package name
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetExceptionpublic void invalidate()
ComponentIf the application is totally controlled by the server side (i.e., you don't write client codes), you rarely need to access this method.
It can be called only in the request-processing and event-processing phases. However, it is NOT allowed in the rendering phase.
invalidate in interface Componentinvalidate in class AbstractComponentprotected boolean isChildable()
AbstractComponentDefault: return true (means it can have children).
isChildable in class AbstractComponentpublic int getSelectedIndex()
public java.lang.Object getSelectedObject()
protected void renderProperties(ContentRenderer renderer)
throws java.io.IOException
HtmlBasedComponentSee also ZK Client-side Reference: Property Rendering
renderProperties in class XulElementjava.io.IOExceptionpublic java.lang.String getZclass()
getZclass in class HtmlBasedComponentHtmlBasedComponent.getSclass()
public void service(AuRequest request,
boolean everError)
HtmlBasedComponentDefault: it handles onClick, onDoubleClick, onRightClick onMove, onSize, onZIndex.
service in interface ComponentCtrlservice in class HtmlBasedComponenteverError - whether any error ever occurred before
processing this request.AbstractComponent.setAuService(org.zkoss.zk.au.AuService)public void onSort(SortEventExt event)
public Sortable getSortableModel()
public boolean sort(boolean ascending,
int columnIndex)
public void sessionWillPassivate(Page page)
ComponentCtrlNote: only root components are notified by this method.
sessionWillPassivate in interface ComponentCtrlsessionWillPassivate in class AbstractComponentpublic void sessionDidActivate(Page page)
ComponentCtrlNote: only root components are notified by this method.
sessionDidActivate in interface ComponentCtrlsessionDidActivate in class AbstractComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||