Region.contains

Overview | Methods | This Package | All Packages

Region.contains

Retrieves a boolean value that indicates whether a specified point or rectangle exists in the region.

Syntax

public final boolean contains( Point pt )

public final boolean contains( int x, int y )

public final boolean contains( Rectangle rect )

public final boolean contains( int x, int y, int width, int height )

Parameters

pt

A Point object that specifies the coordinates to test against the region.

x

The x-coordinate (of a point or rectangle) to test against the region.

y

The y-coordinate (of a point or rectangle) to test against the region.

rect

A Rectangle object that identifies the rectangle to locate in the region.

height

The height of the rectangle to test against the region.

width

The width of the rectangle to test against the region.

Return Value

Returns true, if the specified point falls within the region; otherwise, returns false.