Show the flaw by printing the error message.
Show the flaw by printing the error message.
the method where the error occurred
the error message
Get the x-coordinate of the center of the main line.
Get the x-coordinate of the center of the main line.
Get the y-coordinate of the center of the main line.
Get the y-coordinate of the center of the main line.
the length of the arrowhead on the line/arrow
Return the next point on the CurvilinearShape (one step beyond current point) and adjust from top-left to center coordinates for the object traversing the curve based on its width and height.
Return the next point on the CurvilinearShape (one step beyond current point) and adjust from top-left to center coordinates for the object traversing the curve based on its width and height. Return null if past end point. This is an optional method.
the width of object traversing the curve
the height of object traversing the curve
the starting point for the line/arrow
the ending point for the line/arrow
Set (or reset) the location for the Arrow as a line.
Set (or reset) the location for the Arrow as a line. The bend parameter is ignored for this class, since arrows are straight.
the starting point
the ending point
the bend or curvature (0. => straight line)
Set (or reset) the location for the Arrow as a line.
Set (or reset) the location for the Arrow as a line.
the starting point
the ending point
Set (or reset) the location for a line/curve using an explicitly given control point.
Set (or reset) the location for a line/curve using an explicitly given control point. This is an optional method.
The
Arrow
class uses Java's Path2D class to create a line with an arrowhead on the far end. The main line is defined by points 'p1' and 'p2'. Points 'p3' and 'p4' are the corners of the triangular arrowhead.the starting point for the line/arrow
the ending point for the line/arrow
the length of the arrowhead on the line/arrow