public class BuilderUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
computeAngle(javafx.scene.shape.Line line)
Computes the angle (in degrees) of a Line.
|
static double |
computeAngle(javafx.scene.shape.Path path)
Computes the angle (in degrees) of the last path element of a Path.
|
static double |
computeAngle(javafx.geometry.Point2D p1,
javafx.geometry.Point2D p2)
Computes the angle (in degrees) of the vector from
p1 to p2 . |
static double |
computeAngle(javafx.scene.shape.Polyline polyline)
Computes the angle (in degrees) of the last segment of a polyline.
|
static javafx.scene.text.Font |
getTextFont(javafx.scene.Node node)
Computes the Font of a text or a TextHBox.
|
static double |
getTextWidth(javafx.scene.Node node)
Computes the width of a text or a TextHBox.
|
static double |
getTextWidth(javafx.scene.text.Text text)
Computes the width of a text.
|
static double |
getTextX(javafx.scene.Node node)
Computes the X position of a text or a TextHBox.
|
static double |
getTextY(javafx.scene.Node node)
Computes the Y position of a text or a TextHBox.
|
static java.lang.String |
removeNewLines(java.lang.String text)
Removes new lines from a text.
|
public static java.lang.String removeNewLines(java.lang.String text)
text
- the textpublic static double getTextWidth(javafx.scene.text.Text text)
text
- the textpublic static double getTextWidth(javafx.scene.Node node)
node
- the text or TextHBoxpublic static javafx.scene.text.Font getTextFont(javafx.scene.Node node)
node
- the text or TextHBoxpublic static double getTextX(javafx.scene.Node node)
node
- the text or TextHBoxpublic static double getTextY(javafx.scene.Node node)
node
- the text or TextHBoxpublic static double computeAngle(javafx.geometry.Point2D p1, javafx.geometry.Point2D p2)
p1
to p2
. The angle will be in the range
0
(inclusive) to 360
(exclusive) as measured counterclockwise from the positive x-axis.p1
- the start pointp2
- the end pointpublic static double computeAngle(javafx.scene.shape.Line line)
line
- the linepublic static double computeAngle(javafx.scene.shape.Polyline polyline)
polyline
- the polylinepublic static double computeAngle(javafx.scene.shape.Path path)
path
- the PathCopyright © 2021, 2022, 2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence