| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static CoordinatePosition | Returns: NORTH_EDGE, SOUTH_EDGE or nullthe rectangle relative to which the point will be checked rectangle, Point2D the checked point point, double the tolerance in pixels used to determine whether the coordinates are on some edge edgeTolerance)Returns the horizontal bound the specified coordinates are closest to, if the distance is smaller than the edge tolerance. |
| private static CoordinatePosition | Returns: EAST_EDGE, WEST_EDGE or nullthe rectangle relative to which the point will be checked rectangle, Point2D the checked point point, double the tolerance in pixels used to determine whether the coordinates are on some edge edgeTolerance)Returns the vertical bound the specified coordinates are closest to, if the distance is smaller than the edge tolerance. |
| private static CoordinatePosition | Returns: the single coordinate position which matches the specified positions(e.g. NORTH for (null, NORTH) and SOUTHWEST for (WEST, SOUTH)) a vertical edge (EAST or WEST) or null vertical, CoordinatePosition a horizontal edge (NORTH OR SOUTH) or null horizontal)Extracts a single cardinal direction from the two specified positions. |
| public static CoordinatePosition | inRectangle(Rectangle2D
the rectangle relative to which the point will be checked rectangle, Point2D the checked point point)Returns the position the specified coordinates have regarding the specified rectangle. |
| public static CoordinatePosition | Returns: the edge position the coordinates have regarding the specified rectangle; the value will be null if the point is not near any edgethe rectangle relative to which the point will be checked rectangle, Point2D the checked point point, double the tolerance in pixels used to determine whether the coordinates are on some edge edgeTolerance)Returns the position the specified coordinates have regarding the specified rectangle's edges using the specified tolerance. |
| public static EnumSet | Returns: a set of those positions the coordinates have regarding the specified rectanglethe rectangle relative to which the point will be checked rectangle, Point2D the checked point point, double the tolerance in pixels used to determine whether the coordinates are on some edge edgeTolerance)Returns all positions the specified point has regarding the specified rectangle and its edges (using the specified tolerance). |
| CoordinatePositions | back to summary |
|---|---|
| public CoordinatePositions() | |
| closeToHorizontal | back to summary |
|---|---|
| private static CoordinatePosition closeToHorizontal(Rectangle2D rectangle, Point2D point, double edgeTolerance) Returns the horizontal bound the specified coordinates are closest to, if the distance is smaller than the edge tolerance. Otherwise, null is returned.
| |
| closeToVertical | back to summary |
|---|---|
| private static CoordinatePosition closeToVertical(Rectangle2D rectangle, Point2D point, double edgeTolerance) Returns the vertical bound the specified coordinates are closest to, if the distance is smaller than the edge tolerance. Otherwise, null is returned.
| |
| extractSingleCardinalDirection | back to summary |
|---|---|
| private static CoordinatePosition extractSingleCardinalDirection(CoordinatePosition vertical, CoordinatePosition horizontal) Extracts a single cardinal direction from the two specified positions. The conditions stated below are not checked!
| |
| inRectangle | back to summary |
|---|---|
| public static CoordinatePosition inRectangle(Rectangle2D rectangle, Point2D point) Returns the position the specified coordinates have regarding the specified rectangle. Edges are not checked.
| |
| onEdges | back to summary |
|---|---|
| public static CoordinatePosition onEdges(Rectangle2D rectangle, Point2D point, double edgeTolerance) Returns the position the specified coordinates have regarding the specified rectangle's edges using the specified tolerance.
| |
| onRectangleAndEdges | back to summary |
|---|---|
| public static EnumSet Returns all positions the specified point has regarding the specified rectangle and its edges (using the specified tolerance).
| |