|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.erichseifert.gral.AbstractDrawable
public abstract class AbstractDrawable
Abstract implementation of the Drawable interface. Implemented functionality includes getting and setting the bounding rectangle in different ways.
Drawable
Constructor Summary | |
---|---|
AbstractDrawable()
Creates an AbstractDrawable. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.erichseifert.gral.Drawable |
---|
draw |
Constructor Detail |
---|
public AbstractDrawable()
Method Detail |
---|
public Rectangle2D getBounds()
Drawable
getBounds
in interface Drawable
public double getHeight()
Drawable
getHeight
in interface Drawable
public double getWidth()
Drawable
getWidth
in interface Drawable
public double getX()
Drawable
getX
in interface Drawable
public double getY()
Drawable
getY
in interface Drawable
public void setBounds(Rectangle2D bounds)
Drawable
setBounds
in interface Drawable
bounds
- rectangle containing the component.public void setBounds(double x, double y, double width, double height)
Drawable
setBounds
in interface Drawable
x
- horizontal position of the upper-left cornery
- vertical position of the upper-left cornerwidth
- horizontal extentheight
- vertical extentpublic Dimension2D getPreferredSize()
Drawable
Drawable
.
getPreferredSize
in interface Drawable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |