Package armyc2.c5isr.graphics2d
Class Line2D.Double
java.lang.Object
armyc2.c5isr.graphics2d.Line2D
armyc2.c5isr.graphics2d.Line2D.Double
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Line2D
A line segment specified with double coordinates.
- Since:
- 1.2
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class armyc2.c5isr.graphics2d.Line2D
Line2D.Double, Line2D.Float
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetP1()
Returns the startPoint2D
of thisLine2D
.getP2()
Returns the endPoint2D
of thisLine2D
.double
getX1()
Returns the X coordinate of the start point in double precision.double
getX2()
Returns the X coordinate of the end point in double precision.double
getY1()
Returns the Y coordinate of the start point in double precision.double
getY2()
Returns the Y coordinate of the end point in double precision.void
setLine
(double x1, double y1, double x2, double y2) Sets the location of the end points of thisLine2D
to the specified double coordinates.Methods inherited from class armyc2.c5isr.graphics2d.Line2D
clone, contains, contains, contains, contains, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, relativeCCW, relativeCCW, setLine, setLine
-
Field Details
-
x1
The X coordinate of the start point of the line segment.- Since:
- 1.2
-
y1
The Y coordinate of the start point of the line segment.- Since:
- 1.2
-
x2
The X coordinate of the end point of the line segment.- Since:
- 1.2
-
y2
The Y coordinate of the end point of the line segment.- Since:
- 1.2
-
-
Constructor Details
-
Double
public Double()Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).- Since:
- 1.2
-
Double
Constructs and initializes aLine2D
from the specified coordinates.- Parameters:
x1
- the X coordinate of the start pointy1
- the Y coordinate of the start pointx2
- the X coordinate of the end pointy2
- the Y coordinate of the end point- Since:
- 1.2
-
Double
Constructs and initializes aLine2D
from the specifiedPoint2D
objects.- Parameters:
p1
- the startPoint2D
of this line segmentp2
- the endPoint2D
of this line segment- Since:
- 1.2
-
-
Method Details
-
getX1
Returns the X coordinate of the start point in double precision. -
getY1
Returns the Y coordinate of the start point in double precision. -
getP1
Returns the startPoint2D
of thisLine2D
. -
getX2
Returns the X coordinate of the end point in double precision. -
getY2
Returns the Y coordinate of the end point in double precision. -
getP2
Returns the endPoint2D
of thisLine2D
. -
setLine
Sets the location of the end points of thisLine2D
to the specified double coordinates. -
getBounds2D
- Overrides:
getBounds2D
in classLine2D
- Since:
- 1.2
-