Class TreeNodeViewSkin<T>

java.lang.Object
javafx.scene.control.SkinBase<TreeNodeView<T>>
com.dlsc.gemsfx.treeview.TreeNodeViewSkin<T>
Type Parameters:
T - the type of the value stored in each tree node
All Implemented Interfaces:
javafx.scene.control.Skin<TreeNodeView<T>>

public class TreeNodeViewSkin<T> extends javafx.scene.control.SkinBase<TreeNodeView<T>>
Default skin for TreeNodeView.

The skin computes node positions for regular and compact layouts, creates cells through the view's cell factory, and draws links using the configured link strategy.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a skin for the given tree node view.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double
    computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
     
    protected double
    computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
     
    double
    Computes the height used to lay out the given node.
    double
    Computes the width used to lay out the given node.
    protected double
    computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
     
    protected double
    computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
     
    void
    Rebuilds the visual tree.

    Methods inherited from class javafx.scene.control.SkinBase

    computeBaselineOffset, computeMinHeight, computeMinWidth, consumeMouseEvents, dispose, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TreeNodeViewSkin

      public TreeNodeViewSkin(TreeNodeView<T> view)
      Creates a skin for the given tree node view.
      Parameters:
      view - the control shown by this skin
  • Method Details

    • computeNodeWidth

      public double computeNodeWidth(TreeNode<T> node)
      Computes the width used to lay out the given node.
      Parameters:
      node - the node whose width is computed
      Returns:
      the node-specific width or the view's default cell width
    • computeNodeHeight

      public double computeNodeHeight(TreeNode<T> node)
      Computes the height used to lay out the given node.
      Parameters:
      node - the node whose height is computed
      Returns:
      the node-specific height or the view's default cell height
    • computePrefWidth

      protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computePrefWidth in class javafx.scene.control.SkinBase<TreeNodeView<T>>
    • computePrefHeight

      protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computePrefHeight in class javafx.scene.control.SkinBase<TreeNodeView<T>>
    • computeMaxWidth

      protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxWidth in class javafx.scene.control.SkinBase<TreeNodeView<T>>
    • computeMaxHeight

      protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxHeight in class javafx.scene.control.SkinBase<TreeNodeView<T>>
    • refresh

      public void refresh()
      Rebuilds the visual tree.