|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.impl.LabelElement
org.zkoss.zul.impl.LabelImageElement
public class LabelImageElement
A HTML element with a label (LabelElement.getLabel())and an image (getImage()).
| Nested Class Summary | |
|---|---|
protected class |
LabelImageElement.ExtraCtrl
A utility class to implement AbstractComponent.getExtraCtrl(). |
| Field Summary |
|---|
| Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH |
| Fields inherited from interface org.zkoss.zk.ui.Component |
|---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
| Constructor Summary | |
|---|---|
LabelImageElement()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getImage()
Returns the image URI. |
org.zkoss.image.Image |
getImageContent()
Returns the content set by setImageContent(org.zkoss.image.Image). |
java.lang.String |
getImgTag()
Returns the HTML IMG tag for the image part, or null if no image is assigned ( isImageAssigned())
Used only for component template, not for application developers. |
java.lang.String |
getSrc()
Returns the src (an image URI). |
boolean |
isImageAssigned()
Returns whether the image is available. |
protected java.lang.Object |
newExtraCtrl()
|
void |
setImage(java.lang.String src)
Sets the image URI. |
void |
setImageContent(org.zkoss.image.Image image)
Sets the content directly. |
void |
setSrc(java.lang.String src)
Sets the src (the image URI). |
| Methods inherited from class org.zkoss.zul.impl.LabelElement |
|---|
getLabel, setLabel |
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
getAction, getAllOnClickAttrs, getContext, getInnerAttrs, getOuterAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip |
| Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
addEventListener, appendAsapAttr, focus, getDraggable, getDroppable, getHeight, getLeft, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, isAsapRequired, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex |
| Methods inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
addAnnotation, addAnnotation, addEventHandler, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isChildable, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LabelImageElement()
| Method Detail |
|---|
public java.lang.String getImage()
Default: null.
The same as getSrc().
public void setImage(java.lang.String src)
If src is changed, the component's inner is invalidate. Thus, you want to smart-update, you have to override this method.
The same as setSrc(java.lang.String).
public java.lang.String getSrc()
Default: null.
The same as getImage().
public void setSrc(java.lang.String src)
If src is changed, the component's inner is invalidate. Thus, you want to smart-update, you have to override this method.
The same as setImage(java.lang.String).
public void setImageContent(org.zkoss.image.Image image)
image - the image to display. If not null, it has higher
priority than getSrc().public org.zkoss.image.Image getImageContent()
setImageContent(org.zkoss.image.Image).
Note: it won't fetch what is set thru by setSrc(java.lang.String).
It simply returns what is passed to setImageContent(org.zkoss.image.Image).
public boolean isImageAssigned()
setImage(java.lang.String) or
setImageContent(org.zkoss.image.Image) is called with non-null.
public java.lang.String getImgTag()
isImageAssigned())
Used only for component template, not for application developers.
Note: the component template shall use this method to
generate the HTML tag, instead of using getImage().
protected java.lang.Object newExtraCtrl()
newExtraCtrl in class org.zkoss.zk.ui.HtmlBasedComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||