Modifier and Type | Field and Description |
---|---|
protected int |
bottom |
protected int |
left |
protected int |
right |
protected int |
top |
Constructor and Description |
---|
Region() |
Region(int spacing) |
Region(int top,
int right,
int bottom,
int left) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int x,
int y)
Tests if the given point is within the region.
|
int |
getBottom()
Returns the bottom value.
|
int |
getLeft()
Returns the left value.
|
int |
getRight()
Returns the right value.
|
int |
getTop()
Returns the top value.
|
void |
setBottom(int bottom)
Sets the bottom value.
|
void |
setLeft(int left)
Sets the left value.
|
void |
setRight(int right)
Sets the right value.
|
void |
setTop(int top)
Sets the top value.
|
String |
toString() |
protected int left
protected int top
protected int right
protected int bottom
public Region()
public Region(int spacing)
public Region(int top, int right, int bottom, int left)
public int getBottom()
public int getLeft()
public int getRight()
public int getTop()
public void setBottom(int bottom)
bottom
- the bottom valuepublic void setLeft(int left)
left
- the left valuepublic void setRight(int right)
right
- the right valuepublic void setTop(int top)
top
- the top valuepublic boolean contains(int x, int y)
x
- the global coordinate x valuey
- the global coordinate y valueCopyright © 2018. All rights reserved.