java.lang.Object | |
↳ | com.carto.core.ScreenBounds |
A container class that defines a bounding box on the screen using minimum and maximum screen positions.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ScreenBounds()
Constructs an empty ScreenBounds object.
| |||||||||||
ScreenBounds(ScreenPos min, ScreenPos max)
Constructs a ScreenBounds object from a minimum and maximum position.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
contains(ScreenPos pos)
Tests whether this screen bounds object contains a screen position.
| ||||||||||
boolean |
contains(ScreenBounds bounds)
Tests whether this screen bounds object contains a another screen bounds object.
| ||||||||||
synchronized void | delete() | ||||||||||
boolean |
equals(Object obj)
Checks if this object is equal to the specified object.
| ||||||||||
ScreenPos |
getCenter()
Calculates the center screen position of this screen envelope object.
| ||||||||||
float |
getHeight()
Returns the height of the bounds object.
| ||||||||||
ScreenPos |
getMax()
Returns the maximum screen position of this screen envelope object.
| ||||||||||
ScreenPos |
getMin()
Returns the minimum screen position.
| ||||||||||
float |
getWidth()
Returns the width of the bounds object.
| ||||||||||
int |
hashCode()
Returns the hash value of this object.
| ||||||||||
boolean |
intersects(ScreenBounds bounds)
Tests whether this screen bounds object intersects with a another screen bounds object.
| ||||||||||
String |
toString()
Creates a string representation of this screen bounds object, useful for logging.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs an empty ScreenBounds object. The coordinates of the minimum position will be
set to positive infinity and the coordinates of the maximum position will be
set to negative infinity.
Constructs a ScreenBounds object from a minimum and maximum position. If a coordinate of the
minimum positon is larger than the same coordinate of the maximum position then those
coordinates will be swapped.
min | The minimum position. |
---|---|
max | The maximum position. |
Tests whether this screen bounds object contains a screen position.
pos | The screen position. |
---|
Tests whether this screen bounds object contains a another screen bounds object.
bounds | The other screen bounds object. |
---|
Checks if this object is equal to the specified object.
obj | The reference object. |
---|
Calculates the center screen position of this screen envelope object.
Returns the height of the bounds object.
Returns the maximum screen position of this screen envelope object.
Returns the minimum screen position.
Returns the width of the bounds object.
Returns the hash value of this object.
Tests whether this screen bounds object intersects with a another screen bounds object.
bounds | The other screen bounds object. |
---|
Creates a string representation of this screen bounds object, useful for logging.