|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.awt.geom.Point2D
public abstract class Point2D
Point2D クラスは、(x, y) 座標空間の位置を表す点を定義します。
このクラスは、2D 座標を格納するすべてのオブジェクトの抽象スーパークラスであり、座標の実際の記憶式表現は、サブクラスに委ねられています。
| 入れ子のクラスの概要 | |
|---|---|
static class |
Point2D.Double
Double クラスは、double 精度で指定された点を定義します。 |
static class |
Point2D.Float
Float クラスは、float 精度で指定された点を定義します。 |
| コンストラクタの概要 | |
|---|---|
protected |
Point2D()
これは、インスタンスを直接には生成できない抽象クラスです。 |
| メソッドの概要 | |
|---|---|
Object |
clone()
このオブジェクトと同じクラスで、同じ内容の新しいオブジェクトを作成します。 |
double |
distance(double PX,
double PY)
この Point2D から指定された点までの距離を返します。 |
static double |
distance(double X1,
double Y1,
double X2,
double Y2)
2 つの点の間の距離を返します。 |
double |
distance(Point2D pt)
この Point2D から指定された Point2D までの距離を返します。 |
double |
distanceSq(double PX,
double PY)
この Point2D から指定された点までの距離の 2 乗を返します。 |
static double |
distanceSq(double X1,
double Y1,
double X2,
double Y2)
2 つの点の間の距離の 2 乗を返します。 |
double |
distanceSq(Point2D pt)
この Point2D から指定された Point2D までの距離の 2 乗を返します。 |
boolean |
equals(Object obj)
2 つの点が等しいかどうかを判定します。 |
abstract double |
getX()
この Point2D の X 座標を double 精度で返します。 |
abstract double |
getY()
この Point2D の Y 座標を double 精度で返します。 |
int |
hashCode()
この Point2D のハッシュコードを返します。 |
abstract void |
setLocation(double x,
double y)
この Point2D の位置を、指定された double 型の座標に設定します。 |
void |
setLocation(Point2D p)
この Point2D の位置を、指定された Point2D オブジェクトと同じ座標に設定します。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
protected Point2D()
Point2D.Float,
Point2D.Double,
Point| メソッドの詳細 |
|---|
public abstract double getX()
Point2D の X 座標を double 精度で返します。
Point2D の X 座標public abstract double getY()
Point2D の Y 座標を double 精度で返します。
Point2D の Y 座標
public abstract void setLocation(double x,
double y)
Point2D の位置を、指定された double 型の座標に設定します。
x, y - この Point2D の座標public void setLocation(Point2D p)
Point2D の位置を、指定された Point2D オブジェクトと同じ座標に設定します。
p - この Point2D を表す Point2D
public static double distanceSq(double X1,
double Y1,
double X2,
double Y2)
X1, Y1 - 最初の点の座標X2, Y2 - 2 番目の点の座標
public static double distance(double X1,
double Y1,
double X2,
double Y2)
X1, Y1 - 最初の点の座標X2, Y2 - 2 番目の点の座標
public double distanceSq(double PX,
double PY)
Point2D から指定された点までの距離の 2 乗を返します。
PX, PY - もう 1 つの点の座標
Point2D と指定された点の間の距離の 2 乗public double distanceSq(Point2D pt)
Point2D から指定された Point2D までの距離の 2 乗を返します。
pt - 指定された Point2D
Point2D と指定された Point2D の間の距離の 2 乗
public double distance(double PX,
double PY)
Point2D から指定された点までの距離を返します。
PX, PY - 指定された Point2D の座標
Point2D と指定された点の間の距離public double distance(Point2D pt)
Point2D から指定された Point2D までの距離を返します。
pt - 指定された Point2D
Point2D と指定された Point2D の間の距離public Object clone()
Object 内の cloneOutOfMemoryError - 十分なメモリがない場合Cloneablepublic int hashCode()
Point2D のハッシュコードを返します。
Object 内の hashCodePoint2D に使うハッシュコードObject.equals(java.lang.Object),
Hashtablepublic boolean equals(Object obj)
Point2D の 2 つのインスタンスは、x および y メンバフィールド (座標空間でそれらの位置を表す) の値が同じ場合に等しくなります。
Object 内の equalsobj - この Point2D と比較されるオブジェクト
Point2D のインスタンスであり、同じ値を持つ場合は true、そうでない場合は falseObject.hashCode(),
Hashtable
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。