GNU Classpath (0.99.1-pre) | |

Prev Class | Next Class | Frames | No Frames |

Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |

`java.lang.Object`

`java.awt.geom.Line2D`

`java.awt.geom.Line2D.Double`

**Enclosing Class:**- Line2D

**Implemented Interfaces:**- Cloneable, Shape

`public static class `**Line2D.Double**

`extends Line2D`

This class defines a point in

`double`

precision.
**Since:**- 1.2

## 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 first point.

`double`

`x2`

- The x coordinate of the second point.

`double`

`y1`

- The y coordinate of the first point.

`double`

`y2`

- The y coordinate of the second point.

## Constructor Summary

`Double()`

- Construct the line segment (0,0)->(0,0).

`Double(double x1, double y1, double x2, double y2)`

- Construct the line segment with the specified points.

## Method Summary

`Rectangle2D`

`getBounds2D()`

- Return the exact bounds of this line segment.

`Point2D`

`getP1()`

- Return the first point.

`Point2D`

`getP2()`

- Return the second point.

`double`

`getX1()`

- Return the x coordinate of the first point.

`double`

`getX2()`

- Return the x coordinate of the second point.

`double`

`getY1()`

- Return the y coordinate of the first point.

`double`

`getY2()`

- Return the y coordinate of the second point.

`void`

`setLine(double x1, double y1, double x2, double y2)`

- Set this line to the given points.

### 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`

,`extends Object> getClass`

,`finalize`

,`hashCode`

,`notify`

,`notifyAll`

,`toString`

,`wait`

,`wait`

,`wait`

public Double(double x1, double y1, double x2, double y2)

Construct the line segment with the specified points.

Parameters:`x1`

- the x coordinate of the first point`y1`

- the y coordinate of the first point`x2`

- the x coordinate of the second point`y2`

- the y coordinate of the second point

public Rectangle2D getBounds2D()

Return the exact bounds of this line segment.

Specified by:- getBounds2D in interface Shape

Returns:- the bounding box

public void setLine(double x1, double y1, double x2, double y2)

Set this line to the given points.

Parameters:`x1`

- the new x coordinate of the first point`y1`

- the new y coordinate of the first point`x2`

- the new x coordinate of the second point`y2`

- the new y coordinate of the second point

Line2D.java -- represents a line in 2-D space, plus operations on a line
Copyright (C) 2000, 2001, 2002 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.

GNU Classpath (0.99.1-pre) |