public class ExternalImage extends WebComponent
Image,
Serialized FormENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Constructor and Description |
|---|
ExternalImage(String id)
Creates an external image
|
ExternalImage(String id,
IModel<Serializable> srcModel)
Creates an external image
|
ExternalImage(String id,
IModel<Serializable> srcModel,
IModel<List<Serializable>> srcSetModel)
Creates an external image
|
ExternalImage(String id,
Serializable src)
Creates an external image
|
ExternalImage(String id,
Serializable src,
List<Serializable> srcSet)
Creates an external image
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildSizesAttribute(ComponentTag tag)
builds the sizes attribute of the img tag
|
protected void |
buildSrcAttribute(ComponentTag tag,
IModel<?> srcModel)
Builds the src attribute
|
protected void |
buildSrcSetAttribute(ComponentTag tag,
IModel<List<Serializable>> srcSetModel)
Builds the srcset attribute if multiple models are found as varargs
|
Image.Cors |
getCrossOrigin()
Gets the cross origin settings
|
IModel<List<Serializable>> |
getSrcSetModel()
Gets a list of models containing the src set values
|
protected void |
onComponentTag(ComponentTag tag)
Processes the component tag.
|
protected void |
onDetach()
Detaches the srcSetModels
|
void |
removeSizes()
Removes all sizes values.
|
void |
removeXValues()
Removes all x values from the image src set.
|
void |
setCrossOrigin(Image.Cors crossOrigin)
Sets the cross origin settings
|
void |
setSizes(String... sizes) |
void |
setSrcSetModel(IModel<List<Serializable>> srcSetModel)
Sets the source set model
|
void |
setXValues(String... values) |
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession, onRenderadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, get, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalInitialize, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onAfterRenderChildren, onBeforeRender, onComponentTagBody, onConfigure, onEvent, onInitialize, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModel, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, toString, toString, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrappublic ExternalImage(String id)
id - the component idpublic ExternalImage(String id, Serializable src)
id - the component idsrc - the source URLpublic ExternalImage(String id, Serializable src, List<Serializable> srcSet)
id - the component idsrc - the source URLsrcSet - a list of URLs placed in the srcSet attributepublic ExternalImage(String id, IModel<Serializable> srcModel)
id - the component idsrcModel - the model source URLpublic ExternalImage(String id, IModel<Serializable> srcModel, IModel<List<Serializable>> srcSetModel)
id - the component idsrcModel - the model source URLsrcSetModel - a model list of URLs placed in the srcSet attributeprotected void onComponentTag(ComponentTag tag)
ComponentonComponentTag in class Componenttag - Tag to modifyprotected void buildSrcAttribute(ComponentTag tag, IModel<?> srcModel)
tag - the component tagsrcModel - the model containing the src URLprotected void buildSrcSetAttribute(ComponentTag tag, IModel<List<Serializable>> srcSetModel)
tag - the component tagsrcSetModel - the models containing the src set URLsprotected void buildSizesAttribute(ComponentTag tag)
tag - the component tagpublic void setXValues(String... values)
values - the x values to be used in the srcsetpublic void removeSizes()
public void setSizes(String... sizes)
sizes - the sizes to be used in the sizepublic void removeXValues()
public Image.Cors getCrossOrigin()
org.apache.wicket.markup.html.image.Image#setCrossOrigin(Cors)}public void setCrossOrigin(Image.Cors crossOrigin)
crossOrigin - the cross origins settings to setorg.apache.wicket.markup.html.image.Image#setCrossOrigin(Cors)}public IModel<List<Serializable>> getSrcSetModel()
public void setSrcSetModel(IModel<List<Serializable>> srcSetModel)
srcSetModel - the model of a list of src set entriesCopyright © 2006–2021 Apache Software Foundation. All rights reserved.