Package armyc2.c5isr.graphics2d
Class Line2D.Float
java.lang.Object
armyc2.c5isr.graphics2d.Line2D
armyc2.c5isr.graphics2d.Line2D.Float
- All Implemented Interfaces:
 Serializable
- Enclosing class:
 Line2D
A line segment specified with float 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 startPoint2Dof thisLine2D.getP2()Returns the endPoint2Dof thisLine2D.doublegetX1()Returns the X coordinate of the start point in double precision.doublegetX2()Returns the X coordinate of the end point in double precision.doublegetY1()Returns the Y coordinate of the start point in double precision.doublegetY2()Returns the Y coordinate of the end point in double precision.voidsetLine(double x1, double y1, double x2, double y2) Sets the location of the end points of thisLine2Dto the specified double coordinates.voidsetLine(float x1, float y1, float x2, float y2) Sets the location of the end points of thisLine2Dto the specified float 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
- 
Float
public Float()Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).- Since:
 - 1.2
 
 - 
Float
Constructs and initializes a Line 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
 
 - 
Float
Constructs and initializes aLine2Dfrom the specifiedPoint2Dobjects.- Parameters:
 p1- the startPoint2Dof this line segmentp2- the endPoint2Dof 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 startPoint2Dof 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 endPoint2Dof thisLine2D. - 
setLine
Sets the location of the end points of thisLine2Dto the specified double coordinates. - 
setLine
Sets the location of the end points of thisLine2Dto the specified float 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
 
 - 
getBounds2D
- Overrides:
 getBounds2Din classLine2D- Since:
 - 1.2
 
 
 -