zul.sel
Class Treeitem

java.lang.Object
  extended by zk.Object
      extended by zk.Widget
          extended by zul.Widget
              extended by zul.sel.ItemWidget
                  extended by zul.sel.Treeitem

public class Treeitem
extends ItemWidget

A treeitem.

Event:

  1. onOpen is sent when a tree item is opened or closed by user.
  2. onDoubleClick is sent when user double-clicks the treeitem.
  3. onRightClick is sent when user right-clicks the treeitem.


Field Summary
 
Fields inherited from class zk.Widget
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName
 
Fields inherited from class zk.Object
$class, $oid
 
Method Summary
 Treecell getFirstCell()
          Returns the first treecell.
 String getImage()
          Returns the image of the Treecell it contains.
 String getLabel()
          Returns the label of the Treecell it contains, or null if no such cell.
 int getLevel()
          Returns the level this cell is.
 Tree getMeshWidget()
          Returns the mesh widget. i.e.
 Treeitem getParentItem()
          Returns the parent tree item, or null if this item is already the top level of the tree.
 Tree getTree()
          Returns the Tree.
 boolean isContainer()
          Returns whether the element is to act as a container which can have child elements.
 boolean isEmpty()
          Returns whether this element contains no child elements.
 boolean isOpen()
          Returns whether this container is open.
 Treeitem setImage(String image)
          Sets the image of the Treecell it contains.
 void setLabel(String label)
          Sets the label of the Treecell it contains.
 void setOpen(boolean open)
          Sets whether this container is open.
 
Methods inherited from class zul.sel.ItemWidget
getValue, isCheckable, isDisabled, isSelected, isStripeable_, setCheckable, setDisabled, setSelected, setValue
 
Methods inherited from class zul.Widget
afterKeyDown_, beforeCtrlKeys_, getContext, getCtrlKeys, getOpenTooltip, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from class zk.Widget
$, $f, $f, $f, $init, $n, $n, $o, afterAnima_, afterParentChanged_, appendChild, appendChild, beforeParentChanged_, beforeSendAU_, bind_, bind, bindChildren_, bindDoubleTap_, bindSwipe_, bindTapHold_, canActivate, cleanDrag_, clear, clearCache, cloneDrag_, deferRedrawHTML_, detach, doBlur_, doClick_, doDoubleClick_, doFocus_, doKeyDown_, doKeyPress_, doKeyUp_, domAttrs_, domClass_, domListen_, doMouseDown_, doMouseMove_, doMouseOut_, doMouseOver_, doMouseUp_, domStyle_, domTextStyleAttr_, domTooltiptext_, domUnlisten_, doRightClick_, doSelect_, doSwipe_, doTooltipOut_, doTooltipOver_, dropEffect_, extraBind_, fire, fireX, focus_, focus, forcerender, fromPageCoord, get, getAction, getCaveNode, getChildAt, getChildIndex, getClass, getDraggable, getDragMessage_, getDragNode, getDragOptions_, getDrop_, getDroppable, getElementsById, getElementsByName, getFirstNode_, getFloatZIndex_, getHeight, getHflex, getId, getLeft, getMold, getOldWidget_, getPage, getRenderdefer, getSclass, getScrollLeft, getScrollTop, getStyle, getTextNode, getTooltiptext, getTop, getTopWidget, getVflex, getWidth, getZclass, getZIndex, hide, ignoreDescendantFloatUp_, ignoreDrag_, initDrag_, insertBefore, insertChildHTML_, isAutoId, isBinding, isFloating_, isListen, isRealVisible, isRealVisible, isVisible, isVisible, isWatchable_, listen, listenOnFitSize_, mimicMouseDown_, newInstance, nextUuid, onChildAdded_, onChildRemoved_, onChildRenderDefer_, onChildReplaced_, onChildVisible_, onDrop_, redraw, redrawHTML_, register, removeChild, removeChild, removeChildHTML_, removeHTML_, replaceCavedChildren_, replaceChildHTML_, replaceHTML, replaceWidget, rerender, rerender, scrollIntoView, sendAU_, set, set, setAction, setChildren, setDomVisible_, setDraggable, setDroppable, setFloating_, setFloatZIndex_, setHeight, setHflex, setId, setLeft, setListener, setListener, setListeners, setMold, setRenderdefer, setSclass, setScrollLeft, setScrollTop, setStyle, setTooltiptext, setTop, setTopmost, setVflex, setVisible, setWidth, setZclass, setZIndex, shallChildROD_, shallIgnoreClick_, show, smartUpdate, unbind_, unbind, unbindChildren_, unbindDoubleTap_, unbindSwipe_, unbindTapHold_, uncloneDrag_, unlisten, unlistenOnFitSize_, updateDomClass_, updateDomStyle_, uuid, zsync
 
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setOpen

public void setOpen(boolean open)
Sets whether this container is open.

Parameters:
open -

isOpen

public boolean isOpen()
Returns whether this container is open.

Default: true.

Returns:
boolean

isContainer

public boolean isContainer()
Returns whether the element is to act as a container which can have child elements.

Returns:
boolean

isEmpty

public boolean isEmpty()
Returns whether this element contains no child elements.

Returns:
boolean

getLevel

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

Returns:
int

getLabel

public String getLabel()
Returns the label of the Treecell it contains, or null if no such cell.

Overrides:
getLabel in class ItemWidget
Returns:
String

setLabel

public void setLabel(String label)
Sets the label of the Treecell it contains.

If it is not created, we automatically create it.

Parameters:
label -

getFirstCell

public Treecell getFirstCell()
Returns the first treecell.

Returns:
Treecell

getImage

public String getImage()
Returns the image of the Treecell it contains.

Returns:
String

setImage

public Treeitem setImage(String image)
Sets the image of the Treecell it contains.

If it is not created, we automatically create it.

Parameters:
image -
Returns:
Treeitem

getParentItem

public Treeitem getParentItem()
Returns the parent tree item, or null if this item is already the top level of the tree. The parent tree item is actually the grandparent if any.

Returns:
Treeitem

getMeshWidget

public Tree getMeshWidget()
Returns the mesh widget. i.e. Tree

Overrides:
getMeshWidget in class ItemWidget
Returns:
Tree

getTree

public Tree getTree()
Returns the Tree.

Returns:
Tree
See Also:
getMeshWidget()


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