|
||||||||||
| 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.zul.Tree
public class Tree
A container which can be used to hold a tabular or hierarchical set of rows of elements.
Event:
Default getZclass(): z-tree, and an other option is z-dottree. (since 3.5.0)
| Nested Class Summary | |
|---|---|
protected class |
Tree.ExtraCtrl
A utility class to implement AbstractComponent.getExtraCtrl(). |
| 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, RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH |
| Fields inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
_visible |
| Fields inherited from interface org.zkoss.zk.ui.Component |
|---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
| Constructor Summary | |
|---|---|
Tree()
|
|
| Method Summary | |
|---|---|
void |
addItemToSelection(Treeitem item)
Selects the given item, without deselecting any other items that are already selected.. |
void |
addItemToSelectionApi(Treeitem itemApi)
Selects the given item, without deselecting any other items that are already selected.. |
void |
clear()
Clears all child tree items ( Treeitem. |
void |
clearSelection()
Clears the selection. |
java.lang.Object |
clone()
Clones the component. |
int |
getActivePage()
Returns the active page (starting from 0). |
protected java.lang.Object |
getAssociatedNode(Treeitem ti,
Tree t)
Return a node which is an associated Treeitem ti in a Tree tree |
protected Component |
getChildByNode(java.lang.Object node)
Return the Tree or Treeitem component by a given associated node in model. |
java.util.Collection |
getHeads()
Returns a collection of heads, including getTreecols()
and auxiliary heads (Auxhead) (never null). |
java.lang.String |
getIconSclass()
Deprecated. As of release 3.5.0, replaced with getZclass() |
java.lang.String |
getInnerWidth()
Returns the inner width of this component. |
int |
getItemCount()
Returns the number of child Treeitem. |
java.util.Collection |
getItems()
Returns a readonly list of all descending Treeitem
(children's children and so on). |
TreeModel |
getModel()
Returns the list model associated with this tree, or null if this tree is not associated with any tree data model. |
java.lang.String |
getName()
Returns the name of this component. |
java.lang.String |
getOuterAttrs()
Returns the exterior attributes for generating the enclosing HTML tag; never return null. |
int |
getPageCount()
Returns the number of pages. |
int |
getPageSize()
Returns the page size, aka., the number items per page. |
Paginal |
getPaginal()
Returns the paging controller, or null if not available. |
Paging |
getPagingChild()
Returns the child paging controller that is created automatically, or null if mold is not "paging", or the controller is specified externally by setPaginal(org.zkoss.zul.ext.Paginal). |
Paging |
getPagingChildApi()
Returns the child paging controller that is created automatically, or null if mold is not "paging", or the controller is specified externally by setPaginal(org.zkoss.zul.ext.Paginal). |
java.lang.String |
getPagingPosition()
Returns how to position the paging of tree at the client screen. |
int |
getRows()
Returns the rows. |
int |
getSelectedCount()
Returns the number of items being selected. |
Treeitem |
getSelectedItem()
Returns the selected item. |
Treeitem |
getSelectedItemApi()
Returns the selected item. |
java.util.Set |
getSelectedItems()
Returns all selected items. |
java.lang.String |
getSeltype()
Returns the seltype. |
Treechildren |
getTreechildren()
Returns the treechildren that this tree owns (might null). |
Treechildren |
getTreechildrenApi()
Returns the treechildren that this tree owns (might null). |
Treecols |
getTreecols()
Returns the treecols that this tree owns (might null). |
Treecols |
getTreecolsApi()
Returns the treecols that this tree owns (might null). |
Treefoot |
getTreefoot()
Returns the treefoot that this tree owns (might null). |
Treefoot |
getTreefootApi()
Returns the treefoot that this tree owns (might null). |
TreeitemRenderer |
getTreeitemRenderer()
Returns the renderer to render each item, or null if the default renderer is used. |
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component. |
boolean |
insertBefore(Component newChild,
Component refChild)
Inserts a child before the reference child. |
boolean |
isCheckmark()
Returns whether the check mark shall be displayed in front of each item. |
boolean |
isFixedLayout()
Returns the outline of grid whether is fixed layout. |
boolean |
isMultiple()
Returns whether multiple selections are allowed. |
boolean |
isVflex()
Returns whether to grow and shrink vertical to fit their given space, so called vertial flexibility. |
protected java.lang.Object |
newExtraCtrl()
Used by AbstractComponent.getExtraCtrl() to create a client control. |
void |
onChildAdded(Component child)
Default: does nothing. |
void |
onChildRemoved(Component child)
Default: does nothing. |
void |
removeItemFromSelection(Treeitem item)
Deselects the given item without deselecting other items. |
void |
removeItemFromSelectionApi(Treeitem itemApi)
Deselects the given item without deselecting other items. |
void |
renderItem(Treeitem item)
Renders the specified Treeitem, if not loaded yet,
with getTreeitemRenderer(). |
void |
renderItem(Treeitem item,
java.lang.Object node)
Renders the specified Treeitem, if not loaded yet,
with getTreeitemRenderer(). |
void |
renderItemApi(Treeitem itemApi)
Renders the specified Treeitem, if not loaded yet,
with getTreeitemRenderer(). |
void |
renderItemApi(Treeitem itemApi,
java.lang.Object node)
Renders the specified Treeitem, if not loaded yet,
with getTreeitemRenderer(). |
Treeitem |
renderItemByPath(int[] path)
Load treeitems through path path Note: By using this method, all treeitems in path will be rendered and opened ( Treeitem.setOpen(boolean)). |
Treeitem |
renderItemByPathApi(int[] path)
Load treeitems through path path Note: By using this method, all treeitems in path will be rendered and opened ( Treeitem.setOpen(boolean)). |
void |
renderItems(java.util.Set items)
Renders the specified Treeitem if not loaded yet,
with getTreeitemRenderer(). |
void |
selectAll()
Selects all items. |
void |
selectItem(Treeitem item)
Deselects all of the currently selected items and selects the given item. |
void |
selectItemApi(Treeitem itemApi)
Deselects all of the currently selected items and selects the given item. |
void |
setActivePage(int pg)
Sets the active page (starting from 0). |
void |
setActivePage(Treeitem item)
Sets the active page in which the specified item is. |
void |
setActivePageApi(Treeitem itemApi)
Sets the active page in which the specified item is. |
void |
setCheckmark(boolean checkmark)
Sets whether the check mark shall be displayed in front of each item. |
void |
setFixedLayout(boolean fixedLayout)
Sets the outline of grid whether is fixed layout. |
void |
setIconSclass(java.lang.String scls)
Deprecated. As of release 3.5.0, replaced with HtmlBasedComponent.setZclass(String) |
void |
setInnerWidth(java.lang.String innerWidth)
Sets the inner width of this component. |
void |
setModel(TreeModel model)
Sets the tree model associated with this tree. |
void |
setMold(java.lang.String mold)
Sets the mold to render this component. |
void |
setMultiple(boolean multiple)
Sets whether multiple selections are allowed. |
void |
setName(java.lang.String name)
Sets the name of this component. |
void |
setPageSize(int pgsz)
Sets the page size, aka., the number items per page. |
void |
setPaginal(Paginal pgi)
Specifies the paging controller. |
void |
setPagingPosition(java.lang.String pagingPosition)
Sets how to position the paging of tree at the client screen. |
void |
setRows(int rows)
Sets the rows. |
void |
setSelectedItem(Treeitem item)
Deselects all of the currently selected items and selects the given item. |
void |
setSelectedItemApi(Treeitem itemApi)
Deselects all of the currently selected items and selects the given item. |
void |
setSeltype(java.lang.String seltype)
Sets the seltype. |
void |
setTreeitemRenderer(TreeitemRenderer renderer)
Sets the renderer which is used to render each item if getModel() is not null. |
void |
setVflex(boolean vflex)
Sets whether to grow and shrink vertical to fit their given space, so called vertial flexibility. |
void |
smartUpdate(java.lang.String attr,
java.lang.String value)
Smart-updates a property with the specified value. |
void |
toggleItemSelection(Treeitem item)
If the specified item is selected, it is deselected. |
void |
toggleItemSelectionApi(Treeitem itemApi)
If the specified item is selected, it is deselected. |
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getCtrlKeys, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getMoldSclass, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZindex, getZIndex, redraw, setClass, setDraggable, setDroppable, setFocus, setHeight, setLeft, setMoldSclass, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
|---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
|---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Constructor Detail |
|---|
public Tree()
| Method Detail |
|---|
public void setMold(java.lang.String mold)
Component
setMold in interface ComponentsetMold in class AbstractComponentmold - the mold. If null or empty, "default" is assumed.ComponentDefinitionpublic void setPagingPosition(java.lang.String pagingPosition)
setPagingPosition in interface TreepagingPosition - how to position. It can only be "bottom" (the default), or
"top", or "both".public java.lang.String getPagingPosition()
getPagingPosition in interface Paginatedpublic Paginal getPaginal()
AbstractComponent.getMold() is "paging".
If mold is "paging", this method never returns null, because
a child paging controller is created automcatically (if not specified
by developers with setPaginal(org.zkoss.zul.ext.Paginal)).
If a paging controller is specified (either by setPaginal(org.zkoss.zul.ext.Paginal),
or by setMold(java.lang.String) with "paging"),
the tree will rely on the paging controller to handle long-content
instead of scrolling.
getPaginal in interface Treepublic void setPaginal(Paginal pgi)
TreeComponent.getMold() is "paging".
It is OK, though without any effect, to specify a paging controller even if mold is not "paging".
setPaginal in interface Treepgi - the paging controller. If null and Component.getMold() is
"paging", a paging controller is created automatically as a
child component (see Tree.getPagingChildApi() ).public Paging getPagingChild()
setPaginal(org.zkoss.zul.ext.Paginal).
public Paging getPagingChildApi()
setPaginal(org.zkoss.zul.ext.Paginal).
getPagingChildApi in interface Treepublic int getPageSize()
getPageSize in interface Treejava.lang.IllegalStateException - if getPaginal() returns null,
i.e., mold is not "paging" and no external controller is specified.
public void setPageSize(int pgsz)
throws WrongValueException
Note: mold is not "paging" and no external controller is specified.
setPageSize in interface TreeWrongValueExceptionpublic int getPageCount()
getPageCount in interface Treepublic int getActivePage()
getActivePage in interface Tree
public void setActivePage(int pg)
throws WrongValueException
setActivePage in interface TreeWrongValueExceptionpublic void setFixedLayout(boolean fixedLayout)
You can also specify the "fixed-layout" attribute of component in lang-addon.xml directly, it's a top priority.
setFixedLayout in interface Treepublic boolean isFixedLayout()
Default: false.
Note: if the "fixed-layout" attribute of component is specified, it's prior to the original value.
isFixedLayout in interface Treepublic Treecols getTreecols()
public Treecols getTreecolsApi()
getTreecolsApi in interface Treepublic Treefoot getTreefoot()
public Treefoot getTreefootApi()
getTreefootApi in interface Treepublic Treechildren getTreechildren()
public Treechildren getTreechildrenApi()
getTreechildrenApi in interface Treepublic java.util.Collection getHeads()
getTreecols()
and auxiliary heads (Auxhead) (never null).
getHeads in interface Treepublic int getRows()
Default: 0.
getRows in interface Tree
public void setRows(int rows)
throws WrongValueException
Note: if both HtmlBasedComponent.setHeight(java.lang.String) is specified with non-empty,
setRows(int) is ignored
setRows in interface TreeWrongValueExceptionpublic java.lang.String getName()
Default: null.
The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
getName in interface Treepublic void setName(java.lang.String name)
The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
setName in interface Treename - the name of this component.public final boolean isCheckmark()
Default: false.
public void setCheckmark(boolean checkmark)
The check mark is a checkbox if isMultiple() returns
true. It is a radio button if isMultiple() returns false.
setCheckmark in interface Treepublic final boolean isVflex()
Note: this attribute is ignored if setRows(int) is specified
Default: false.
public void setVflex(boolean vflex)
Note: this attribute is ignored if setRows(int) is specified
setVflex in interface Treepublic void setInnerWidth(java.lang.String innerWidth)
Application developers rarely call this method, unless
they want to preserve the widths of sizable columns
changed by the user.
To preserve the widths, the developer have to store the widths of
all columns and the inner width (getInnerWidth()),
and then restore them when re-creating this component.
setInnerWidth in interface TreeinnerWidth - the inner width. If null, "100%" is assumed.public java.lang.String getInnerWidth()
Default: "100%"
getInnerWidth in interface TreesetInnerWidth(java.lang.String)public java.lang.String getSeltype()
Default: "single".
getSeltype in interface Tree
public void setSeltype(java.lang.String seltype)
throws WrongValueException
setSeltype in interface TreeWrongValueExceptionpublic boolean isMultiple()
Default: false.
isMultiple in interface Treepublic void setMultiple(boolean multiple)
setMultiple in interface Treepublic void setActivePage(Treeitem item)
item - the item to show. If the item is null, invisible, or doesn't belong
to the same tree, nothing happens.public void setActivePageApi(Treeitem itemApi)
setActivePageApi in interface TreeitemApi - assume as a Treeitempublic java.util.Collection getItems()
Treeitem
(children's children and so on).
Note: the performance of the size method of returned collection is no good.
getItems in interface Treepublic int getItemCount()
Treeitem.
The same as getItems().size().
Note: the performance of this method is no good.
getItemCount in interface Treepublic void selectItem(Treeitem item)
It is the same as setSelectedItem(org.zkoss.zul.Treeitem).
item - the item to select. If null, all items are deselected.public void selectItemApi(Treeitem itemApi)
It is the same as setSelectedItem(org.zkoss.zul.Treeitem).
selectItemApi in interface TreeitemApi - assume as a Treeitempublic void addItemToSelection(Treeitem item)
public void addItemToSelectionApi(Treeitem itemApi)
addItemToSelectionApi in interface TreeitemApi - assume as a Treeitempublic void removeItemFromSelection(Treeitem item)
public void removeItemFromSelectionApi(Treeitem itemApi)
removeItemFromSelectionApi in interface TreeitemApi - assume as a Treeitempublic void toggleItemSelection(Treeitem item)
public void toggleItemSelectionApi(Treeitem itemApi)
toggleItemSelectionApi in interface TreeitemApi - assume as a Treeitempublic void clearSelection()
clearSelection in interface Treepublic void selectAll()
selectAll in interface Treepublic Treeitem getSelectedItem()
public Treeitem getSelectedItemApi()
getSelectedItemApi in interface Treepublic void setSelectedItem(Treeitem item)
It is the same as selectItem(org.zkoss.zul.Treeitem).
public void setSelectedItemApi(Treeitem itemApi)
It is the same as selectItem(org.zkoss.zul.Treeitem).
setSelectedItemApi in interface TreeitemApi - assume as a Treeitempublic java.util.Set getSelectedItems()
getSelectedItems in interface Treepublic int getSelectedCount()
getSelectedCount in interface Treepublic void clear()
Treeitem.
Note: after clear, getTreechildren() won't be null, but
it has no child
clear in interface Treepublic java.lang.String getIconSclass()
getZclass()
Default: tree. Another builtin style class: dottree (the style used prior 3.0).
Assume that the icon style class is tree, then
the following style classes are used for the icons of each tree item:
public void setIconSclass(java.lang.String scls)
HtmlBasedComponent.setZclass(String)
getIconSclass()public java.lang.String getZclass()
HtmlBasedComponentDefault: null (the default value depends on element).
HtmlBasedComponent.setZclass(java.lang.String)) will completely replace the default style
of a component. In other words, the default style of a component
is associated with the default value of HtmlBasedComponent.getZclass().
Once it is changed, the default style won't be applied at all.
If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String)
instead.
getZclass in interface HtmlBasedComponentgetZclass in class HtmlBasedComponentHtmlBasedComponent.getSclass(),
HtmlBasedComponent.getRealSclass()
public void smartUpdate(java.lang.String attr,
java.lang.String value)
ComponentCtrlThe second invocation with the same property will replace the previous call. In other words, the same property will be set only once in each execution.
This method has no effect if Component.invalidate() is ever invoked
(in the same execution), since Component.invalidate() assumes
the whole content shall be redrawn and all smart updates to
this components can be ignored,
Once this method is called, all invocations to ComponentCtrl.smartUpdate(java.lang.String, java.lang.String)
will then be ignored, and Component.redraw(java.io.Writer) will be invoked later.
It can be called only in the request-processing and event-processing phases; excluding the redrawing phase.
There are two ways to draw a component, one is to invoke
Component.invalidate(), and the other is ComponentCtrl.smartUpdate(java.lang.String, java.lang.String).
While Component.invalidate() causes the whole content to redraw,
ComponentCtrl.smartUpdate(java.lang.String, java.lang.String) let component developer control which part
to redraw.
smartUpdate in interface ComponentCtrlsmartUpdate in class AbstractComponentvalue - the new value. If null, it means removing the property.ComponentCtrl.smartUpdateDeferred(java.lang.String, org.zkoss.zk.ui.util.DeferredValue),
ComponentCtrl.smartUpdateValues(java.lang.String, java.lang.Object[])
public boolean insertBefore(Component newChild,
Component refChild)
ComponentYou could use Component.setParent(org.zkoss.zk.ui.Component) or Component.appendChild(org.zkoss.zk.ui.Component)
instead of this method, unless
you want to control where to put the child.
Note: Component.setParent(org.zkoss.zk.ui.Component) always calls back Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)
and/or Component.removeChild(org.zkoss.zk.ui.Component),
while Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and Component.removeChild(org.zkoss.zk.ui.Component)
always calls back Component.setParent(org.zkoss.zk.ui.Component),
if the parent is changed. Thus, you don't need to override
both Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component) and Component.setParent(org.zkoss.zk.ui.Component), if you want
to customize the behavior.
insertBefore in interface ComponentinsertBefore in class AbstractComponentnewChild - the new child to be inserted.refChild - the child before which you want the new child
being inserted. If null, the new child is append to the end.
public void onChildAdded(Component child)
AbstractComponent
onChildAdded in interface ComponentCtrlonChildAdded in class AbstractComponentComponentCtrl.onChildAdded(org.zkoss.zk.ui.Component)public void onChildRemoved(Component child)
AbstractComponent
onChildRemoved in interface ComponentCtrlonChildRemoved in class AbstractComponentComponentCtrl.onChildRemoved(org.zkoss.zk.ui.Component)public java.lang.String getOuterAttrs()
HtmlBasedComponentUsed only by component developers.
Default: Generates the tooltip text, style, sclass, draggable
and droppable attribute if necessary.
In other words, the corresponding attribute is generated if
HtmlBasedComponent.getTooltiptext(), HtmlBasedComponent.getRealStyle(),
HtmlBasedComponent.getSclass(), HtmlBasedComponent.getDraggable(), HtmlBasedComponent.getDroppable()
are defined.
You have to call both HtmlBasedComponent.getOuterAttrs() and
HtmlBasedComponent.getInnerAttrs() to generate complete attributes.
For simple components that all attributes are put on the outest HTML element, all you need is as follows.
<xx id="${self.uuid}"${self.outerAttrs}${self.innerAttrs}>
If you want to put attributes in a nested HTML element, you
shall use the following pattern. Notice: if HtmlBasedComponent.getInnerAttrs()
in a different tag, the tag must be named with "${self.uuid}!real".
<xx id="${self.uuid}"${self.outerAttrs}>
<yy id="${self.uuid}!real"${self.innerAttrs}>...
Note: This class handles non-deferrable event listeners automatically.
However, you have to invoke AbstractComponent.appendAsapAttr(java.lang.StringBuffer, java.lang.String) for each event
the component handles in HtmlBasedComponent.getOuterAttrs() as follows.
appendAsapAttr(sb, Events.ON_OPEN);
appendAsapAttr(sb, Events.ON_CHANGE);
Theorectically, you could put any attributes in either
HtmlBasedComponent.getInnerAttrs() or HtmlBasedComponent.getOuterAttrs().
However, zkau.js assumes all attributes are put at the outer one.
If you want something different, you have to provide your own
setAttr (refer to how checkbox is implemented).
getOuterAttrs in class XulElementpublic java.lang.Object clone()
Component
clone in interface Componentclone in class AbstractComponentprotected java.lang.Object newExtraCtrl()
HtmlBasedComponentAbstractComponent.getExtraCtrl() to create a client control.
It is used only by component developers.
Defaut: creates an instance of HtmlBasedComponent.ExtraCtrl.
newExtraCtrl in class HtmlBasedComponentprotected Component getChildByNode(java.lang.Object node)
TreeModel.getPath(java.lang.Object, java.lang.Object) method to locate assoicated
Treeitem (or Tree) via path. You can override this method to speed up
performance if possible.
Return null, if the Tree or Treeitem is not yet rendered.
Author: jeffliu
public void setModel(TreeModel model)
Note: changing a render will not cause the tree to re-render.
If you want it to re-render, you could assign the same model again
(i.e., setModel(getModel())), or fire an TreeDataEvent event.
Author: jeffliu
setModel in interface Treemodel - the tree model to associate, or null to dis-associate
any previous model.
UiException - if failed to initialize with the modelpublic TreeModel getModel()
Author: jeffliu
getModel in interface Treepublic void setTreeitemRenderer(TreeitemRenderer renderer)
getModel() is not null.
Note: changing a render will not cause the tree to re-render.
If you want it to re-render, you could assign the same model again
(i.e., setModel(getModel())), or fire an TreeDataEvent event.
Author: jeffliu
setTreeitemRenderer in interface Treerenderer - the renderer, or null to use the default.
UiException - if failed to initialize with the modelpublic TreeitemRenderer getTreeitemRenderer()
getTreeitemRenderer in interface Treepublic void renderItem(Treeitem item)
Treeitem, if not loaded yet,
with getTreeitemRenderer().
It does nothing if getModel() returns null.
To unload treeitem, use Treeitem.unload().
renderItems(java.util.Set)public void renderItemApi(Treeitem itemApi)
Treeitem, if not loaded yet,
with getTreeitemRenderer().
It does nothing if getModel() returns null.
To unload treeitem, use Treeitem.unload().
renderItemApi in interface TreeitemApi - assume as a TreeitemrenderItems(java.util.Set)
public void renderItem(Treeitem item,
java.lang.Object node)
Treeitem, if not loaded yet,
with getTreeitemRenderer().
It does nothing if getModel() returns null.
Note: Since the corresponding node is given, This method has better performance than renderItem(Treeitem item) due to not searching for its corresponding node.
To unload treeitem, use Treeitem.unload().
renderItems(java.util.Set)
public void renderItemApi(Treeitem itemApi,
java.lang.Object node)
Treeitem, if not loaded yet,
with getTreeitemRenderer().
It does nothing if getModel() returns null.
Note: Since the corresponding node is given, This method has better performance than renderItem(Treeitem item) due to not searching for its corresponding node.
To unload treeitem, use Treeitem.unload().
renderItemApi in interface TreeitemApi - assume as a TreeitemrenderItems(java.util.Set)public void renderItems(java.util.Set items)
Treeitem if not loaded yet,
with getTreeitemRenderer().
It does nothing if getModel() returns null.
To unload treeitem, with Treeitem.unload().
renderItems in interface TreerenderItem(org.zkoss.zul.Treeitem)
protected java.lang.Object getAssociatedNode(Treeitem ti,
Tree t)
public Treeitem renderItemByPath(int[] path)
Treeitem.setOpen(boolean)). If you want to visit the rendered
item in paging mold, please invoke setActivePage(Treeitem).
path - - an int[] path, see TreeModel.getPath(java.lang.Object, java.lang.Object)
public Treeitem renderItemByPathApi(int[] path)
Treeitem.setOpen(boolean)). If you want to visit the rendered
item in paging mold, please invoke setActivePage(Treeitem).
renderItemByPathApi in interface Treepath - - an int[] path, see TreeModel.getPath(java.lang.Object, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||