|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Area
Class representing a rectangular region, with convenience methods for calculations.
| Method Summary | |
|---|---|
Area |
copyOf()
Clone our area. |
int |
distanceToEdge(Location location)
Determine the shortest distance from the location to the edge of the area. |
int |
getBottom()
Get the area's bottom coordinate in pixels. |
Location |
getCenter()
Get the area's center Location. |
int |
getHeight()
Get the area's height. |
int |
getLeft()
Get the area's left coordinate in pixels. |
int |
getRight()
Get the area's right coordinate in pixels. |
int |
getSize()
Determine area (width * height). |
int |
getTop()
Get the area's top coordinate in pixels. |
int |
getWidth()
Get the area's width. |
boolean |
inBottomRight(Location location)
Determine if location is to the bottom-right of the following 45 degree line. |
boolean |
intersects(Area targetArea)
Determine if the target area intersects our area. |
boolean |
intersects(Location location)
Determine if the provided location intersects with our area. |
void |
moveTo(Location location)
Translate our top left position to the new location. |
| Method Detail |
|---|
Area copyOf()
int distanceToEdge(Location location)
location - the reference location
int getBottom()
Location getCenter()
int getHeight()
int getLeft()
int getRight()
int getSize()
int getTop()
int getWidth()
boolean inBottomRight(Location location)
y 45
| /
|/
-----+----- x
/|
/ |
location - the location to consider
boolean intersects(Area targetArea)
targetArea - the area to compare to
boolean intersects(Location location)
location - the location to examine
void moveTo(Location location)
location - the position to translate to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||