|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Resource
wicket.markup.html.WebResource
wicket.markup.html.image.resource.DynamicImageResource
wicket.markup.html.image.resource.RenderedDynamicImageResource
A DynamicImageResource subclass that allows easy rendering of regenenerable (unbuffered) dynamic images. A RenderedDynamicImageResource implements the abstract method render(Graphics2D) to create/re-create a given image on-the-fly. When a RenderedDynamicImageResource is serialized, the image state is transient, which means it will disappear when the resource is sent over the wire and then will be recreated when required.
The extension/format of the image resource can be specified with setFormat(String).
DefaultButtonImageResource,
DefaultButtonImageResourceFactory,
Serialized Form| Field Summary |
| Fields inherited from class wicket.markup.html.image.resource.DynamicImageResource |
lastModifiedTime |
| Fields inherited from class wicket.Resource |
resourceStream |
| Constructor Summary | |
RenderedDynamicImageResource(int width,
int height)
Constructor. |
|
| Method Summary | |
int |
getHeight()
|
protected byte[] |
getImageData()
Get image data for our dynamic image resource. |
int |
getType()
|
int |
getWidth()
|
void |
invalidate()
Causes the image to be redrawn the next time its requested. |
protected byte[] |
render()
Renders this image |
protected abstract boolean |
render(java.awt.Graphics2D graphics)
Override this method to provide your rendering code |
void |
setHeight(int height)
|
void |
setType(int type)
|
void |
setWidth(int width)
|
| Methods inherited from class wicket.markup.html.image.resource.DynamicImageResource |
getFormat, getResourceStream, lastModifiedTime, setFormat, toImageData |
| Methods inherited from class wicket.Resource |
isCacheable, onResourceRequested, setCacheable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RenderedDynamicImageResource(int width,
int height)
width - Width of imageheight - Height of image| Method Detail |
public int getHeight()
public int getType()
public int getWidth()
public void invalidate()
invalidate in class Resourcepublic void setHeight(int height)
height - The height to set.public void setType(int type)
type - The type to set (one of BufferedImage.TYPE_*).public void setWidth(int width)
width - The width to set.protected byte[] getImageData()
DynamicImageResource
getImageData in class DynamicImageResourceprotected byte[] render()
protected abstract boolean render(java.awt.Graphics2D graphics)
graphics - The graphics context to render on
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||