This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.awt.geom
class Line2D.Double

java.lang.Object extended by java.awt.geom.Line2D extended by java.awt.geom.Line2D.Double
All Implemented Interfaces:
Shape, Serializable, Cloneable
Enclosing class:
Line2D

public static class Line2D.Double
extends Line2D
implements Serializable

A line segment specified with double coordinates.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Line2D
Line2D.Double, Line2D.Float
   
Field Summary
 double x1
          The X coordinate of the start point of the line segment.
 double x2
          The X coordinate of the end point of the line segment.
 double y1
          The Y coordinate of the start point of the line segment.
 double y2
          The Y coordinate of the end point of the line segment.
 
Constructor Summary

          Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
Line2D.Double(double x1, double y1, double x2, double y2)

          Constructs and initializes a Line2D from the specified coordinates.

          Constructs and initializes a Line2D from the specified Point2D objects.
 
Method Summary
 Rectangle2D

          
 Point2D

          Returns the start Point2D of this Line2D.
 Point2D

          Returns the end Point2D of this Line2D.
 double

          Returns the X coordinate of the start point in double precision.
 double

          Returns the X coordinate of the end point in double precision.
 double

          Returns the Y coordinate of the start point in double precision.
 double

          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 this Line2D to the specified double coordinates.
 
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getP1, getP2, getPathIterator, getPathIterator, getX1, getX2, getY1, getY2, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine, setLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x1

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

x2

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

y1

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

y2

public double y2
The Y coordinate of the end point of the line segment.
Constructor Detail

Line2D.Double

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


Line2D.Double

public Line2D.Double(double x1,
                     double y1,
                     double x2,
                     double y2)
Constructs and initializes a Line2D from the specified coordinates.

Parameters:
x1 - the X coordinate of the start point
y1 - the Y coordinate of the start point
x2 - the X coordinate of the end point
y2 - the Y coordinate of the end point

Line2D.Double

public Line2D.Double(Point2D p1,
                     Point2D p2)
Constructs and initializes a Line2D from the specified Point2D objects.

Parameters:
p1 - the start Point2D of this line segment
p2 - the end Point2D of this line segment
Method Detail

getBounds2D

public Rectangle2D getBounds2D()
{@inheritDoc}


getP1

public Point2D getP1()
{@inheritDoc}

Overrides:
getP1 in class Line2D

getP2

public Point2D getP2()
{@inheritDoc}

Overrides:
getP2 in class Line2D

getX1

public double getX1()
{@inheritDoc}

Overrides:
getX1 in class Line2D

getX2

public double getX2()
{@inheritDoc}

Overrides:
getX2 in class Line2D

getY1

public double getY1()
{@inheritDoc}

Overrides:
getY1 in class Line2D

getY2

public double getY2()
{@inheritDoc}

Overrides:
getY2 in class Line2D

setLine

public void setLine(double x1,
                    double y1,
                    double x2,
                    double y2)
{@inheritDoc}

Overrides:
setLine in class Line2D
Parameters:
x1
y1
x2
y2


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.