|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.markup.html.WebComponent
org.apache.wicket.markup.html.image.Image
public class Image
An Image component displays a localizable image resource.
For details of how Images load, generate and manage images, see LocalizedImageResource.
NonCachingImage,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.Component |
|---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange |
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Fields inherited from interface org.apache.wicket.IResourceListener |
|---|
INTERFACE |
| Constructor Summary | |
|---|---|
Image(java.lang.String id)
This constructor can be used if you have a img tag that has a src that points to a PackageResource (which will be created and bind to the shared resources) Or if you have a value attribute in your tag for which the image factory can make an image. |
|
Image(java.lang.String id,
IModel<?> model)
|
|
Image(java.lang.String id,
Resource imageResource)
Constructs an image directly from an image resource. |
|
Image(java.lang.String id,
ResourceReference resourceReference)
Constructs an image from an image resourcereference. |
|
Image(java.lang.String id,
ResourceReference resourceReference,
ValueMap resourceParameters)
Constructs an image from an image resourcereference. |
|
Image(java.lang.String id,
java.lang.String string)
|
|
| Method Summary | |
|---|---|
protected Resource |
getImageResource()
|
protected ResourceReference |
getImageResourceReference()
|
protected boolean |
getStatelessHint()
Returns whether the component can be stateless. |
protected IModel<?> |
initModel()
Called when a null model is about to be retrieved in order to allow a subclass to provide an initial model. |
protected void |
onComponentTag(ComponentTag tag)
Processes the component tag. |
protected void |
onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
Processes the body. |
void |
onResourceRequested()
Called when a resource is requested. |
Component |
setDefaultModel(IModel<?> model)
Sets the given model. |
void |
setImageResource(Resource imageResource)
|
void |
setImageResourceReference(ResourceReference resourceReference)
|
void |
setImageResourceReference(ResourceReference resourceReference,
ValueMap parameters)
|
| Methods inherited from class org.apache.wicket.markup.html.WebComponent |
|---|
onRender |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Image(java.lang.String id)
Component.Component(String)
public Image(java.lang.String id,
ResourceReference resourceReference)
id - See ComponentresourceReference - The shared image resource
public Image(java.lang.String id,
ResourceReference resourceReference,
ValueMap resourceParameters)
id - See ComponentresourceReference - The shared image resourceresourceParameters - The resource parameters
public Image(java.lang.String id,
Resource imageResource)
id - See ComponentimageResource - The image resource
public Image(java.lang.String id,
IModel<?> model)
Component.Component(String, IModel)
public Image(java.lang.String id,
java.lang.String string)
id - See Componentstring - Name of imageComponent.Component(String, IModel)| Method Detail |
|---|
public void onResourceRequested()
IResourceListener
onResourceRequested in interface IResourceListenerIResourceListener.onResourceRequested()public void setImageResource(Resource imageResource)
imageResource - The new ImageResource to set.public void setImageResourceReference(ResourceReference resourceReference)
resourceReference - The shared ImageResource to set.
public void setImageResourceReference(ResourceReference resourceReference,
ValueMap parameters)
resourceReference - The shared ImageResource to set.parameters - Set the resource parameters for the resource.public Component setDefaultModel(IModel<?> model)
ComponentWARNING: DO NOT OVERRIDE THIS METHOD UNLESS YOU HAVE A VERY GOOD REASON FOR IT. OVERRIDING THIS MIGHT OPEN UP SECURITY LEAKS AND BREAK BACK-BUTTON SUPPORT.
setDefaultModel in class Componentmodel - The model
Component.setDefaultModel(org.apache.wicket.model.IModel)protected Resource getImageResource()
protected ResourceReference getImageResourceReference()
protected IModel<?> initModel()
Component
initModel in class ComponentComponent.initModel()protected void onComponentTag(ComponentTag tag)
Component
onComponentTag in class Componenttag - Tag to modifyComponent.onComponentTag(ComponentTag)protected boolean getStatelessHint()
Component
getStatelessHint in class ComponentComponent.getStatelessHint()
protected void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
Component
onComponentTagBody in class ComponentmarkupStream - The markup streamopenTag - The open tag for the bodyComponent.onComponentTagBody(MarkupStream, ComponentTag)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||