org.zkoss.zul
Class Treerow

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Treerow
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HtmlBasedComponent, Component, Scope, ComponentCtrl, Treerow, XulElement

public class Treerow
extends XulElement
implements Treerow

A treerow.

Default getZclass(): z-tree-row.(since 3.5.0)

Author:
tomyeh
See Also:
Serialized Form

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, 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
Treerow()
           
 
Method Summary
 void beforeChildAdded(Component child, Component refChild)
          Default: does nothing.
 void beforeParentChanged(Component parent)
          Default: does nothing.
 java.lang.String getContext()
          Returns the same as XulElement.getContext().
 int getLevel()
          Returns the level this cell is.
 Treechildren getLinkedTreechildren()
          Returns the Treechildren associated with this Treerow.
 Treechildren getLinkedTreechildrenApi()
          Returns the Treechildren associated with this Treerow.
 java.lang.String getOuterAttrs()
          Appends attributes for generating the real checkbox HTML tags (name="val"); Used only by component developers.
 java.lang.String getPopup()
          Returns the same as XulElement.getPopup().
protected  java.lang.String getRealSclass()
          Returns the real style class that will be generated to the client (when HtmlBasedComponent.getOuterAttrs() is called).
 java.lang.String getTooltip()
          Returns the same as XulElement.getTooltip().
 java.lang.String getTooltiptext()
          Returns the same as HtmlBasedComponent.getTooltiptext()
 Tree getTree()
          Returns the Tree instance containing this element.
 Tree getTreeApi()
          Returns the Tree instance containing this element.
 java.lang.String getZclass()
          Returns the ZK Cascading Style class(es) for this component.
protected  boolean isAsapRequired(java.lang.String evtnm)
          Returns if any non-deferrable (ASAP) event listener is registered for the specified event.
 boolean isVisible()
          Returns whether this is visible.
 void setContext(java.lang.String context)
          Alwasys throws UnsupportedOperationException since developers shall use XulElement.setContext(java.lang.String) instead.
 void setPopup(java.lang.String popup)
          Alwasys throws UnsupportedOperationException since developers shall use XulElement.setPopup(java.lang.String) instead.
 void setTooltip(java.lang.String tooltip)
          Alwasys throws UnsupportedOperationException since developers shall use XulElement.setTooltip(java.lang.String) instead.
 boolean setVisible(boolean visible)
          Sets whether this component is visible.
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getActionAttrs, getAllOnClickAttrs, getCtrlKeys, getInnerAttrs, setAction, setContext, setCtrlKeys, setPopup, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getMoldSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTop, getWidth, getZindex, getZIndex, newExtraCtrl, redraw, setClass, setDraggable, setDroppable, setFocus, setHeight, setLeft, setMoldSclass, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendAsapAttr, appendChild, applyProperties, beforeChildRemoved, clone, containsVariable, detach, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, hasFellow, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, newChildren, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setParent, setVariable, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable
 
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, getCtrlKeys, setAction, setContext, setCtrlKeys, setPopup, setTooltip
 
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent
focus, getHeight, getLeft, getSclass, getStyle, getTop, getWidth, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex
 
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setId, setMold, setPage, setPageBefore, setParent, setVariable, unsetVariable
 

Constructor Detail

Treerow

public Treerow()
Method Detail

getTree

public Tree getTree()
Returns the Tree instance containing this element.


getTreeApi

public Tree getTreeApi()
Returns the Tree instance containing this element.

Specified by:
getTreeApi in interface Treerow
Since:
3.5.2

getLevel

public int getLevel()
Returns the level this cell is. The root is level 0.

Specified by:
getLevel in interface Treerow

getLinkedTreechildren

public Treechildren getLinkedTreechildren()
Returns the Treechildren associated with this Treerow. In other words, it is Treeitem.getTreechildren() of AbstractComponent.getParent().

Since:
2.4.1
See Also:
Treechildren.getLinkedTreerow()

getLinkedTreechildrenApi

public Treechildren getLinkedTreechildrenApi()
Returns the Treechildren associated with this Treerow. In other words, it is Treeitem.getTreechildren() of AbstractComponent.getParent().

Specified by:
getLinkedTreechildrenApi in interface Treerow
Since:
3.5.2
See Also:
Treechildren.getLinkedTreerow()

getRealSclass

protected java.lang.String getRealSclass()
Description copied from class: HtmlBasedComponent
Returns the real style class that will be generated to the client (when HtmlBasedComponent.getOuterAttrs() is called).

Default: it simply returns the catenation of HtmlBasedComponent.getSclass() and HtmlBasedComponent.getZclass() (since 3.5.0).

Derived classes might override it to provide, say, dual style classes. For example,

final String sclass = getSclass();
return sclass != null ? sclass + " my-addon": "myaddon";

Overrides:
getRealSclass in class HtmlBasedComponent
See Also:
HtmlBasedComponent.getZclass()

getZclass

public java.lang.String getZclass()
Description copied from class: HtmlBasedComponent
Returns the ZK Cascading Style class(es) for this component. It usually depends on the implementation of the mold (@{link #getMold}).

Default: 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.

Specified by:
getZclass in interface HtmlBasedComponent
Overrides:
getZclass in class HtmlBasedComponent
See Also:
HtmlBasedComponent.getSclass(), HtmlBasedComponent.getRealSclass()

setContext

public void setContext(java.lang.String context)
Alwasys throws UnsupportedOperationException since developers shall use XulElement.setContext(java.lang.String) instead.

Specified by:
setContext in interface XulElement
Overrides:
setContext in class XulElement
See Also:
XulElement.setContext(Popup)

setPopup

public void setPopup(java.lang.String popup)
Alwasys throws UnsupportedOperationException since developers shall use XulElement.setPopup(java.lang.String) instead.

Specified by:
setPopup in interface XulElement
Overrides:
setPopup in class XulElement
See Also:
XulElement.setPopup(Popup)

setTooltip

public void setTooltip(java.lang.String tooltip)
Alwasys throws UnsupportedOperationException since developers shall use XulElement.setTooltip(java.lang.String) instead.

Specified by:
setTooltip in interface XulElement
Overrides:
setTooltip in class XulElement
See Also:
XulElement.setTooltip(Popup)

getContext

public java.lang.String getContext()
Returns the same as XulElement.getContext().

Specified by:
getContext in interface XulElement
Overrides:
getContext in class XulElement

getPopup

public java.lang.String getPopup()
Returns the same as XulElement.getPopup().

Specified by:
getPopup in interface XulElement
Overrides:
getPopup in class XulElement

getTooltip

public java.lang.String getTooltip()
Returns the same as XulElement.getTooltip().

Specified by:
getTooltip in interface XulElement
Overrides:
getTooltip in class XulElement

getTooltiptext

public java.lang.String getTooltiptext()
Returns the same as HtmlBasedComponent.getTooltiptext()

Specified by:
getTooltiptext in interface HtmlBasedComponent
Overrides:
getTooltiptext in class HtmlBasedComponent

isAsapRequired

protected boolean isAsapRequired(java.lang.String evtnm)
Description copied from class: AbstractComponent
Returns if any non-deferrable (ASAP) event listener is registered for the specified event. Returns true if you want the component (on the server) to process the event immediately.

Default: return true if any non-deferable event listener of the specified event is found. In other words, it returns Events.isListened(org.zkoss.zk.ui.Component, java.lang.String, boolean) with asap = true.

This method is moved from HtmlBasedComponent to AbstractComponent since 3.0.0.

Overrides:
isAsapRequired in class AbstractComponent
Parameters:
evtnm - the event name, such as onClick

getOuterAttrs

public java.lang.String getOuterAttrs()
Appends attributes for generating the real checkbox HTML tags (name="val"); Used only by component developers.

Overrides:
getOuterAttrs in class XulElement

isVisible

public boolean isVisible()
Returns whether this is visible. whether all its ancestors is open.

Specified by:
isVisible in interface Component
Overrides:
isVisible in class AbstractComponent
See Also:
Components.isRealVisible(org.zkoss.zk.ui.Component)

setVisible

public boolean setVisible(boolean visible)
Description copied from interface: Component
Sets whether this component is visible.

Specified by:
setVisible in interface Component
Overrides:
setVisible in class AbstractComponent
Returns:
the previous visibility

beforeParentChanged

public void beforeParentChanged(Component parent)
Description copied from class: AbstractComponent
Default: does nothing.

Specified by:
beforeParentChanged in interface ComponentCtrl
Overrides:
beforeParentChanged in class AbstractComponent
Parameters:
parent - the new parent. If null, it means detachment.
See Also:
ComponentCtrl.beforeParentChanged(org.zkoss.zk.ui.Component)

beforeChildAdded

public void beforeChildAdded(Component child,
                             Component refChild)
Description copied from class: AbstractComponent
Default: does nothing.

Specified by:
beforeChildAdded in interface ComponentCtrl
Overrides:
beforeChildAdded in class AbstractComponent
Parameters:
child - 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.
See Also:
ComponentCtrl.beforeChildAdded(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo