to.etc.domui.dom.html
Class Img
java.lang.Object
to.etc.domui.dom.css.CssBase
to.etc.domui.dom.html.NodeBase
to.etc.domui.dom.html.Img
- All Implemented Interfaces:
- IModelBinding, INodeErrorDelegate
- Direct Known Subclasses:
- DisplayCheckbox, DynaIma
public class Img
- extends NodeBase
The base tag for an Image.
Tips and tricks
To prevent the butt-ugly border on any image placed in an A tag add the following rule to the CSS:
a img {
border: medium none;
}
- Author:
- Frits Jalvingh
Created on Jun 4, 2008
Constructor Summary |
Img()
Creates an uninitialized image. |
Img(java.lang.Class<?> base,
java.lang.String src)
Creates an image with the specified source. |
Img(java.lang.String src)
Creates an image with the specified source. |
Method Summary |
ImgAlign |
getAlign()
|
java.lang.String |
getAlt()
Return the current "alt" string of the image. |
int |
getImgBorder()
|
java.lang.String |
getImgHeight()
|
java.lang.String |
getImgWidth()
|
java.lang.String |
getSrc()
Get the current source for the image as an absolute web app path. |
void |
setAlign(ImgAlign align)
|
void |
setAlt(java.lang.String alt)
Set the "alt" string of the image. |
void |
setImgBorder(int imgBorder)
|
void |
setImgHeight(java.lang.String imgHeight)
|
void |
setImgWidth(java.lang.String imgWidth)
|
void |
setSrc(java.lang.Class<?> base,
java.lang.String resurl)
Set the source as a Java resource based off the given class. |
void |
setSrc(java.lang.String src)
Set the source for this image as an absolute web app path. |
void |
visit(INodeVisitor v)
This must visit the appropriate method in the node visitor. |
Methods inherited from class to.etc.domui.dom.html.NodeBase |
$, acceptRequestParameter, addCssClass, addGlobalMessage, afterCreateContent, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, build, changed, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, componentHandleWebAction, createContent, findComponentBundle, forceRebuild, getActualID, getClicked, getComponentBundle, getCreateJS, getCssClass, getErrorDelegate, getErrorLocation, getMessage, getOnClickJS, getOnMouseDownJS, getPage, getParent, getParent, getParent, getSharedContext, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTitle, getUserObject, handleDrop, hasCssClass, hasError, internalClearDelta, internalClearDeltaFully, internalGetOldParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetTag, internalShelve, internalUnshelve, isBuilt, isFocusRequested, moveControlToModel, moveModelToControl, onAddedToPage, onBeforeFullRender, onForceRebuild, onHeaderContributors, onRefresh, onRemoveFromPage, onShelve, onUnshelve, refresh, remove, removeCssClass, renderJavascriptState, replaceWith, setClicked, setComponentBundle, setControlsEnabled, setCssClass, setErrorDelegate, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setSpecialAttribute, setTestID, setTitle, setUserObject, stretchHeight, toString |
Methods inherited from class to.etc.domui.dom.css.CssBase |
getBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndex |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Img
public Img()
- Creates an uninitialized image.
Img
public Img(java.lang.String src)
- Creates an image with the specified source. This should be an absolute web resource path. If the name is prefixed
with THEME/ it specifies an image from the current THEME's directory.
- Parameters:
src
-
Img
public Img(java.lang.Class<?> base,
java.lang.String src)
- Creates an image with the specified source. This should be an absolute web resource path. If the name is prefixed
with THEME/ it specifies an image from the current THEME's directory.
- Parameters:
src
-
visit
public void visit(INodeVisitor v)
throws java.lang.Exception
- Description copied from class:
NodeBase
- This must visit the appropriate method in the node visitor. It should NOT recurse it's children.
- Specified by:
visit
in class NodeBase
- Throws:
java.lang.Exception
getAlt
public java.lang.String getAlt()
- Return the current "alt" string of the image.
- Returns:
setAlt
public void setAlt(java.lang.String alt)
- Set the "alt" string of the image.
- Parameters:
alt
-
getSrc
public java.lang.String getSrc()
- Get the current source for the image as an absolute web app path.
- Returns:
setSrc
public void setSrc(java.lang.String src)
- Set the source for this image as an absolute web app path. If the name is prefixed
with THEME/ it specifies an image from the current THEME's directory.
- Parameters:
src
-
setSrc
public void setSrc(java.lang.Class<?> base,
java.lang.String resurl)
- Set the source as a Java resource based off the given class.
- Parameters:
base
- resurl
-
getAlign
public ImgAlign getAlign()
setAlign
public void setAlign(ImgAlign align)
getImgBorder
public int getImgBorder()
setImgBorder
public void setImgBorder(int imgBorder)
getImgHeight
public java.lang.String getImgHeight()
setImgHeight
public void setImgHeight(java.lang.String imgHeight)
getImgWidth
public java.lang.String getImgWidth()
setImgWidth
public void setImgWidth(java.lang.String imgWidth)