|
||||||||||
| 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.Image
public class Image
An image.
Note: IE 5.5/6 (not 7) has a bug that failed to render PNG with
alpha transparency. See http://homepage.ntlworld.com/bobosola/index.htm for details.
Thus, if you want to display such image, you have to use the alphafix mold.
<image mold="alphafix"/>
| Nested Class Summary | |
|---|---|
protected class |
Image.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 | |
|---|---|
Image()
|
|
Image(java.lang.String src)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAlign()
Returns the alignment. |
java.lang.String |
getBorder()
Returns the width of the border. |
org.zkoss.image.Image |
getContent()
Returns the content set by setContent(org.zkoss.image.Image). |
java.lang.String |
getHspace()
Returns number of pixels of extra space to the left and right side of the image. |
java.lang.String |
getInnerAttrs()
Generates the Client-Side-Action attributes to the interior tag. |
java.lang.String |
getOuterAttrs()
|
java.lang.String |
getSrc()
Returns the source URI of the image. |
java.lang.String |
getVspace()
Returns number of pixels of extra space to the top and bottom side of the image. |
boolean |
isChildable()
Default: not childable. |
protected java.lang.Object |
newExtraCtrl()
|
void |
setAlign(java.lang.String align)
Sets the alignment: one of top, texttop, middle, absmiddle, bottom, absbottom, baseline, left, right and center. |
void |
setBorder(java.lang.String border)
Sets the width of the border. |
void |
setContent(org.zkoss.image.Image image)
Sets the content directly. |
void |
setHspace(java.lang.String hspace)
Sets number of pixels of extra space to the left and right side of the image. |
void |
setSrc(java.lang.String src)
Sets the source URI of the image. |
void |
setVspace(java.lang.String vspace)
Sets number of pixels of extra space to the top and bottom side of the image. |
void |
smartUpdate(java.lang.String attr,
java.lang.String value)
|
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
getAction, getAllOnClickAttrs, getContext, 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, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setParent, setVariable, setVisible, smartUpdate, smartUpdate, toString, unsetVariable |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Image()
public Image(java.lang.String src)
| Method Detail |
|---|
public java.lang.String getAlign()
Default: null (use browser default).
public void setAlign(java.lang.String align)
public java.lang.String getBorder()
Default: null (use browser default).
public void setBorder(java.lang.String border)
public java.lang.String getHspace()
Default: null (use browser default).
public void setHspace(java.lang.String hspace)
public java.lang.String getVspace()
Default: null (use browser default).
public void setVspace(java.lang.String vspace)
public java.lang.String getSrc()
Default: null.
public void setSrc(java.lang.String src)
If setContent(org.zkoss.image.Image) is ever called with non-null,
it takes heigher priority than this method.
src - the URI of the image sourcepublic void setContent(org.zkoss.image.Image image)
image - the image to display. If not null, it has higher
priority than getSrc().public org.zkoss.image.Image getContent()
setContent(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 setContent(org.zkoss.image.Image).
public java.lang.String getOuterAttrs()
getOuterAttrs in class XulElementpublic java.lang.String getInnerAttrs()
XulElement
getInnerAttrs in class XulElementpublic boolean isChildable()
isChildable in interface org.zkoss.zk.ui.ComponentisChildable in class org.zkoss.zk.ui.AbstractComponent
public void smartUpdate(java.lang.String attr,
java.lang.String value)
smartUpdate in interface org.zkoss.zk.ui.ComponentsmartUpdate in class org.zkoss.zk.ui.AbstractComponentprotected 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 | |||||||||