Class AbstractLinkStrategy<T>
java.lang.Object
com.dlsc.gemsfx.treeview.link.AbstractLinkStrategy<T>
- All Implemented Interfaces:
LinkStrategy<T>
- Direct Known Subclasses:
ClockHandLinkStrategy, CurvedLineLink, LogarithmicLink, PolyLineLink, QuadCurveLink, SimpleCatmullRomLink, SineWaveDecayLink, StraightLineLink
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleprotected doublecalculateAngle(double p1X, double p1Y, double p2X, double p2Y) protected doublecalculateAngle(javafx.geometry.Point2D p1, javafx.geometry.Point2D p2) protected doublecalculateAngle(javafx.scene.shape.LineTo lineTo1, javafx.scene.shape.LineTo lineTo2) protected voidcalculateEndPoints(TreeNodeView.LayoutDirection direction, javafx.geometry.Point2D parentPoint, double parentW, double parentH, javafx.geometry.Point2D childPoint, double childW, double childH, double nodeLineGap) protected javafx.scene.Nodeprotected abstract ArrayList<javafx.scene.Node> drawLink(TreeNodeView.LayoutDirection direction, double maxDimensionInLine, double startX, double startY, double endX, double endY, double vgap, double hgap) ArrayList<javafx.scene.Node> drawNodeLink(TreeNodeView.LayoutDirection direction, double maxDimensionInLine, TreeNode<T> parent, javafx.geometry.Point2D parentPoint, double parentW, double parentH, TreeNode<T> child, javafx.geometry.Point2D childPoint, double childW, double childH, double nodeLineGap, double vgap, double hgap) Draw node/path connectionsprotected doublegetTangentAngle(javafx.scene.shape.CubicCurve curve, double t) protected doublegetTangentAngle(javafx.scene.shape.CubicCurveTo curveTo, double t) protected doublegetTangentAngle(javafx.scene.shape.QuadCurve curve, double t)
-
Field Details
-
startX
protected double startX -
startY
protected double startY -
endX
protected double endX -
endY
protected double endY
-
-
Constructor Details
-
AbstractLinkStrategy
public AbstractLinkStrategy()
-
-
Method Details
-
calculateEndPoints
protected void calculateEndPoints(TreeNodeView.LayoutDirection direction, javafx.geometry.Point2D parentPoint, double parentW, double parentH, javafx.geometry.Point2D childPoint, double childW, double childH, double nodeLineGap) -
drawNodeLink
public ArrayList<javafx.scene.Node> drawNodeLink(TreeNodeView.LayoutDirection direction, double maxDimensionInLine, TreeNode<T> parent, javafx.geometry.Point2D parentPoint, double parentW, double parentH, TreeNode<T> child, javafx.geometry.Point2D childPoint, double childW, double childH, double nodeLineGap, double vgap, double hgap) Description copied from interface:LinkStrategyDraw node/path connections- Specified by:
drawNodeLinkin interfaceLinkStrategy<T>- Parameters:
maxDimensionInLine- max dimension in line; if left-to-right or right-to-left, it is width; if top-to-bottom or bottom-to-top, it is heightparent- parent nodeparentPoint- parent node positionparentW- parent node widthparentH- parent node heightchild- child nodechildPoint- child node positionchildW- child node widthchildH- child node heightnodeLineGap- node connections gapvgap- vertical gap: distance between parent and childhgap- horizontal gap: distance between child and child (same level/row)- Returns:
- Node/Path connections; these nodes may be lines and arrows; (The returned nodes should have both layoutX and layoutY already set.)
-
drawLink
protected abstract ArrayList<javafx.scene.Node> drawLink(TreeNodeView.LayoutDirection direction, double maxDimensionInLine, double startX, double startY, double endX, double endY, double vgap, double hgap) -
createSimpleArrow
protected javafx.scene.Node createSimpleArrow() -
calculateAngle
protected double calculateAngle()- Returns:
- Calculate the angle of the line between the start and end points.
-
calculateAngle
protected double calculateAngle(double p1X, double p1Y, double p2X, double p2Y) - Returns:
- Calculate the angle of the line between the p1 and p2.
-
calculateAngle
protected double calculateAngle(javafx.geometry.Point2D p1, javafx.geometry.Point2D p2) - Returns:
- Calculate the angle of the line between the points.
-
calculateAngle
protected double calculateAngle(javafx.scene.shape.LineTo lineTo1, javafx.scene.shape.LineTo lineTo2) -
getTangentAngle
protected double getTangentAngle(javafx.scene.shape.CubicCurve curve, double t) - Returns:
- Calculate the angle of the tangent of the curve at the given t.
-
getTangentAngle
protected double getTangentAngle(javafx.scene.shape.CubicCurveTo curveTo, double t) - Returns:
- Calculate the angle of the tangent of the curve at the given t.
-
getTangentAngle
protected double getTangentAngle(javafx.scene.shape.QuadCurve curve, double t) - Returns:
- Calculate the angle of the tangent of the curve at the given t.
-