com.icesoft.faces.component.tree

## Class TreeNode

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - com.icesoft.faces.component.tree.TreeNode

- All Implemented Interfaces:
    java.util.EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder

      public class TreeNode
      extends javax.faces.component.UIComponentBase
      implements javax.faces.component.NamingContainer

  TreeNode is a JSF component class that represents an ICEfaces tree node.

  The treeNode provides the template that be applied in rendering each node in the backing data model. The treeNode supports two facets: the icon facet and the content facet. The icon facet is intended to contain a graphic image that will serve as the icon for the node it represents. This image can be customized for each node, or default icons for leaf nodes, expand branch nodes, and contracted branch nodes will be used. The content facet can contain any collection of components. For each node in the tree's backing data model, the child components of the two facets will be rendered with state retrieved from the data model as configured in the JSP by the application developer.

  This component extends the JSF UIComponentBase and implements the JSF NamingContainer interface.

  By default this component is rendered by the "com.icesoft.faces.View" renderer type.
  Version:
    beta 1.0
  Author:
    Chris Brown

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `FACET_CONTENT` The name for the content facet of the TreeNode
    `static java.lang.String` | `FACET_ICON` The name for the icon facet of the TreeNode

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

    - ### Fields inherited from interface javax.faces.component.NamingContainer

      `SEPARATOR_CHAR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TreeNode()` Default no args constructor
    `TreeNode(javax.swing.tree.DefaultMutableTreeNode node, Tree trunk)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.faces.component.UIComponent` | `getContent()`
    `java.lang.String` | `getFamily()`
    `javax.faces.component.UIComponent` | `getIcon()`
    `javax.swing.tree.DefaultMutableTreeNode` | `getMutable()`
    `java.lang.String` | `getRendererType()`
    `Tree` | `getTree()`
    `void` | `setMutable(javax.swing.tree.DefaultMutableTreeNode mutable)`
    `void` | `setTree(Tree tree)`

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### FACET_CONTENT

          public static final java.lang.String FACET_CONTENT

      The name for the content facet of the TreeNode
      See Also:
        Constant Field Values

    - #### FACET_ICON

          public static final java.lang.String FACET_ICON

      The name for the icon facet of the TreeNode
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TreeNode

          public TreeNode()

      Default no args constructor

    - #### TreeNode

          public TreeNode(javax.swing.tree.DefaultMutableTreeNode node,
                          Tree trunk)

      Parameters:
        `node` -
        `trunk` -

  - ### Method Detail

    - #### getRendererType

          public java.lang.String getRendererType()

      Overrides:
        `getRendererType` in class `javax.faces.component.UIComponentBase`

    - #### getFamily

          public java.lang.String getFamily()

      Specified by:
        `getFamily` in class `javax.faces.component.UIComponent`

    - #### getMutable

          public javax.swing.tree.DefaultMutableTreeNode getMutable()

      Returns:
        default mutable tree node

    - #### setMutable

          public void setMutable(javax.swing.tree.DefaultMutableTreeNode mutable)

      Parameters:
        `mutable` -

    - #### getTree

          public Tree getTree()

      Returns:
        parent tree

    - #### setTree

          public void setTree(Tree tree)

      Parameters:
        `tree` -

    - #### getContent

          public javax.faces.component.UIComponent getContent()

      Returns:
        content

    - #### getIcon

          public javax.faces.component.UIComponent getIcon()

      Returns:
        icon

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.