public final class ArrowCreator extends Object
| Modifier and Type | Method and Description |
|---|---|
Shape |
buildHeadShape(double x0,
double y0,
double x1,
double y1,
double shaftWidth)
Build the shape of an arrow head, based on the current settings
of this arrow creator
|
Shape |
buildLines(double x0,
double y0,
double x1,
double y1)
Build a simple arrow that only consists of lines, from the start
to the end, and from the head tips to the end.
|
Shape |
buildLines(Line2D line)
Build a simple arrow that only consists of lines, from the start
to the end, and from the head tips to the end.
|
Shape |
buildLines(Point2D p0,
Point2D p1)
Build a simple arrow that only consists of lines, from the start
to the end, and from the head tips to the end.
|
Shape |
buildShape(double x0,
double y0,
double x1,
double y1,
double shaftWidth)
Build the shape of an arrow, based on the current settings
of this arrow creator
|
Shape |
buildShape(Line2D line,
double shaftWidth)
Build the shape of an arrow, based on the current settings
of this arrow creator
|
Shape |
buildShape(Point2D p0,
Point2D p1,
double shaftWidth)
Build the shape of an arrow, based on the current settings
of this arrow creator
|
ArrowCreator |
setAbsoluteHeadLength(double headLength)
Set the absolute length of the arrow head
|
ArrowCreator |
setAbsoluteHeadWidth(double headWidth)
Set the absolute width of the arrow head
|
ArrowCreator |
setHeadBasePosition(double headBasePosition)
Set the position of the head base, as a value between 0 and 1.
|
ArrowCreator |
setRelativeHeadLength(double headLength)
Set the head length, relative to the length of the arrow,
usually as a value between 0 and 1
|
ArrowCreator |
setRelativeHeadLength(double headLength,
double minAbsolute,
double maxAbsolute)
Set the head length, relative to the length of the arrow,
usually as a value between 0 and 1, but with the given
absolute bounds
|
ArrowCreator |
setRelativeHeadWidth(double headWidth)
Set the head width, relative to the length of the arrow,
usually as a value between 0 and 1
|
ArrowCreator |
setRelativeHeadWidth(double headWidth,
double minAbsolute,
double maxAbsolute)
Set the head width, relative to the width of the arrow,
usually as a value between 0 and 1, but with the given
absolute bounds
|
public ArrowCreator setAbsoluteHeadLength(double headLength)
headLength - The head lengthpublic ArrowCreator setRelativeHeadLength(double headLength)
headLength - The head lengthpublic ArrowCreator setRelativeHeadLength(double headLength, double minAbsolute, double maxAbsolute)
headLength - The head lengthminAbsolute - The minimum head lengthmaxAbsolute - The maximum head lengthpublic ArrowCreator setAbsoluteHeadWidth(double headWidth)
headWidth - The head widthpublic ArrowCreator setRelativeHeadWidth(double headWidth)
headWidth - The head widthpublic ArrowCreator setRelativeHeadWidth(double headWidth, double minAbsolute, double maxAbsolute)
headWidth - The head widthminAbsolute - The minimum head widthmaxAbsolute - The maximum head widthpublic ArrowCreator setHeadBasePosition(double headBasePosition)
__
\ \__
\ \__
\ \_
--------------0--B-----1
/ __/
/ __/
/_/
headBasePosition - The head base positionpublic Shape buildShape(Line2D line, double shaftWidth)
line - The line for the arrowshaftWidth - The width of the shaftpublic Shape buildShape(Point2D p0, Point2D p1, double shaftWidth)
p0 - The start point of the arrowp1 - The end point of the arrowshaftWidth - The width of the shaftpublic Shape buildShape(double x0, double y0, double x1, double y1, double shaftWidth)
x0 - The x-coordinate of the start point of the arrowy0 - The y-coordinate of the start point of the arrowx1 - The x-coordinate of the end point of the arrowy1 - The y-coordinate of the end point of the arrowshaftWidth - The width of the shaftpublic Shape buildHeadShape(double x0, double y0, double x1, double y1, double shaftWidth)
x0 - The x-coordinate of the start point of the arrowy0 - The y-coordinate of the start point of the arrowx1 - The x-coordinate of the end point of the arrowy1 - The y-coordinate of the end point of the arrowshaftWidth - The width of the shaftpublic Shape buildLines(Line2D line)
line - The line for the arrowpublic Shape buildLines(Point2D p0, Point2D p1)
p0 - The start point of the arrowp1 - The end point of the arrowpublic Shape buildLines(double x0, double y0, double x1, double y1)
x0 - The x-coordinate of the start point of the arrowy0 - The y-coordinate of the start point of the arrowx1 - The x-coordinate of the end point of the arrowy1 - The y-coordinate of the end point of the arrowCopyright © 2017. All rights reserved.