|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object extended bydiva.canvas.AbstractFigure extended bydiva.canvas.toolbox.ImageFigure
A figure which draws a user-specified image.
| Field Summary |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ImageFigure()
Create an empty image figure. |
|
ImageFigure(java.awt.Image i)
Create an image figure displaying the given image. |
|
| Method Summary | |
java.awt.Image |
getImage()
Return the figure's image. |
java.awt.geom.Point2D |
getOrigin()
Return the origin of the figure in the enclosing transform context. |
java.awt.Shape |
getShape()
Return the rectangular shape of the image, or a small rectangle if the image is null. |
boolean |
imageUpdate(java.awt.Image image,
int infoflags,
int x,
int y,
int width,
int height)
This method, which is required by the ImageObserver interface, is called if something has changed in a background loading of the image. |
boolean |
isCentered()
Return whether the figure should be centered on its origin. |
void |
paint(java.awt.Graphics2D g)
Paint the figure's image. |
void |
setCentered(boolean centered)
Specify whether the figure should be centered on its origin. |
void |
setImage(java.awt.Image i)
Set the figure's image. |
void |
transform(java.awt.geom.AffineTransform t)
Perform an affine transform on this image. |
| Methods inherited from class diva.canvas.AbstractFigure |
contains, getBounds, getInteractor, getLayer, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible, translate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ImageFigure()
public ImageFigure(java.awt.Image i)
| Method Detail |
public java.awt.Image getImage()
public java.awt.geom.Point2D getOrigin()
getOrigin in interface FiguregetOrigin in class AbstractFigureAbstractFigure.getBounds()public java.awt.Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic boolean imageUpdate(java.awt.Image image, int infoflags, int x, int y, int width, int height)
imageUpdate in interface java.awt.image.ImageObserverimage - The image being observed.infoflags - The bitwise inclusive OR of the following flags:
WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR,
ABORT.x - The x coordinate of the image.y - The y coordinate of the image.width - The width of the image.height - The height of the image.
public boolean isCentered()
getOrigin(),
setCentered(boolean)public void paint(java.awt.Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic void setCentered(boolean centered)
centered - False to make the origin of the figure, as
returned by getOrigin(), be the upper left corner.getOrigin()public void setImage(java.awt.Image i)
i - The image.public void transform(java.awt.geom.AffineTransform t)
transform in interface Figuretransform in class AbstractFigure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||