|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object zk.Object zk.Widget zul.Widget zul.LabelImageWidget
public class LabelImageWidget
A skeletal implementation for ZUL widgets that support both label and image.
Field Summary |
---|
Fields inherited from class zk.Widget |
---|
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName |
Fields inherited from class zk.Object |
---|
$class, $oid |
Method Summary | |
---|---|
protected String |
domContent_()
Returns the HTML content of the label and image. |
protected String |
domImage_()
Returns the HTML image content. |
protected String |
domLabel_()
Returns the encoded label. |
String |
getHoverImage()
Returns the URI of the hover image. |
String |
getImage()
Returns the image URI. |
DOMElement |
getImageNode()
Returns the image node if any. |
String |
getLabel()
Returns the label (never null). |
void |
setHoverImage(String src)
Sets the image URI. |
void |
setImage(String image)
Sets the image URI. |
void |
setLabel(String label)
Sets the label. |
protected void |
updateDomContent_()
Updates the DOM tree for the modified label and image. |
Methods inherited from class zul.Widget |
---|
afterKeyDown_, beforeCtrlKeys_, getContext, getCtrlKeys, getOpenTooltip, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
Methods inherited from class zk.Object |
---|
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getLabel()
Default: "".
public void setLabel(String label)
If label is changed, the whole component is invalidate.
Thus, you want to smart-update, you have to override updateDomContent_()
.
label
- public String getImage()
Default: null.
public void setImage(String image)
image
- the URI of the imagepublic String getHoverImage()
Default: null.
public void setHoverImage(String src)
src
- protected void updateDomContent_()
setLabel(_global_.String)
and setImage(_global_.String)
to update the new content of the
label and/or image to the DOM tree.
Default: invoke Widget.rerender(int)
to redraw and re-bind.
protected String domImage_()
protected String domLabel_()
zUtl.encodeXML(_global_.String, _global_.Map)
protected String domContent_()
domImage_()
,
domLabel_()
public DOMElement getImageNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |