|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xhtmlrenderer.swing.ImageReplacedElement
public class ImageReplacedElement
An ImageReplacedElement is a ReplacedElement that contains a Image. It's used as a
container for images included within XML being rendered. The image contained is immutable.
| Field Summary | |
|---|---|
protected Image |
_image
|
| Constructor Summary | |
|---|---|
protected |
ImageReplacedElement()
|
|
ImageReplacedElement(Image image,
int targetWidth,
int targetHeight)
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 |
| Field Detail |
|---|
protected Image _image
| Constructor Detail |
|---|
protected ImageReplacedElement()
public ImageReplacedElement(Image image,
int targetWidth,
int targetHeight)
image - An image.targetWidth - The width we'd like the image to have, in pixels.targetHeight - The height we'd like the image to have, in pixels.| Method Detail |
|---|
public void detach(LayoutContext c)
detach in interface ReplacedElementpublic int getIntrinsicHeight()
getIntrinsicHeight in interface ReplacedElementpublic int getIntrinsicWidth()
getIntrinsicWidth in interface ReplacedElementpublic Point getLocation()
getLocation in interface ReplacedElementpublic boolean isRequiresInteractivePaint()
isRequiresInteractivePaint in interface ReplacedElement
public void setLocation(int x,
int y)
setLocation in interface ReplacedElementx - new horizontal posy - new vertical pospublic Image getImage()
public int getBaseline()
getBaseline in interface ReplacedElementpublic boolean hasBaseline()
hasBaseline in interface ReplacedElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||