Class SimpleCatmullRomLink<T>

java.lang.Object
com.dlsc.gemsfx.treeview.link.AbstractLinkStrategy<T>
com.dlsc.gemsfx.treeview.link.SimpleCatmullRomLink<T>
Type Parameters:
T - the type of the data value stored in each tree node
All Implemented Interfaces:
LinkStrategy<T>

public class SimpleCatmullRomLink<T> extends AbstractLinkStrategy<T>
A LinkStrategy that draws a smooth cubic Bézier curve between a parent and a child node.

The control points are placed half a gap away from the start and end points along the primary axis. A directional arrow is added at the child end and oriented along the curve's tangent.

  • Constructor Details

    • SimpleCatmullRomLink

      public SimpleCatmullRomLink()
      Creates a simple Catmull-Rom link strategy.
  • Method Details

    • drawLink

      protected ArrayList<javafx.scene.Node> drawLink(TreeNodeView.LayoutDirection direction, double maxDimensionInLine, double startX, double startY, double endX, double endY, double vgap, double hgap)
      Draws the link for the given start and end coordinates.
      Specified by:
      drawLink in class AbstractLinkStrategy<T>
      Parameters:
      direction - the layout direction
      maxDimensionInLine - the maximum node dimension in the active line
      startX - the x-coordinate of the link start
      startY - the y-coordinate of the link start
      endX - the x-coordinate of the link end
      endY - the y-coordinate of the link end
      vgap - the vertical gap between levels
      hgap - the horizontal gap between levels
      Returns:
      the nodes used to render the link