org.eclnt.jsfserver.elements.impl

## Class FIXGRIDTreeItem

- java.lang.Object
- - org.eclnt.jsfserver.elements.impl.FIXGRIDItem
  - - org.eclnt.jsfserver.elements.impl.FIXGRIDTreeItem

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable, IFIXGRIDItem
  Direct Known Subclasses:
    DynBeanTreeUI.TreeNode, ServerFileBrowser.TreeNode, StreamStoreTreeUI.TreeNode, WorkplaceFunctionTree.FunctionNode

      public class FIXGRIDTreeItem
      extends FIXGRIDItem
      implements java.io.Serializable, java.lang.Comparable

  Base class for all items that are managed within a FIXGRIDTreeBinding scenario. The FIXGRIDTreeItem internally provides the following functions:
  (A) It may hold one ore more children.
  (B) It has a certain status - this is the either open/closed for "folder nodes" or endnode for "leaf nodes"
  (C) If has a certain level - this is the hierarchy level starting with "0" for top nodes.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `STATUS_CLOSED`
    `static int` | `STATUS_ENDNODE`
    `static int` | `STATUS_OPENED`

    - ### Fields inherited from class org.eclnt.jsfserver.elements.impl.FIXGRIDItem

      `ROWHEIGHT_DEFAULT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FIXGRIDTreeItem(FIXGRIDTreeItem parentNode)` Creates an item that is added as child to the parentNode item.
    `FIXGRIDTreeItem(FIXGRIDTreeItem parentNode, boolean asFirst)` Creates an item that is added as child to the parentNode item.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSubNode(FIXGRIDTreeItem subNode, boolean asFirst)`
    `void` | `addSubNode(FIXGRIDTreeItem subNode, int index)`
    `void` | `appendVisibleSubNodes(java.util.List<FIXGRIDTreeItem> list, int counter, int maxCounter)`
    `boolean` | `checkIfNodeHasAsParent(FIXGRIDTreeItem potencialParent)` Checks if the node that is passed as paramter is a parent of this node.
    `void` | `closeAllNodes()` Recursively closes this node and all nodes below.
    `void` | `collapseNode()` Collapses this node.
    `void` | `collapseNodeAndSubNodes()` Collapses all sub nodes for this tree item.
    `int` | `compareTo(java.lang.Object o)` Compare operation for sorting.
    `void` | `expandNode()` Expands this node.
    `void` | `expandNodeAndSubNodes()` Expands all sub nodes for this tree item.
    `java.util.Set<FIXGRIDTreeItem>` | `getAllContainedNodes()`
    `java.util.List<FIXGRIDTreeItem>` | `getChildNodes()`
    `java.lang.String` | `getImage()`
    `java.lang.String` | `getLevel()`
    `int` | `getLevelInt()` Hierarchy level the item has within the tree hierarchy.
    `FIXGRIDTreeItem` | `getParentNode()`
    `java.lang.String` | `getRequestfocus()` Internal use only.
    `java.lang.String` | `getStatus()`
    `int` | `getStatusInt()` Status of node, one of the STATUS_* constants defined for this class.
    `java.lang.String` | `getText()`
    `void` | `moveSubNodeBehind(FIXGRIDTreeItem subNode, FIXGRIDTreeItem refSubNode)` Change sequence of nodes within the parent node.
    `void` | `moveSubNodeInFront(FIXGRIDTreeItem subNode, FIXGRIDTreeItem refSubNode)` Change sequence of nodes within the parent node.
    `void` | `moveSubNodeOneDown(FIXGRIDTreeItem subNode)` See `moveSubNodeOneUp(FIXGRIDTreeItem)` - this is just the opposite direction of moving...
    `void` | `moveSubNodeOneUp(FIXGRIDTreeItem subNode)` Moves one child node up within its parent.
    `void` | `moveSubNodesOneDown(java.util.Set<FIXGRIDTreeItem> subNodes)` Move a set of nodes within its parent.
    `void` | `moveSubNodesOneUp(java.util.Set<FIXGRIDTreeItem> subNodes)` Move operation with a set of subNodes.
    `void` | `moveSubNodeToFirst(FIXGRIDTreeItem subNode)` Moves on subNode within its parent to the first child position.
    `void` | `moveSubNodeToLast(FIXGRIDTreeItem subNode)` Moves on subNode within its parent to the last child position.
    `void` | `onToggle()` Event that is passed from the client when the user open/close a folder node.
    `void` | `openAllParentNodes()` Opens all nodes that are parent nodes of this node.
    `void` | `processTREENDOEAction(ActionEvent event)` This is the central method that is called by default by client side TREENODE events.
    `void` | `removeAllChildNodes()` Removes all children of a certain node - without drill down.
    `void` | `removeAllChildNodes(boolean withDrillDown)`
    `void` | `removeNode()`
    `void` | `requestFocus()` Request the focus for the current tree node.
    `void` | `setImage(java.lang.String value)` Sets the image that is rendered for the node.
    `void` | `setLevel(int value)` Internal use only.
    `void` | `setStatus(int value)` Sets the status of the current node.
    `void` | `setText(java.lang.String value)` Sets tje text of the node.
    `void` | `toggleNode()`
    `protected void` | `toggleNodeAndScroll(ActionEvent event)`

    - ### Methods inherited from class org.eclnt.jsfserver.elements.impl.FIXGRIDItem

      `assignRowComponent, checkIfCellIsHighlighted, checkIfCellsAreHighlighted, getChangeIndex, getHighlightedCells, getRequestFocus, getRowHeight, getSelected, highlightCell, onRowDeselect, onRowDrop, onRowExecute, onRowPopupMenuItem, onRowPopupMenuLoad, onRowSelect, setRowHeight, setSelected, unhighlightAllCells, unhighlightCell, unrequestFocus`

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

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

- - ### Field Detail

    - #### STATUS_OPENED

          public static final int STATUS_OPENED

      See Also:
        Constant Field Values

    - #### STATUS_CLOSED

          public static final int STATUS_CLOSED

      See Also:
        Constant Field Values

    - #### STATUS_ENDNODE

          public static final int STATUS_ENDNODE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FIXGRIDTreeItem

          public FIXGRIDTreeItem(FIXGRIDTreeItem parentNode)

      Creates an item that is added as child to the parentNode item.

    - #### FIXGRIDTreeItem

          public FIXGRIDTreeItem(FIXGRIDTreeItem parentNode,
                                 boolean asFirst)

      Creates an item that is added as child to the parentNode item. Dependent on "asFirst" the new node is added either as last child ot as first child into the parent node.

  - ### Method Detail

    - #### setLevel

          public void setLevel(int value)

      Internal use only.

    - #### getLevelInt

          public int getLevelInt()

      Hierarchy level the item has within the tree hierarchy. Highest level of root node is -1, so that top level of contained nodes is level 0.

    - #### getLevel

          public java.lang.String getLevel()

    - #### setText

          public void setText(java.lang.String value)

      Sets tje text of the node.

    - #### getText

          public java.lang.String getText()

    - #### setImage

          public void setImage(java.lang.String value)

      Sets the image that is rendered for the node. Setting the image is optional.

    - #### getImage

          public java.lang.String getImage()

    - #### setStatus

          public void setStatus(int value)

      Sets the status of the current node. The status either is `STATUS_CLOSED`, `STATUS_OPENED` or `STATUS_ENDNODE`.

    - #### getStatusInt

          public int getStatusInt()

      Status of node, one of the STATUS_* constants defined for this class. Use the status to open/close folders from your logic.

    - #### getStatus

          public java.lang.String getStatus()

    - #### getRequestfocus

          public java.lang.String getRequestfocus()

      Internal use only.

    - #### requestFocus

          public void requestFocus()

      Request the focus for the current tree node.
      Specified by:
        `requestFocus` in interface `IFIXGRIDItem`
      Overrides:
        `requestFocus` in class `FIXGRIDItem`

    - #### getParentNode

          public FIXGRIDTreeItem getParentNode()

    - #### getChildNodes

          public java.util.List<FIXGRIDTreeItem> getChildNodes()

    - #### getAllContainedNodes

          public java.util.Set<FIXGRIDTreeItem> getAllContainedNodes()

      Returns:
        All the nodes that are children of this node - with drilling down recursively - # and the node itself.

    - #### appendVisibleSubNodes

          public void appendVisibleSubNodes(java.util.List<FIXGRIDTreeItem> list,
                                            int counter,
                                            int maxCounter)

    - #### processTREENDOEAction

          public void processTREENDOEAction(ActionEvent event)

      This is the central method that is called by default by client side TREENODE events. It automatically handles the event "toggle". In case of enhancing a TREENODE (e.g. adding drag & drop onto TREENODE level) you need to override this method and add the behavior for the specific event. In any case you need to call this super-implementation within your implementation!

    - #### removeAllChildNodes

          public void removeAllChildNodes()

      Removes all children of a certain node - without drill down.
      Please pay attention: the selection of grid items is automatically affected with the removal of items - you have to explicitly call it (e.g. by callind `FIXGRIDBinding.deselectCurrentSelection()`.

    - #### removeAllChildNodes

          public void removeAllChildNodes(boolean withDrillDown)

      Parameters:
        `withDrillDown` - If true then the removing is also done for all children which are contained below the node. Otherwise, if false, then only the children below the node are removed - the removing is not drilled down to all child node levels.
        Please pay attention: the selection of grid items is automatically affected with the removal of items - you have to explicitly call it (e.g. by callind `FIXGRIDBinding.deselectCurrentSelection()`.

    - #### removeNode

          public void removeNode()

    - #### addSubNode

          public void addSubNode(FIXGRIDTreeItem subNode,
                                 boolean asFirst)

    - #### addSubNode

          public void addSubNode(FIXGRIDTreeItem subNode,
                                 int index)

    - #### closeAllNodes

          public void closeAllNodes()

      Recursively closes this node and all nodes below.

    - #### openAllParentNodes

          public void openAllParentNodes()

      Opens all nodes that are parent nodes of this node. This function is required if you want to ensure that one node is visible. The node can only be visible if all parent nodes have the status `STATUS_OPENED`.

    - #### moveSubNodeToFirst

          public void moveSubNodeToFirst(FIXGRIDTreeItem subNode)

      Moves on subNode within its parent to the first child position.

    - #### moveSubNodeToLast

          public void moveSubNodeToLast(FIXGRIDTreeItem subNode)

      Moves on subNode within its parent to the last child position.

    - #### moveSubNodeOneUp

          public void moveSubNodeOneUp(FIXGRIDTreeItem subNode)

      Moves one child node up within its parent. This means that if the parent node holds the children N1,N2,N3,N4 then after calling N3.moveSubNodeOneUp() the child sequence will be N1,N3,N2,N4.

    - #### moveSubNodesOneUp

          public void moveSubNodesOneUp(java.util.Set<FIXGRIDTreeItem> subNodes)

      Move operation with a set of subNodes. See `moveSubNodeOneUp(FIXGRIDTreeItem)` for more information.

    - #### moveSubNodeOneDown

          public void moveSubNodeOneDown(FIXGRIDTreeItem subNode)

      See `moveSubNodeOneUp(FIXGRIDTreeItem)` - this is just the opposite direction of moving...

    - #### moveSubNodesOneDown

          public void moveSubNodesOneDown(java.util.Set<FIXGRIDTreeItem> subNodes)

      Move a set of nodes within its parent.

    - #### moveSubNodeInFront

          public void moveSubNodeInFront(FIXGRIDTreeItem subNode,
                                         FIXGRIDTreeItem refSubNode)

      Change sequence of nodes within the parent node.

    - #### moveSubNodeBehind

          public void moveSubNodeBehind(FIXGRIDTreeItem subNode,
                                        FIXGRIDTreeItem refSubNode)

      Change sequence of nodes within the parent node.

    - #### checkIfNodeHasAsParent

          public boolean checkIfNodeHasAsParent(FIXGRIDTreeItem potencialParent)

      Checks if the node that is passed as paramter is a parent of this node.

    - #### expandNodeAndSubNodes

          public void expandNodeAndSubNodes()

      Expands all sub nodes for this tree item. This method simulates the normal toggle processing, i.e. corresponding calls "onToggle" are made to the application. It exactly simulated the user opening one tree item after the other, recursively.

    - #### expandNode

          public void expandNode()

      Expands this node. The normal onToggle() method will be called as result.

    - #### collapseNode

          public void collapseNode()

      Collapses this node. The normal onToggle() method will be called as result.

    - #### collapseNodeAndSubNodes

          public void collapseNodeAndSubNodes()

      Collapses all sub nodes for this tree item. Counterpart of the `expandNodeAndSubNodes()` method.

    - #### onToggle

          public void onToggle()

      Event that is passed from the client when the user open/close a folder node. You may read sub-items into the tree as reaction. OVerride this method in your implementation.

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Compare operation for sorting.
      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### toggleNodeAndScroll

          protected void toggleNodeAndScroll(ActionEvent event)

    - #### toggleNode

          public void toggleNode()

Copyright © CaptainCasa Gmbh. All Rights Reserved.