Package org.zkoss.stateless.sul
Interface IImage
- All Superinterfaces:
IAnyGroup<IImage>,IComponent<IImage>,IHtmlBasedComponent<IImage>,IImageBase<IImage>,IXulElement<IImage>
Immutable
Image component
An IImage component is used to display an image at the browser. There are two ways to assign an image to an image component.
First, you could use the of(String) or IImageBase.withSrc(String) to specify a URI where the image is located. This approach is similar to what HTML supports.
It is useful if you want to display a static image, or any image that can be identified by URL.
For example:
@RichletMapping("/example")
public IComponent example() {
return IImage.of("/stateless/ZK-Logo.gif");
}
Secondly, you could use the IImageBase.withContent(org.zkoss.image.Image) or IImageBase.withContent(RenderedImage) method to set the content of an image to an image component directly.
- Author:
- katherine
- See Also:
-
Image
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeIImage.static classBuilds an updater of typeIImageforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
Fields -
Method Summary
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IImageBase
getContent, getHover, getSrc, isPreloadImage, withContent, withContent, withHover, withPreloadImage, withSrcMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zul.wgt.Image"- Specified by:
getWidgetClassin interfaceIComponent<IImage>
-
of
Returns the instance with the givensrc.- Parameters:
src- The URI of the image source.
-
ofSize
Returns the instance with the givenwidthandheight.- Parameters:
width- The width of the image.height- The height of the image.
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-