public final class Rectangle
extends java.lang.Object
| Constructor and Description |
|---|
Rectangle(int x,
int y,
int width,
int height)
Creates a new rectangle
|
Rectangle(Position position,
Dimension size)
Creates a new rectangle defined by position and dimension
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Position point)
Checks if a given position is contained in this rectangle
|
boolean |
equals(java.lang.Object obj) |
int |
getHeight()
Gets the height of the rectangle
|
Position |
getPosition()
Gets the position of the rectangle
|
Dimension |
getSize()
Gets the size of the rectangle
|
int |
getWidth()
Gets the width of the rectangle
|
int |
getX()
Gets the x - coordinate of the rectangle
|
int |
getY()
Gets the y - coordinate of the rectangle
|
int |
hashCode() |
java.lang.String |
toString() |
public Rectangle(int x,
int y,
int width,
int height)
x - The x - coordinatey - The y - coordinatewidth - The widthheight - The heightpublic Position getPosition()
public Dimension getSize()
public int getWidth()
public int getHeight()
public int getX()
public int getY()
public boolean contains(Position point)
point - The position to checkpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectSiehe auch Jowidgets Nutzerhandbuch