|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.awt.geom.Line2D
java.awt.geom.Line2D.Float
public static class Line2D.Float
float 座標で指定されたラインセグメントです。
| 入れ子のクラスの概要 |
|---|
| クラス java.awt.geom.Line2D から継承された入れ子のクラス/インタフェース |
|---|
Line2D.Double, Line2D.Float |
| フィールドの概要 | |
|---|---|
float |
x1
ラインセグメントの始点の X 座標です。 |
float |
x2
ラインセグメントの終点の X 座標です。 |
float |
y1
ラインセグメントの始点の Y 座標です。 |
float |
y2
ラインセグメントの終点の Y 座標です。 |
| コンストラクタの概要 | |
|---|---|
Line2D.Float()
座標 (0, 0) -> (0, 0) で Line を構築および初期化します。 |
|
Line2D.Float(float x1,
float y1,
float x2,
float y2)
指定された座標から Line を構築および初期化します。 |
|
Line2D.Float(Point2D p1,
Point2D p2)
指定された Point2D オブジェクトから Line2D を構築および初期化します。 |
|
| メソッドの概要 | |
|---|---|
Rectangle2D |
getBounds2D()
高精度で getBounds メソッドより精密な、Shape のバウンディングボックスを返します。 |
Point2D |
getP1()
この Line2D の始点を表す Point2D を返します。 |
Point2D |
getP2()
この Line2D の終点を表す Point2D を返します。 |
double |
getX1()
始点の X 座標を倍精度で返します。 |
double |
getX2()
終点の X 座標を倍精度で返します。 |
double |
getY1()
始点の Y 座標を倍精度で返します。 |
double |
getY2()
終点の Y 座標を倍精度で返します。 |
void |
setLine(double x1,
double y1,
double x2,
double y2)
この Line2D の両方の終点の位置を、指定された double 座標に設定します。 |
void |
setLine(float x1,
float y1,
float x2,
float y2)
この Line2D の両方の終点の位置を、指定された float 座標に設定します。 |
| クラス java.awt.geom.Line2D から継承されたメソッド |
|---|
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine |
| クラス java.lang.Object から継承されたメソッド |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
public float x1
public float y1
public float x2
public float y2
| コンストラクタの詳細 |
|---|
public Line2D.Float()
public Line2D.Float(float x1,
float y1,
float x2,
float y2)
x1 - 始点の X 座標y1 - 始点の Y 座標x2 - 終点の X 座標y2 - 終点の Y 座標
public Line2D.Float(Point2D p1,
Point2D p2)
Point2D オブジェクトから Line2D を構築および初期化します。
p1 - このラインセグメントの始点を表す Point2Dp2 - このラインセグメントの終点を表す Point2D| メソッドの詳細 |
|---|
public double getX1()
Line2D 内の getX1Line2D オブジェクトの始点の X 座標public double getY1()
Line2D 内の getY1Line2D オブジェクトの始点の Y 座標public Point2D getP1()
Line2D の始点を表す Point2D を返します。
Line2D 内の getP1Line2D の始点を表す Point2Dpublic double getX2()
Line2D 内の getX2Line2D オブジェクトの終点の X 座標public double getY2()
Line2D 内の getY2Line2D オブジェクトの終点の Y 座標public Point2D getP2()
Line2D の終点を表す Point2D を返します。
Line2D 内の getP2Line2D の終点を表す Point2D
public void setLine(double x1,
double y1,
double x2,
double y2)
Line2D の両方の終点の位置を、指定された double 座標に設定します。
Line2D 内の setLinex1 - 始点の X 座標y1 - 始点の Y 座標x2 - 終点の X 座標y2 - 終点の Y 座標
public void setLine(float x1,
float y1,
float x2,
float y2)
Line2D の両方の終点の位置を、指定された float 座標に設定します。
x1 - 始点の X 座標y1 - 始点の Y 座標x2 - 終点の X 座標y2 - 終点の Y 座標public Rectangle2D getBounds2D()
getBounds メソッドより精密な、Shape のバウンディングボックスを返します。返された Rectangle2D が Shape を囲む最小のバウンディングボックスであるとは限りません。 示された Rectangle2D 内に Shape が完全に収まるというだけです。戻り値を、倍精度値を使用して寸法を格納する Rectangle2D のインスタンスにすることもできるため、このメソッドによって返されるバウンディングボックスは、通常、getBounds メソッドによって返されるバウンディングボックスよりもぴったりしたものになり、オーバーフローのために失敗することはありません。
Shape 内の getBounds2DShape の高精度バウンディングボックスを表す Rectangle2D のインスタンスShape.getBounds()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。