public interface Drawable
Modifier and Type | Method and Description |
---|---|
void |
draw(DrawingContext context)
Draws the
Drawable with the specified drawing context. |
java.awt.geom.Rectangle2D |
getBounds()
Returns the bounds of this
Drawable . |
double |
getHeight()
Returns the height of the bounds.
|
java.awt.geom.Dimension2D |
getPreferredSize()
Returns the preferred size of the
Drawable . |
double |
getWidth()
Returns the width of the bounds.
|
double |
getX()
Returns the x-position of the bounds.
|
double |
getY()
Returns the y-position of the bounds.
|
void |
setBounds(double x,
double y,
double width,
double height)
Sets the bounds to the specified coordinates, width and height.
|
void |
setBounds(java.awt.geom.Rectangle2D bounds)
Sets the bounds to the specified bounding rectangle.
|
java.awt.geom.Rectangle2D getBounds()
Drawable
.void setBounds(java.awt.geom.Rectangle2D bounds)
bounds
- rectangle containing the component.void setBounds(double x, double y, double width, double height)
x
- horizontal position of the upper-left cornery
- vertical position of the upper-left cornerwidth
- horizontal extentheight
- vertical extentdouble getX()
double getY()
double getWidth()
double getHeight()
java.awt.geom.Dimension2D getPreferredSize()
Drawable
.void draw(DrawingContext context)
Drawable
with the specified drawing context.context
- Environment used for drawing