org.icefaces.ace.model.tree

## Class ListNodeDataModel

- java.lang.Object
- - javax.faces.model.DataModel<K>
  - - org.icefaces.ace.model.tree.NodeDataModel<javax.swing.tree.TreeNode>
    - - org.icefaces.ace.model.tree.ListNodeDataModel

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<javax.swing.tree.TreeNode>

      public class ListNodeDataModel
      extends NodeDataModel<javax.swing.tree.TreeNode>
      implements java.io.Serializable

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ListNodeDataModel(java.util.List<javax.swing.tree.TreeNode> nodeList)`
    `ListNodeDataModel(javax.swing.tree.TreeNode rootNode)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Iterator<java.util.Map.Entry<NodeKey,javax.swing.tree.TreeNode>>` | `children()`
    `KeySegmentConverter` | `getConverter()`
    `java.lang.Object` | `getWrappedData()`
    `void` | `insert(javax.swing.tree.TreeNode imNode, int index)` Insert a node as a child of the current node.
    `boolean` | `isLeaf()`
    `boolean` | `isMutable()`
    `boolean` | `isNodeAvailable()`
    `javax.swing.tree.TreeNode` | `navToChild(java.lang.Object keySegment)`
    `javax.swing.tree.TreeNode` | `navToKey(NodeKey key)`
    `javax.swing.tree.TreeNode` | `navToParent()`
    `void` | `remove(java.lang.Object segOrNode, boolean isSegment)` Remove a node from the children of the current node.
    `void` | `setConverter(KeySegmentConverter converter)`
    `void` | `setWrappedData(java.lang.Object data)`

    - ### Methods inherited from class org.icefaces.ace.model.tree.NodeDataModel

      `atNullRoot, getData, getEntry, getKey, getRowCount, getRowData, getRowIndex, isRowAvailable, setData, setKey, setRowIndex`

    - ### Methods inherited from class javax.faces.model.DataModel

      `addDataModelListener, getDataModelListeners, iterator, removeDataModelListener`

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### ListNodeDataModel

          public ListNodeDataModel(java.util.List<javax.swing.tree.TreeNode> nodeList)

    - #### ListNodeDataModel

          public ListNodeDataModel(javax.swing.tree.TreeNode rootNode)

  - ### Method Detail

    - #### getWrappedData

          public java.lang.Object getWrappedData()

      Specified by:
        `getWrappedData` in class `javax.faces.model.DataModel<javax.swing.tree.TreeNode>`

    - #### setWrappedData

          public void setWrappedData(java.lang.Object data)

      Specified by:
        `setWrappedData` in class `javax.faces.model.DataModel<javax.swing.tree.TreeNode>`

    - #### isMutable

          public boolean isMutable()

      Specified by:
        `isMutable` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### navToParent

          public javax.swing.tree.TreeNode navToParent()

      Specified by:
        `navToParent` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### navToKey

          public javax.swing.tree.TreeNode navToKey(NodeKey key)

      Specified by:
        `navToKey` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### navToChild

          public javax.swing.tree.TreeNode navToChild(java.lang.Object keySegment)

      Specified by:
        `navToChild` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### isNodeAvailable

          public boolean isNodeAvailable()

      Specified by:
        `isNodeAvailable` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### isLeaf

          public boolean isLeaf()

      Specified by:
        `isLeaf` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### children

          public java.util.Iterator<java.util.Map.Entry<NodeKey,javax.swing.tree.TreeNode>> children()

      Specified by:
        `children` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### getConverter

          public KeySegmentConverter getConverter()

      Specified by:
        `getConverter` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### setConverter

          public void setConverter(KeySegmentConverter converter)

      Specified by:
        `setConverter` in class `NodeDataModel<javax.swing.tree.TreeNode>`

    - #### insert

          public void insert(javax.swing.tree.TreeNode imNode,
                             int index)

      Description copied from class: `NodeDataModel`
      Insert a node as a child of the current node.
      Overrides:
        `insert` in class `NodeDataModel<javax.swing.tree.TreeNode>`
      Parameters:
        `imNode` - the node to be inserted
        `index` - the position index of the node among siblings

    - #### remove

          public void remove(java.lang.Object segOrNode,
                             boolean isSegment)

      Description copied from class: `NodeDataModel`
      Remove a node from the children of the current node.
      Overrides:
        `remove` in class `NodeDataModel<javax.swing.tree.TreeNode>`
      Parameters:
        `segOrNode` - the node to be removed or identifying key segment
        `isSegment` - identify if the first argument is a node or segment

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