Quadrangle

Inheritance: java.lang.Object

public class Quadrangle

Stores a set of four Point s that represent a Quadrangle region.

Constructors

ConstructorDescription
Quadrangle()
Quadrangle(Point leftTop, Point rightTop, Point rightBottom, Point leftBottom)Initializes a new instance of the Quadrangle class with the describing points.

Fields

FieldDescription
EMPTYRepresents a Quadrangle class with its properties left uninitialized.

Methods

MethodDescription
clone()
contains(Quadrangle quad)Determines if the specified Quadrangle is contained or intersect this Quadrangle class.
contains(int x, int y)Determines if the specified point is contained within this Quadrangle class.
contains(Point pt)Determines if the specified Point is contained within this Quadrangle class.
contains(Rectangle rect)Determines if the specified Rectangle is contained or intersect this Quadrangle class.
equals(Object obj)Returns a value indicating whether this instance is equal to a specified Quadrangle value.
getBoundingRectangle()Creates Rectangle bounding this Quadrangle
getClass()
getLeftBottom()Gets left-bottom corner Point of Quadrangle region
getLeftTop()Gets left-top corner Point of Quadrangle region
getRightBottom()Gets right-bottom corner Point of Quadrangle region
getRightTop()Gets right-top corner Point of Quadrangle region
hashCode()Returns the hash code for this instance.
isEmpty()Tests whether all Point s of this Quadrangle have values of zero.
notify()
notifyAll()
setLeftBottom(Point value)Gets left-bottom corner Point of Quadrangle region
setLeftTop(Point value)Gets left-top corner Point of Quadrangle region
setRightBottom(Point value)Gets right-bottom corner Point of Quadrangle region
setRightTop(Point value)Gets right-top corner Point of Quadrangle region
toString()Returns a human-readable string representation of this Quadrangle .
wait()
wait(long arg0)
wait(long arg0, int arg1)

Quadrangle()

public Quadrangle()

Quadrangle(Point leftTop, Point rightTop, Point rightBottom, Point leftBottom)

public Quadrangle(Point leftTop, Point rightTop, Point rightBottom, Point leftBottom)

Initializes a new instance of the Quadrangle class with the describing points.

Parameters:

ParameterTypeDescription
leftTopjava.awt.PointA Point that represents the left-top corner of the Quadrangle.
rightTopjava.awt.PointA Point that represents the right-top corner of the Quadrangle.
rightBottomjava.awt.PointA Point that represents the right-bottom corner of the Quadrangle.
leftBottomjava.awt.PointA Point that represents the left-bottom corner of the Quadrangle.

EMPTY

public static final Quadrangle EMPTY

Represents a Quadrangle class with its properties left uninitialized.

Value: Quadrangle

clone()

public Quadrangle clone()

Returns: Quadrangle

contains(Quadrangle quad)

public boolean contains(Quadrangle quad)

Determines if the specified Quadrangle is contained or intersect this Quadrangle class.

Parameters:

ParameterTypeDescription
quadQuadrangleThe Quadrangle to test.

Returns: boolean - Returns true if Quadrangle is contained or intersect this Quadrangle class; otherwise, false .

contains(int x, int y)

public boolean contains(int x, int y)

Determines if the specified point is contained within this Quadrangle class.

Parameters:

ParameterTypeDescription
xintThe x point cordinate.
yintThe y point cordinate.

Returns: boolean - Returns true if point is contained within this Quadrangle class; otherwise, false .

contains(Point pt)

public boolean contains(Point pt)

Determines if the specified Point is contained within this Quadrangle class.

Parameters:

ParameterTypeDescription
ptjava.awt.PointThe Point to test.

Returns: boolean - Returns true if Point is contained within this Quadrangle class; otherwise, false .

contains(Rectangle rect)

public boolean contains(Rectangle rect)

Determines if the specified Rectangle is contained or intersect this Quadrangle class.

Parameters:

ParameterTypeDescription
rectjava.awt.RectangleThe Rectangle to test.

Returns: boolean - Returns true if Rectangle is contained or intersect this Quadrangle class; otherwise, false .

equals(Object obj)

public boolean equals(Object obj)

Returns a value indicating whether this instance is equal to a specified Quadrangle value.

Parameters:

ParameterTypeDescription
objjava.lang.ObjectAn Quadrangle value to compare to this instance.

Returns: boolean - true if obj has the same value as this instance; otherwise, false .

getBoundingRectangle()

public Rectangle getBoundingRectangle()

Creates Rectangle bounding this Quadrangle

Returns: java.awt.Rectangle - returns Rectangle bounding this Quadrangle

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getLeftBottom()

public Point getLeftBottom()

Gets left-bottom corner Point of Quadrangle region

Value: A left-bottom corner Point of Quadrangle region

Returns: java.awt.Point

getLeftTop()

public Point getLeftTop()

Gets left-top corner Point of Quadrangle region

Value: A left-top corner Point of Quadrangle region

Returns: java.awt.Point

getRightBottom()

public Point getRightBottom()

Gets right-bottom corner Point of Quadrangle region

Value: A right-bottom corner Point of Quadrangle region

Returns: java.awt.Point

getRightTop()

public Point getRightTop()

Gets right-top corner Point of Quadrangle region

Value: A right-top corner Point of Quadrangle region

Returns: java.awt.Point

hashCode()

public int hashCode()

Returns the hash code for this instance.

Returns: int - A 32-bit signed integer hash code.

isEmpty()

public boolean isEmpty()

Tests whether all Point s of this Quadrangle have values of zero.

Value: Returns true if all Point s of this Quadrangle have values of zero; otherwise, false .

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setLeftBottom(Point value)

public void setLeftBottom(Point value)

Gets left-bottom corner Point of Quadrangle region

Value: A left-bottom corner Point of Quadrangle region

Parameters:

ParameterTypeDescription
valuejava.awt.Point

setLeftTop(Point value)

public void setLeftTop(Point value)

Gets left-top corner Point of Quadrangle region

Value: A left-top corner Point of Quadrangle region

Parameters:

ParameterTypeDescription
valuejava.awt.Point

setRightBottom(Point value)

public void setRightBottom(Point value)

Gets right-bottom corner Point of Quadrangle region

Value: A right-bottom corner Point of Quadrangle region

Parameters:

ParameterTypeDescription
valuejava.awt.Point

setRightTop(Point value)

public void setRightTop(Point value)

Gets right-top corner Point of Quadrangle region

Value: A right-top corner Point of Quadrangle region

Parameters:

ParameterTypeDescription
valuejava.awt.Point

toString()

public String toString()

Returns a human-readable string representation of this Quadrangle .

Returns: java.lang.String - A string that represents this Quadrangle .

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int