|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xhtmlrenderer.swing.ImageReplacedElement
org.xhtmlrenderer.swing.DeferredImageReplacedElement
public class DeferredImageReplacedElement
An DeferredImageReplacedElement is a ReplacedElement
that contains a Image
which by default is simply a transparent image scaled to the size provided to the constructor. The DeferredImageReplacedElement
also has a reference to an ImageResource which points to the image which will be returned for this replaced element.
That Image may be loaded some time after this DeferredImageReplacedElement is created. Calling getImage() on
instances of DeferredImageReplacedElement will return either the original dummy image, or the actual image
loaded into the ImageResource.
Field Summary |
---|
Fields inherited from class org.xhtmlrenderer.swing.ImageReplacedElement |
---|
_image |
Constructor Summary | |
---|---|
DeferredImageReplacedElement(ImageResource imageResource,
RepaintListener repaintListener,
int w,
int h)
Creates a new ImageReplacedElement and scales it to the size specified if either width or height has a valid value (values are > -1), otherwise original size is preserved. |
Method Summary | |
---|---|
void |
detach(LayoutContext c)
|
int |
getBaseline()
|
Image |
getImage()
The image we're replacing. |
int |
getIntrinsicHeight()
|
int |
getIntrinsicWidth()
|
Point |
getLocation()
Returns the current location where the element will be rendered on the canvas |
boolean |
hasBaseline()
|
boolean |
isRequiresInteractivePaint()
|
void |
setLocation(int x,
int y)
Assigns the new locations where the element will be rendered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeferredImageReplacedElement(ImageResource imageResource, RepaintListener repaintListener, int w, int h)
imageResource
- repaintListener
- Method Detail |
---|
public void detach(LayoutContext c)
detach
in interface ReplacedElement
detach
in class ImageReplacedElement
public int getIntrinsicHeight()
getIntrinsicHeight
in interface ReplacedElement
getIntrinsicHeight
in class ImageReplacedElement
public int getIntrinsicWidth()
getIntrinsicWidth
in interface ReplacedElement
getIntrinsicWidth
in class ImageReplacedElement
public Point getLocation()
getLocation
in interface ReplacedElement
getLocation
in class ImageReplacedElement
public boolean isRequiresInteractivePaint()
isRequiresInteractivePaint
in interface ReplacedElement
isRequiresInteractivePaint
in class ImageReplacedElement
public void setLocation(int x, int y)
setLocation
in interface ReplacedElement
setLocation
in class ImageReplacedElement
x
- new horizontal posy
- new vertical pospublic Image getImage()
getImage
in class ImageReplacedElement
public int getBaseline()
getBaseline
in interface ReplacedElement
getBaseline
in class ImageReplacedElement
public boolean hasBaseline()
hasBaseline
in interface ReplacedElement
hasBaseline
in class ImageReplacedElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |