public interface Sizeable
Modifier and Type | Method and Description |
---|---|
<T extends Sizeable> |
addSizeChangeListener(SizeChangeListener<T> listener)
Adds a
SizeChangeListener to be notified of size changes |
float |
getCenterX()
Returns the center x coordinate of this object.
|
float |
getCenterY()
Returns the center y coordinate of this object.
|
float |
getHeight()
Returns the height of this object
|
int |
getId()
Returns the unique id of this object
|
float |
getMaxX()
Returns max X coordinate of this object
|
float |
getMaxY()
Returns max Y coordinate of this object
|
float |
getMinX()
Returns min X coordinate of this object
|
float |
getMinY()
Returns min Y coordinate of this object
|
float |
getWidth()
Returns the width of this object
|
<T extends Sizeable> |
removeSizeChangeListener(SizeChangeListener<T> listener)
Removes a
SizeChangeListener to stop it being notified of size
changes |
void |
scale(float scale)
Scales the radius of this shape.
|
void |
setCenter(float x,
float y)
Sets the center x,y coordinate of this object
|
void |
setCenterX(float x)
Sets the center x coordinate
|
void |
setCenterY(float y)
Sets the center y coordianate
|
void |
setRadius(float radius)
Sets the radius of this shape.
|
int getId()
float getWidth()
float getHeight()
void setRadius(float radius)
Polygon
shapes, this will
stretch in/out the shape from its center. Note that Polygon
s must
be equilateral.radius
- The radius in pixelsvoid scale(float scale)
Polygon
shapes, this will
stretch in/out the shape from its center. Note that Polygon
s must
be equilateral.scale
- The amount to scale by (e.g. 2.0 = double the size)float getMinX()
float getMinY()
float getMaxX()
float getMaxY()
float getCenterX()
Circle
this is the same as x.float getCenterY()
Circle
this is the same as y.void setCenter(float x, float y)
x
- The x coordinate of the shape's centery
- The y coordinate of the shape's centervoid setCenterX(float x)
x
- The x coordinate of the shape's centervoid setCenterY(float y)
y
- The y coordinate of the shape's center<T extends Sizeable> void addSizeChangeListener(SizeChangeListener<T> listener)
SizeChangeListener
to be notified of size changeslistener
- The SizeChangeListener
to add<T extends Sizeable> void removeSizeChangeListener(SizeChangeListener<T> listener)
SizeChangeListener
to stop it being notified of size
changeslistener
- The SizeChangeListener
to remove