Class ArrowLineStyle
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.ui.style.LineStringStyle
-
- org.locationtech.jtstest.testbuilder.ui.style.SegmentStyle
-
- org.locationtech.jtstest.testbuilder.ui.style.ArrowLineStyle
-
- All Implemented Interfaces:
Style
public class ArrowLineStyle extends SegmentStyle
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Color
color
private static java.awt.Stroke
dashStroke
private static double
ENDPOINT_OFFSET
private static double
HEAD_ANGLE
private static double
HEAD_ANGLE_RAD
private static double
HEAD_COS
private static double
HEAD_LENGTH
private static double
HEAD_SIN
private static double
LINE_OFFSET
private static java.awt.Stroke
MID_ARROW_STROKE
static double
MIN_VISIBLE_LEN
-
Fields inherited from class org.locationtech.jtstest.testbuilder.ui.style.LineStringStyle
LINE, POLY_HOLE, POLY_SHELL
-
-
Constructor Summary
Constructors Constructor Description ArrowLineStyle(java.awt.Color color)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
isTooSmallToRender(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1)
protected void
paint(int index, java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, int lineType, Viewport vp, java.awt.Graphics2D gr)
protected void
paintMidpointArrow(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, Viewport viewport, java.awt.Graphics2D graphics)
protected void
paintOffsetArrow(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, Viewport viewport, java.awt.Graphics2D graphics)
-
Methods inherited from class org.locationtech.jtstest.testbuilder.ui.style.SegmentStyle
paint, paintLineString
-
Methods inherited from class org.locationtech.jtstest.testbuilder.ui.style.LineStringStyle
paint, paint
-
-
-
-
Field Detail
-
HEAD_ANGLE
private static final double HEAD_ANGLE
- See Also:
- Constant Field Values
-
HEAD_LENGTH
private static final double HEAD_LENGTH
- See Also:
- Constant Field Values
-
color
private java.awt.Color color
-
dashStroke
private static java.awt.Stroke dashStroke
-
MID_ARROW_STROKE
private static java.awt.Stroke MID_ARROW_STROKE
-
LINE_OFFSET
private static final double LINE_OFFSET
- See Also:
- Constant Field Values
-
ENDPOINT_OFFSET
private static final double ENDPOINT_OFFSET
- See Also:
- Constant Field Values
-
HEAD_ANGLE_RAD
private static final double HEAD_ANGLE_RAD
- See Also:
- Constant Field Values
-
HEAD_COS
private static final double HEAD_COS
-
HEAD_SIN
private static final double HEAD_SIN
-
MIN_VISIBLE_LEN
public static final double MIN_VISIBLE_LEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
paint
protected void paint(int index, java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, int lineType, Viewport vp, java.awt.Graphics2D gr) throws java.lang.Exception
- Specified by:
paint
in classSegmentStyle
p0
- the origin of the line segment, in view spacep1
- the termination of the line segment, in view space- Throws:
java.lang.Exception
-
paintMidpointArrow
protected void paintMidpointArrow(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, Viewport viewport, java.awt.Graphics2D graphics) throws java.awt.geom.NoninvertibleTransformException
- Throws:
java.awt.geom.NoninvertibleTransformException
-
paintOffsetArrow
protected void paintOffsetArrow(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, Viewport viewport, java.awt.Graphics2D graphics) throws java.awt.geom.NoninvertibleTransformException
- Throws:
java.awt.geom.NoninvertibleTransformException
-
isTooSmallToRender
private boolean isTooSmallToRender(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1)
-
-