|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LabelImageElement
A XUL element with a label (LabelElement.getLabel()) and an image (
getImage()).
| Field Summary |
|---|
| Fields inherited from interface org.zkoss.zk.ui.Component |
|---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
| Method Summary | |
|---|---|
java.lang.String |
getHoverImage()
Returns the URI of the hover image. |
java.lang.String |
getImage()
Returns the image URI. |
Image |
getImageContent()
Returns the image content set by setImageContent(Image) or
setImageContent(RenderedImage). |
void |
setHoverImage(java.lang.String src)
Sets the image URI. |
void |
setHoverImageContent(Image image)
Sets the content of the hover image directly. |
void |
setHoverImageContent(java.awt.image.RenderedImage image)
Sets the content of the hover image directly with the rendered image. |
void |
setImage(java.lang.String src)
Sets the image URI. |
void |
setImageContent(Image image)
Sets the content directly. |
void |
setImageContent(java.awt.image.RenderedImage image)
Sets the content directly with the rendered image. |
| Methods inherited from interface org.zkoss.zul.impl.api.LabelElement |
|---|
getLabel, setLabel |
| Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
|---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
|---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Method Detail |
|---|
java.lang.String getImage()
Default: null.
void setImage(java.lang.String src)
Calling this method implies setImageContent(null). In other words, the
last invocation of setImage(java.lang.String) overrides the previous
setImageContent(org.zkoss.image.Image), if any.
If src is changed, the component's inner is invalidate. Thus, you want to smart-update, you have to override this method.
setImageContent(Image),
setImageContent(RenderedImage)void setImageContent(Image image)
Default: null.
Calling this method implies setImage(null). In other words, the last
invocation of setImageContent(org.zkoss.image.Image) overrides the previous
setImage(java.lang.String), if any.
image - the image to display.setImage(java.lang.String)void setImageContent(java.awt.image.RenderedImage image)
Image) with
Images.encode(java.lang.String, java.awt.image.RenderedImage, float, boolean), and then invoke
setImageContent(org.zkoss.image.Image).
If you want more control such as different format, quality, and naming,
you can use Images directly.
Image getImageContent()
setImageContent(Image) or
setImageContent(RenderedImage).
Note: it won't load the content specified by setImage(java.lang.String). Actually,
it returns null if setImage(java.lang.String) was called.
java.lang.String getHoverImage()
Default: null.
void setHoverImage(java.lang.String src)
Calling this method implies setHoverImageContent(null). In other words,
the last invocation of setHoverImage(java.lang.String) overrides the previous
setHoverImageContent(org.zkoss.image.Image), if any.
void setHoverImageContent(Image image)
Default: null.
Calling this method implies setHoverImage(null). In other words, the last
invocation of setHoverImageContent(org.zkoss.image.Image) overrides the previous
setHoverImage(java.lang.String), if any.
image - the image to display.void setHoverImageContent(java.awt.image.RenderedImage image)
It actually encodes the rendered image to an PNG image (
Image) with Images.encode(java.lang.String, java.awt.image.RenderedImage, float, boolean), and then
invoke setHoverImageContent(org.zkoss.image.Image).
If you want more control such as different format, quality, and naming,
you can use Images directly.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||