org.apache.myfaces.custom.tree
Class HtmlTreeNode
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UICommand
javax.faces.component.html.HtmlCommandLink
org.apache.myfaces.custom.tree.HtmlTreeNode
- All Implemented Interfaces:
- javax.faces.component.ActionSource, javax.faces.component.StateHolder
public class HtmlTreeNode
- extends javax.faces.component.html.HtmlCommandLink
Represents a single node of a three. A custom html link component representing the expand/collapse icon
is held as a facet named expandCollapse
.
- Version:
- $Revision: 349252 $ $Date: 2005-11-27 11:06:34 -0500 (Sun, 27 Nov 2005) $
- Author:
- Oliver Rossmueller
Fields inherited from class javax.faces.component.UICommand |
COMPONENT_FAMILY |
Methods inherited from class javax.faces.component.html.HtmlCommandLink |
getAccesskey, getCharset, getCoords, getDir, getHreflang, getLang, getOnblur, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRel, getRev, getShape, getStyle, getStyleClass, getTabindex, getTarget, getTitle, getType, setAccesskey, setCharset, setCoords, setDir, setHreflang, setLang, setOnblur, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRel, setRev, setShape, setStyle, setStyleClass, setTabindex, setTarget, setTitle, setType |
Methods inherited from class javax.faces.component.UICommand |
addActionListener, broadcast, getAction, getActionListener, getActionListeners, getFamily, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionListener, setImmediate, setValue |
Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
- See Also:
- Constant Field Values
EXPAND_COLLAPSE_FACET
public static final java.lang.String EXPAND_COLLAPSE_FACET
- See Also:
- Constant Field Values
OPEN
public static final int OPEN
- See Also:
- Constant Field Values
OPEN_FIRST
public static final int OPEN_FIRST
- See Also:
- Constant Field Values
OPEN_LAST
public static final int OPEN_LAST
- See Also:
- Constant Field Values
OPEN_SINGLE
public static final int OPEN_SINGLE
- See Also:
- Constant Field Values
CLOSED
public static final int CLOSED
- See Also:
- Constant Field Values
CLOSED_FIRST
public static final int CLOSED_FIRST
- See Also:
- Constant Field Values
CLOSED_LAST
public static final int CLOSED_LAST
- See Also:
- Constant Field Values
CLOSED_SINGLE
public static final int CLOSED_SINGLE
- See Also:
- Constant Field Values
CHILD
public static final int CHILD
- See Also:
- Constant Field Values
CHILD_FIRST
public static final int CHILD_FIRST
- See Also:
- Constant Field Values
CHILD_LAST
public static final int CHILD_LAST
- See Also:
- Constant Field Values
LINE
public static final int LINE
- See Also:
- Constant Field Values
EMPTY
public static final int EMPTY
- See Also:
- Constant Field Values
HtmlTreeNode
public HtmlTreeNode()
getLevel
public int getLevel()
getMaxChildLevel
public int getMaxChildLevel()
getPath
public TreePath getPath()
setPath
public void setPath(TreePath path)
getTranslatedPath
int[] getTranslatedPath()
getUserObject
public java.lang.Object getUserObject()
setUserObject
public void setUserObject(java.lang.Object userObject)
isExpanded
public boolean isExpanded()
childrenAdded
void childrenAdded(int[] children,
javax.faces.context.FacesContext context)
childrenChanged
void childrenChanged(int[] children,
javax.faces.context.FacesContext context)
childrenRemoved
void childrenRemoved(int[] children)
setExpanded
public void setExpanded(boolean expanded)
toggleExpanded
public void toggleExpanded()
isSelected
public boolean isSelected()
setSelected
public void setSelected(boolean selected)
toggleSelected
public void toggleSelected()
getLayout
public int[] getLayout()
setLayout
public void setLayout(int[] layout)
setLayout
public void setLayout(int[] parentLayout,
int layout)
getExpandCollapseCommand
public HtmlTreeImageCommandLink getExpandCollapseCommand(javax.faces.context.FacesContext context)
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState
in interface javax.faces.component.StateHolder
- Overrides:
saveState
in class javax.faces.component.html.HtmlCommandLink
restoreState
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
- Specified by:
restoreState
in interface javax.faces.component.StateHolder
- Overrides:
restoreState
in class javax.faces.component.html.HtmlCommandLink
translatePath
protected static int[] translatePath(TreePath treePath,
TreeModel model)
translatePath
protected static TreePath translatePath(int[] path,
TreeModel model)
getTreeModel
protected TreeModel getTreeModel(javax.faces.context.FacesContext context)
getTree
protected HtmlTree getTree()
isLeaf
public boolean isLeaf(javax.faces.context.FacesContext context)
expandPath
public void expandPath(int[] translatedPath,
int current)
restoreItemState
public void restoreItemState(HtmlTreeNode node)
Copyright 2006 Apache Software Foundation. All Rights Reserved.