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.Colorcolorprivate static java.awt.StrokedashStrokeprivate static doubleENDPOINT_OFFSETprivate static doubleHEAD_ANGLEprivate static doubleHEAD_ANGLE_RADprivate static doubleHEAD_COSprivate static doubleHEAD_LENGTHprivate static doubleHEAD_SINprivate static doubleLINE_OFFSETprivate static java.awt.StrokeMID_ARROW_STROKEstatic doubleMIN_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 booleanisTooSmallToRender(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1)protected voidpaint(int index, java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, int lineType, Viewport vp, java.awt.Graphics2D gr)protected voidpaintMidpointArrow(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1, Viewport viewport, java.awt.Graphics2D graphics)protected voidpaintOffsetArrow(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:
paintin classSegmentStylep0- 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)
-
-