public class Rect extends Object implements Serializable
コンストラクタと説明 |
---|
Rect(int x,
int y,
int width,
int height)
指定した x、y 座標、および幅と高さを持つ矩形を作成します。
|
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
contains(int x,
int y)
この矩形領域が指定した位置 (x, y) の座標を含むかどうかを確認します。
|
boolean |
contains(Point point)
この矩形領域が指定した座標を含むかどうかを確認します。
|
boolean |
contains(Rect rect)
この矩形領域が指定した矩形領域全体を含むかどうかを確認します。
|
boolean |
equals(Object obj) |
Point |
getCenter()
矩形領域の中心を返します。
|
int |
getHeight()
矩形領域の高さを返します。
|
int |
getWidth()
矩形領域の幅を返します。
|
int |
getX()
矩形領域の x 座標を返します。
|
int |
getY()
矩形領域の y 座標を返します。
|
int |
hashCode() |
boolean |
isEmpty()
矩形領域が空かどうかをテストします。
|
String |
toString() |
public Rect(int x, int y, int width, int height)
x
- x 座標y
- y 座標width
- 幅height
- 高さ
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public Point getCenter()
public boolean isEmpty()
true
を、それ以外の場合は false
を返します
public boolean contains(int x, int y)
x
- 指定した X 座標y
- 指定した Y 座標true
を返します。
public boolean contains(Point point)
point
- テストする座標true
を返します。
public boolean contains(Rect rect)
rect
- テストする矩形領域true
を返します。
Copyright 2009-2012 Micro Focus. All Rights Reserved.