Package org.zkoss.zul

Class Treecell

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl

    public class Treecell
    extends LabelImageElement
    A treecell.

    In XUL, treecell cannot have any child, but ZUL allows it. Thus, you could place any kind of children in it. They will be placed right after the image and label.

    Default getZclass(): z-treecell (since 5.0.0)

    Author:
    tomyeh
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent

        org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo
    • 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

        AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
    • Constructor Summary

      Constructors 
      Constructor Description
      Treecell()  
      Treecell​(java.lang.String label)  
      Treecell​(java.lang.String label, java.lang.String src)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void beforeParentChanged​(org.zkoss.zk.ui.Component parent)  
      java.lang.Object clone()  
      int getColumnIndex()
      Returns the column index of this cell, starting from 0.
      int getLevel()
      Returns the level this cell is.
      int getMaxlength()
      Returns the maximal length for this cell, which is decided by the corresponding getTreecol()'s Treecol.getMaxlength().
      int getSpan()
      Returns number of columns to span this cell.
      Tree getTree()
      Return the tree that owns this cell.
      Treecol getTreecol()
      Returns the tree column associated with this cell, or null if not available.
      java.lang.String getWidth()
      Returns the width which the same as getTreecol()'s width.
      java.lang.String getZclass()  
      protected void renderProperties​(org.zkoss.zk.ui.sys.ContentRenderer renderer)  
      void setHflex​(java.lang.String flex)
      Deprecated.
      as of release 6.0.0.
      void setSpan​(int span)
      Sets the number of columns to span this cell.
      void setWidth​(java.lang.String width)
      Deprecated.
      as of release 6.0.0.
      • Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getZindex, getZIndex, removeSclass, removeSclass, service, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
      • Methods inherited from class org.zkoss.zk.ui.AbstractComponent

        addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, 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, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Treecell

        public Treecell()
      • Treecell

        public Treecell​(java.lang.String label)
      • Treecell

        public Treecell​(java.lang.String label,
                        java.lang.String src)
    • Method Detail

      • getTree

        public Tree getTree()
        Return the tree that owns this cell.
      • getTreecol

        public Treecol getTreecol()
        Returns the tree column associated with this cell, or null if not available.
      • getColumnIndex

        public int getColumnIndex()
        Returns the column index of this cell, starting from 0.
      • getLevel

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

        public int getSpan()
        Returns number of columns to span this cell. Default: 1.
      • setSpan

        public void setSpan​(int span)
        Sets the number of columns to span this cell.

        It is the same as the colspan attribute of HTML TD tag.

      • getZclass

        public java.lang.String getZclass()
        Overrides:
        getZclass in class org.zkoss.zk.ui.HtmlBasedComponent
      • clone

        public java.lang.Object clone()
        Specified by:
        clone in interface org.zkoss.zk.ui.Component
        Overrides:
        clone in class LabelImageElement
      • getWidth

        public java.lang.String getWidth()
        Returns the width which the same as getTreecol()'s width.
        Overrides:
        getWidth in class org.zkoss.zk.ui.HtmlBasedComponent
      • setWidth

        public void setWidth​(java.lang.String width)
        Deprecated.
        as of release 6.0.0. To control the width of Treecell, please use HtmlBasedComponent.setWidth(String) instead.
        Overrides:
        setWidth in class org.zkoss.zk.ui.HtmlBasedComponent
      • setHflex

        public void setHflex​(java.lang.String flex)
        Deprecated.
        as of release 6.0.0. To control the hflex of Treecell, please use HtmlBasedComponent.setHflex(String) instead.
        Overrides:
        setHflex in class org.zkoss.zk.ui.HtmlBasedComponent
      • renderProperties

        protected void renderProperties​(org.zkoss.zk.ui.sys.ContentRenderer renderer)
                                 throws java.io.IOException
        Overrides:
        renderProperties in class LabelImageElement
        Throws:
        java.io.IOException
      • beforeParentChanged

        public void beforeParentChanged​(org.zkoss.zk.ui.Component parent)
        Specified by:
        beforeParentChanged in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        beforeParentChanged in class org.zkoss.zk.ui.AbstractComponent