Class TreeViewNodeRenderer

    • Constructor Detail

      • TreeViewNodeRenderer

        public TreeViewNodeRenderer()
    • Method Detail

      • render

        public void render​(java.lang.Object node,
                           Sequence.Tree.Path path,
                           int rowIndex,
                           TreeView treeView,
                           boolean expanded,
                           boolean selected,
                           TreeView.NodeCheckState checkState,
                           boolean highlighted,
                           boolean disabled)
        Description copied from interface: TreeView.NodeRenderer
        Prepares the renderer for layout or paint.
        Specified by:
        render in interface TreeView.NodeRenderer
        Parameters:
        node - The node value to render, or null if called to calculate preferred height for skins that assume a fixed renderer height.
        path - The path to the node being rendered, or null if node is null.
        rowIndex - The row index of the node being rendered, as seen in the current visible nodes list, or -1 if node is null.
        treeView - The host component.
        expanded - true if the node is expanded; false otherwise.
        selected - true if the node is selected; false otherwise.
        checkState - The node's check state.
        highlighted - true if the node is highlighted; false otherwise.
        disabled - true if the node is disabled; false otherwise.
      • toString

        public java.lang.String toString​(java.lang.Object node)
        Description copied from interface: TreeView.NodeRenderer
        Converts a tree node to a string representation.
        Specified by:
        toString in interface TreeView.NodeRenderer
        Parameters:
        node - The actual tree node data object.
        Returns:
        The node's string representation, or null if the node does not have a string representation.

        Note that this method may be called often during keyboard navigation, so implementations should avoid unnecessary string allocations.

      • getIconWidth

        public int getIconWidth()
      • setIconWidth

        public void setIconWidth​(int iconWidth)
      • getIconHeight

        public int getIconHeight()
      • setIconHeight

        public void setIconHeight​(int iconHeight)
      • getShowIcon

        public boolean getShowIcon()
      • setShowIcon

        public void setShowIcon​(boolean showIcon)
      • getFillIcon

        public boolean getFillIcon()
      • setFillIcon

        public void setFillIcon​(boolean fillIcon)
      • getTextBounds

        public Bounds getTextBounds()
        Gets the bounds of the text that is rendered by this renderer.
        Returns:
        The bounds of the rendered text, or null if this renderer did not render any text.