|
||||||||||
| 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.Treechildren
public class Treechildren
A treechildren.
| Nested Class Summary | |
|---|---|
protected class |
Treechildren.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 | |
|---|---|
Treechildren()
|
|
| Method Summary | |
|---|---|
void |
beforeChildAdded(Component child,
Component refChild)
Default: does nothing. |
void |
beforeParentChanged(Component parent)
Default: does nothing. |
int |
getActivePage()
Deprecated. As of release 3.0.7, the page size is controlled by Tree.getPageSize() rather than this method.
It always return 0 since 3.0.7. |
int |
getItemCount()
Returns the number of child Treeitem
including all descendants. |
java.util.Collection |
getItems()
Returns a readonly list of all descending Treeitem
(children's children and so on). |
Treerow |
getLinkedTreerow()
Returns the Treerow that is associated with
this treechildren, or null if no such treerow. |
Treerow |
getLinkedTreerowApi()
Returns the Treerow that is associated with
this treechildren, or null if no such treerow. |
int |
getPageCount()
Deprecated. As of release 3.0.7, the page size is controlled by Tree.getPageSize() rather than this method.
It always return 1 since 3.0.7. |
int |
getPageSize()
Deprecated. As of release 3.0.7, the page size is controlled by Tree.getPageSize() rather than this method.
It always return -1 since 3.0.7. |
Tree |
getTree()
Returns the Tree instance containing this element. |
Tree |
getTreeApi()
Returns the Tree instance containing this element. |
int |
getVisibleBegin()
Deprecated. As of release 3.0.7, the page size is controlled by Tree.setPageSize(int) rather than this method.
It always returns 0 since 3.0.7 |
java.util.Iterator |
getVisibleChildrenIterator()
Returns an iterator to iterate thru all visible children. |
int |
getVisibleEnd()
Deprecated. As of release 3.0.7, the page size is controlled by Tree.setPageSize(int) rather than this method.
It always returns Integer.MAX_VALUE since 3.0.7 |
int |
getVisibleItemCount()
Returns the number of visible descendant Treeitem. |
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component. |
void |
invalidate()
Invalidates this component by setting the dirty flag such that it will be redraw the whole content later. |
boolean |
isVisible()
Returns whether this is visible. |
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 |
setActivePage(int pg)
Deprecated. As of release 3.0.7, the page size is controlled by Tree.setPageSize(int) rather than this method.
It always does nothing since 3.0.7 |
void |
setPageSize(int size)
Deprecated. As of release 3.0.7, the page size is controlled by Tree.setPageSize(int) rather than this method.
It always does nothing since 3.0.7 |
void |
setParent(Component parent)
Sets the parent component. |
void |
smartUpdate(java.lang.String name,
java.lang.String value)
Smart-updates a property with the specified value. |
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getCtrlKeys, getInnerAttrs, getOuterAttrs, 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 Treechildren()
| Method Detail |
|---|
public Tree getTree()
Tree instance containing this element.
public Tree getTreeApi()
Tree instance containing this element.
getTreeApi in interface Treechildrenpublic Treerow getLinkedTreerow()
Treerow that is associated with
this treechildren, or null if no such treerow.
In other words, it is Treeitem.getTreerow() of
AbstractComponent.getParent().
Treerow.getLinkedTreechildren()public Treerow getLinkedTreerowApi()
Treerow that is associated with
this treechildren, or null if no such treerow.
In other words, it is Treeitem.getTreerow() of
AbstractComponent.getParent().
getLinkedTreerowApi in interface TreechildrenTreerow.getLinkedTreechildren()public boolean isVisible()
Besides depends on AbstractComponent.setVisible(boolean), it also depends on
whether all its ancestors is open.
isVisible in interface ComponentisVisible in class AbstractComponentComponents.isRealVisible(org.zkoss.zk.ui.Component)public 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 Treechildrenpublic int getItemCount()
Treeitem
including all descendants. The same as getItems().size().
Note: the performance is no good.
getItemCount in interface Treechildrenpublic int getVisibleItemCount()
Treeitem.
Descendants include direct children, gran children and so on.
getVisibleItemCount in interface Treechildrenpublic 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 int getPageSize()
Tree.getPageSize() rather than this method.
It always return -1 since 3.0.7.
public void setPageSize(int size)
throws WrongValueException
Tree.setPageSize(int) rather than this method.
It always does nothing since 3.0.7
WrongValueExceptionpublic int getPageCount()
Tree.getPageSize() rather than this method.
It always return 1 since 3.0.7.
public int getActivePage()
Tree.getPageSize() rather than this method.
It always return 0 since 3.0.7.
public void setActivePage(int pg)
throws WrongValueException
Tree.setPageSize(int) rather than this method.
It always does nothing since 3.0.7
WrongValueExceptionpublic int getVisibleBegin()
Tree.setPageSize(int) rather than this method.
It always returns 0 since 3.0.7
public int getVisibleEnd()
Tree.setPageSize(int) rather than this method.
It always returns Integer.MAX_VALUE since 3.0.7
public void beforeParentChanged(Component parent)
AbstractComponent
beforeParentChanged in interface ComponentCtrlbeforeParentChanged in class AbstractComponentparent - the new parent. If null, it means detachment.ComponentCtrl.beforeParentChanged(org.zkoss.zk.ui.Component)public void setParent(Component parent)
ComponentNote: 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.
setParent in interface ComponentsetParent in class AbstractComponent
public void beforeChildAdded(Component child,
Component refChild)
AbstractComponent
beforeChildAdded in interface ComponentCtrlbeforeChildAdded in class AbstractComponentchild - the child to be added (never null).refChild - another child component that the new child
will be inserted before it. If null, the new child will be the
last child.ComponentCtrl.beforeChildAdded(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)public void invalidate()
ComponentIt can be called only in the request-processing and event-processing phases; excluding the redrawing phase.
invalidate in interface Componentinvalidate in class AbstractComponentpublic 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 name,
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 java.util.Iterator getVisibleChildrenIterator()
getVisibleItemCount(), it handles only the direct children.
Component developer only.
protected 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 HtmlBasedComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||