|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jdrawing.graphics.GraphicsElement org.jdrawing.graphics.GraphicsOperation org.jdrawing.graphics.DrawImage
Graphics element which corresponds to
Graphics.drawImage(Image, int, int, ImageObserver)
.
This element supports asynchronous image loading.
Field Summary |
Fields inherited from class org.jdrawing.graphics.GraphicsElement |
BACKGROUND, COLOR, COMPOSITE, FONT, PAINT, parent, position, STROKE, TRANSFORM |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DrawImage(java.awt.Image image,
int x,
int y)
Returns Fill with given image at given location. |
Method Summary | |
boolean |
contains(java.awt.geom.Point2D point)
Tests if the element containes given point. |
java.awt.Rectangle |
getBounds()
Returns bounding box of the element. |
java.awt.geom.Rectangle2D |
getBounds2D()
Returns high precision bounding box of the element. |
java.awt.Image |
getImage()
Gets image to be drawn. |
int |
getX()
Returns X coordinate of the image. |
int |
getY()
Returns X coordinate of the image. |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
This method is called when information about an image which was previously requested using an asynchronous interface becomes available. |
boolean |
intersects(java.awt.geom.Rectangle2D rectangle)
Tests if the element intersects with the given rectangle. |
void |
paintOperation(java.awt.Graphics2D graphics)
Performs grawing operation. |
void |
setImage(java.awt.Image image)
Sets image to be drawn. |
void |
setX(int x)
Sets X coordinate of the image. |
void |
setY(int y)
Sets Y coordinate of the image. |
Methods inherited from class org.jdrawing.graphics.GraphicsOperation |
paint, update |
Methods inherited from class org.jdrawing.graphics.GraphicsElement |
addStyle, getParent, getStyle, getStyles, getTransform |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DrawImage(java.awt.Image image, int x, int y)
image
- the specified image to be drawnx
- the x coordinatey
- the y coordinateMethod Detail |
public void setImage(java.awt.Image image)
image
- the specified image to be drawnpublic java.awt.Image getImage()
public void setX(int x)
x
- the x coordinatepublic int getX()
public void setY(int y)
y
- the y coordinatepublic int getY()
public void paintOperation(java.awt.Graphics2D graphics)
graphics.fill ()
.
paintOperation
in class GraphicsOperation
graphics
- graphics context to use for paintingpublic java.awt.Rectangle getBounds()
getBounds
in interface DrawingElement
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface DrawingElement
public boolean intersects(java.awt.geom.Rectangle2D rectangle)
intersects
in interface DrawingElement
rectangle
- rectangle to be cheched for intersection
public boolean contains(java.awt.geom.Point2D point)
contains
in interface DrawingElement
point
- to be checked
public boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)
imageUpdate
in interface java.awt.image.ImageObserver
img
- the image being observed
false
if the infoflags indicate that
the image is completely loaded; true
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |