ReplacedElement that contains a java.awt.Image . It's used as a
container for images included within XML being rendered. The image contained is immutable.
| Access | Constructor and Description |
|---|---|
| protected | |
| public | ImageReplacedElement(Image
An image. image, int The width we'd like the image to have, in pixels. targetWidth, int The height we'd like the image to have, in pixels. 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. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public int | |
| public Image | |
| public int | |
| public int | |
| public Point | getLocation()
Implements com. Returns the current location where the element will be rendered on the canvas |
| public boolean | |
| public boolean | |
| public void | setLocation(int
new horizontal pos x, int new vertical pos y)Implements com. Assigns the new locations where the element will be rendered. |
| _image | back to summary |
|---|---|
| protected Image _image | |
| _location | back to summary |
|---|---|
| private Point _location | |
| ImageReplacedElement | back to summary |
|---|---|
| protected ImageReplacedElement() | |
| ImageReplacedElement | back to summary |
|---|---|
| public 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. The idea is that the image was loaded at a certain size (that's the Image instance here) and that at the time we create the ImageReplacedElement we have a target W/H we want to use.
| |
| detach | back to summary |
|---|---|
| public void detach(LayoutContext c) Implements com. | |
| getBaseline | back to summary |
|---|---|
| public int getBaseline() Implements com. | |
| getImage | back to summary |
|---|---|
| public Image getImage() The image we're replacing.
| |
| getIntrinsicHeight | back to summary |
|---|---|
| public int getIntrinsicHeight() Implements com. | |
| getIntrinsicWidth | back to summary |
|---|---|
| public int getIntrinsicWidth() Implements com. | |
| getLocation | back to summary |
|---|---|
| public Point getLocation() Implements com. Doc from com. Returns the current location where the element will be rendered on the canvas
| |
| hasBaseline | back to summary |
|---|---|
| public boolean hasBaseline() Implements com. | |
| isRequiresInteractivePaint | back to summary |
|---|---|
| public boolean isRequiresInteractivePaint() Implements com. | |
| setLocation | back to summary |
|---|---|
| public void setLocation(int x, int y) Implements com. Doc from com. Assigns the new locations where the element will be rendered.
| |