|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Drawable
Interface providing functions for a lightweight component that can be drawn on the screen.
Functions include:
Method Summary | |
---|---|
void |
draw(DrawingContext context)
Draws the Drawable with the specified
Graphics2D object. |
Rectangle2D |
getBounds()
Returns the bounds of this Drawable. |
double |
getHeight()
Returns the height of the bounds. |
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(Rectangle2D bounds)
Sets the bounds to the specified bounding rectangle. |
Method Detail |
---|
Rectangle2D getBounds()
void setBounds(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()
Dimension2D getPreferredSize()
Drawable
.
void draw(DrawingContext context)
Drawable
with the specified
Graphics2D
object.
context
- Environment used for drawing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |