|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.graphics.Region
Unsafe:
Field Summary | |
int |
handle
Suppressed: the OS resource for the region (Warning: This field is platform dependent) |
Constructor Summary | |
|
Region()
Suppressed: Constructs a new empty region. |
(package private) |
Region(int handle)
Constructs a new region given a handle to the operating system resources that it should represent. |
Method Summary | |
void |
add(Rectangle rect)
Suppressed: Adds the given rectangle to the collection of rectangles the receiver maintains to describe its area. |
void |
add(Region region)
Suppressed: Adds all of the rectangles which make up the area covered by the argument to the collection of rectangles the receiver maintains to describe its area. |
boolean |
contains(int x,
int y)
Suppressed: Returns true if the point specified by the
arguments is inside the area specified by the receiver,
and false otherwise. |
boolean |
contains(Point pt)
Suppressed: Returns true if the given point is inside the
area specified by the receiver, and false
otherwise. |
void |
dispose()
Suppressed: Disposes of the operating system resources associated with the region. |
boolean |
equals(Object object)
Suppressed: Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
Rectangle |
getBounds()
Suppressed: Returns a rectangle which represents the rectangular union of the collection of rectangles the receiver maintains to describe its area. |
int |
hashCode()
Suppressed: Returns an integer hash code for the receiver. |
boolean |
intersects(int x,
int y,
int width,
int height)
Suppressed: Returns true if the rectangle described by the
arguments intersects with any of the rectangles the receiver
mainains to describe its area, and false otherwise. |
boolean |
intersects(Rectangle rect)
Suppressed: Returns true if the given rectangle intersects
with any of the rectangles the receiver mainains to describe
its area and false otherwise. |
boolean |
isDisposed()
Suppressed: Returns true if the region has been disposed,
and false otherwise. |
boolean |
isEmpty()
Suppressed: Returns true if the receiver does not cover any
area in the (x, y) coordinate plane, and false if
the receiver does cover some area in the plane. |
String |
toString()
Suppressed: Returns a string containing a concise, human-readable description of the receiver. |
static Region |
win32_new(int handle)
Suppressed: Invokes platform specific functionality to allocate a new region. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public int handle
Constructor Detail |
public Region()
Region(int handle)
handle
- the handle for the resultMethod Detail |
public void add(Rectangle rect)
rect
- the rectangle to merge with the receiverpublic void add(Region region)
region
- the region to mergepublic boolean contains(int x, int y)
true
if the point specified by the
arguments is inside the area specified by the receiver,
and false
otherwise.
x
- the x coordinate of the point to test for containmenty
- the y coordinate of the point to test for containment
true
if the region contains the point and false
otherwisepublic boolean contains(Point pt)
true
if the given point is inside the
area specified by the receiver, and false
otherwise.
pt
- the point to test for containment
true
if the region contains the point and false
otherwisepublic void dispose()
public boolean equals(Object object)
equals
in class Object
object
- the object to compare with this object
true
if the object is the same as this object and false
otherwisehashCode()
public Rectangle getBounds()
Rectangle.union(org.eclipse.swt.graphics.Rectangle)
public int hashCode()
true
when passed to
equals
must return the same value for this
method.
hashCode
in class Object
equals(java.lang.Object)
public boolean intersects(int x, int y, int width, int height)
true
if the rectangle described by the
arguments intersects with any of the rectangles the receiver
mainains to describe its area, and false
otherwise.
x
- the x coordinate of the origin of the rectangley
- the y coordinate of the origin of the rectanglewidth
- the width of the rectangleheight
- the height of the rectangle
true
if the rectangle intersects with the receiver, and false
otherwiseRectangle.intersects(org.eclipse.swt.graphics.Rectangle)
public boolean intersects(Rectangle rect)
true
if the given rectangle intersects
with any of the rectangles the receiver mainains to describe
its area and false
otherwise.
rect
- the rectangle to test for intersection
true
if the rectangle intersects with the receiver, and false
otherwiseRectangle.intersects(org.eclipse.swt.graphics.Rectangle)
public boolean isDisposed()
true
if the region has been disposed,
and false
otherwise.
This method gets the dispose state for the region. When a region has been disposed, it is an error to invoke any other method using the region.
true
when the region is disposed, and false
otherwisepublic boolean isEmpty()
true
if the receiver does not cover any
area in the (x, y) coordinate plane, and false
if
the receiver does cover some area in the plane.
true
if the receiver is empty, and false
otherwisepublic static Region win32_new(int handle)
IMPORTANT: This method is not part of the public
API for Region
. It is marked public only so that it
can be shared within the packages provided by SWT. It is not
available on all platforms, and should never be called from
application code.
handle
- the handle for the regionpublic String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |