Class WebTreeControlDepictor<C extends TreeControl>

    • Field Detail

      • TREE_NODE_COLLAPSED_IMAGE_RESOURCE_KEY

        public static final java.lang.String TREE_NODE_COLLAPSED_IMAGE_RESOURCE_KEY
        The resource bundle key for the tree node expanded image URI.
        See Also:
        Constant Field Values
      • TREE_NODE_EXPANDED_IMAGE_RESOURCE_KEY

        public static final java.lang.String TREE_NODE_EXPANDED_IMAGE_RESOURCE_KEY
        The resource bundle key for the tree node collapsed image URI.
        See Also:
        Constant Field Values
      • TREE_NODE_LEAF_IMAGE_RESOURCE_KEY

        public static final java.lang.String TREE_NODE_LEAF_IMAGE_RESOURCE_KEY
        The resource bundle key for the tree node leaf image URI.
        See Also:
        Constant Field Values
    • Constructor Detail

      • WebTreeControlDepictor

        public WebTreeControlDepictor()
        Default constructor using the XHTML <div> element.
    • Method Detail

      • getTreeNodeID

        public long getTreeNodeID​(TreeNodeModel<?> treeNode)
        Determines the ID of the given tree node in this view. If the tree node has no ID assigned, one will be generated.
        Parameters:
        treeNode - The tree node for which an ID should be returned.
        Returns:
        The unique ID of the given tree node.
      • getTreeNode

        public TreeNodeModel<?> getTreeNode​(long treeNodeID)
        Determines the tree node associated with the given ID.
        Parameters:
        treeNodeID - An ID assigned to a tree node.
        Returns:
        The tree node associated with the given ID, or null if there is no tree node associated with the ID.
      • getTreeNodeStyleIDs

        protected <T> java.util.Set<java.lang.String> getTreeNodeStyleIDs​(TreeModel treeModel,
                                                                          TreeNodeModel<T> treeNode,
                                                                          java.lang.String prefix,
                                                                          java.lang.String suffix)
        Retrieves the style IDs for a tree node.
        Type Parameters:
        T - The type of value contained in the tree node. This version returns the base tree node style ID GuiseCSSStyleConstants.TREE_NODE_CLASS with the given prefix/suffix, if any, along with styles representing the expanded or collapsed state and whether the node is a leaf.
        Parameters:
        treeModel - The component model.
        treeNode - The tree node.
        prefix - The prefix that needs to be added to the base style, or null if there is no prefix to add.
        suffix - The suffix that needs to be added to the base style, or null if there is no suffix to add.
        Returns:
        The style IDs for the tree node.
      • updateTreeNodeView

        protected <T> void updateTreeNodeView​(TreeModel treeModel,
                                              TreeNodeModel<T> treeNode)
                                       throws java.io.IOException
        Updates the view of a tree node.
        Type Parameters:
        T - The type of value contained in the tree node.
        Parameters:
        treeModel - The component model.
        treeNode - The tree node.
        Throws:
        java.io.IOException - if there is an error updating the tree node view.
      • updateTreeNodeChildViews

        protected <T> void updateTreeNodeChildViews​(TreeModel treeModel,
                                                    TreeNodeModel<T> treeNode)
                                             throws java.io.IOException
        Updates the views of a tree node's children, if any.
        Type Parameters:
        T - The type of value contained in the tree node.
        Parameters:
        treeModel - The component model.
        treeNode - The tree node the views of the children of which should be updated.
        Throws:
        java.io.IOException - if there is an error updating the child tree node views.