All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.geom.Line2D.Float

java.lang.Object
    |
    +----java.awt.geom.Line2D
            |
            +----java.awt.geom.Line2D.Float

public static class Line2D.Float
extends Line2D
A line segment specified with float coordinates.


Variable Index

 o x1
The X coordinate of the start point of the line segment.
 o x2
The X coordinate of the end point of the line segment.
 o y1
The Y coordinate of the start point of the line segment.
 o y2
The Y coordinate of the end point of the line segment.

Constructor Index

 o Line2D.Float()
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
 o Line2D.Float(float, float, float, float)
Constructs and initializes a Line from the specified coordinates.
 o Line2D.Float(Point2D, Point2D)
Constructs and initializes a Line from the specified Points.

Method Index

 o getBounds2D()
Return the high precision bounding box of the shape.
 o getX1()
Returns the X coordinate of the start point in double precision.
 o getX2()
Returns the X coordinate of the end point in double precision.
 o getY1()
Returns the Y coordinate of the start point in double precision.
 o getY2()
Returns the Y coordinate of the end point in double precision.
 o setLine(double, double, double, double)
Sets the location of the endpoints of this line to the specified double coordinates.

Variables

 o x1
public float x1
The X coordinate of the start point of the line segment.

 o y1
public float y1
The Y coordinate of the start point of the line segment.

 o x2
public float x2
The X coordinate of the end point of the line segment.

 o y2
public float y2
The Y coordinate of the end point of the line segment.

Constructors

 o Line2D.Float
public Line2D.Float()
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).

 o Line2D.Float
public Line2D.Float(float x1,
                    float y1,
                    float x2,
                    float y2)
Constructs and initializes a Line from the specified coordinates.

 o Line2D.Float
public Line2D.Float(Point2D p1,
                    Point2D p2)
Constructs and initializes a Line from the specified Points.

Methods

 o getX1
public double getX1()
Returns the X coordinate of the start point in double precision.

Overrides:
getX1 in class Line2D
 o getY1
public double getY1()
Returns the Y coordinate of the start point in double precision.

Overrides:
getY1 in class Line2D
 o getX2
public double getX2()
Returns the X coordinate of the end point in double precision.

Overrides:
getX2 in class Line2D
 o getY2
public double getY2()
Returns the Y coordinate of the end point in double precision.

Overrides:
getY2 in class Line2D
 o setLine
public void setLine(double x1,
                    double y1,
                    double x2,
                    double y2)
Sets the location of the endpoints of this line to the specified double coordinates.

Overrides:
setLine in class Line2D
 o getBounds2D
public Rectangle2D getBounds2D()
Return the high precision bounding box of the shape.


All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature