|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.html.HtmlElement | +--weblogic.html.ElementWithAttributes | +--weblogic.html.SinglePartElement | +--weblogic.html.ImageElement
An ImageElement is used to display an image (GIF/JPEG) on an htmlKona page and set the HTML attributes of the image, such as source, border, size, and alignment. This class also supports browser extensions that allow you to use an image as a server-side or client-side image map.
Here's an example of displaying a single JPG image.
HtmlPage hp = new HtmlPage(); hp.getHead() .addElement(new TitleElement("A Simple Image")); hp.getBodyElement() .setAttribute(BodyElement.bgColor, HtmlColor.white); TableElement tab = new TableElement(); tab.addElement(new TableRowElement() .addElement(new BoldElement("A Plane:")) .addElement(new ImageElement("http://public_html/images/GA-747.JPG"))); hp.getBody() .addElement(new HeadingElement("A Simple Image", 2)) .addElement(MarkupElement.HorizontalRule) .addElement(tab); hp.output();
ImagePage
,
MapElement
Fields inherited from class weblogic.html.HtmlElement |
codeset,
useObsolete |
Constructor Summary | |
ImageElement()
Deprecated. Constructs an ImageElement. |
|
ImageElement(HtmlElement src)
Deprecated. Constructs an ImageElement with the specified source. |
|
ImageElement(java.lang.String src)
Deprecated. Constructs an ImageElement with the specified source. |
Method Summary | |
protected java.lang.String |
getHtmlCode()
Deprecated. |
protected boolean |
printBody()
Deprecated. |
protected boolean |
printEndingTag()
Deprecated. |
ImageElement |
setAlign(AlignType val)
Deprecated. Sets the ALIGN attribute for an ImageElement. |
ImageElement |
setAlt(java.lang.String val)
Deprecated. Sets the ALT attribute for an ImageElement. |
ImageElement |
setBorder(int val)
Deprecated. Sets the BORDER attribute for an ImageElement. |
ImageElement |
setHeight(int val)
Deprecated. Sets the HEIGHT attribute for an ImageElement. |
ImageElement |
setHSpace(int val)
Deprecated. Sets the HSPACE attribute for an ImageElement. |
ImageElement |
setIsMap(boolean ismap)
Deprecated. Sets the ISMAP attribute for an ImageElement. |
ImageElement |
setLowSource(java.lang.String val)
Deprecated. Sets the LOWSRC attribute for an ImageElement. |
ImageElement |
setSource(java.lang.String val)
Deprecated. Sets the SRC attribute for an ImageElement. |
ImageElement |
setUseMap(HtmlElement url,
boolean ismap)
Deprecated. Sets the USEMAP attribute for an ImageElement. |
ImageElement |
setUseMap(java.lang.String url,
boolean ismap)
Deprecated. Sets the USEMAP attribute for an ImageElement. |
ImageElement |
setVSpace(int val)
Deprecated. Sets the VSPACE attribute for an ImageElement. |
ImageElement |
setWidth(int val)
Deprecated. Sets the WIDTH attribute for an ImageElement. |
ImageElement |
setWidth(java.lang.String val)
Deprecated. Sets the WIDTH attribute for an ImageElement. |
Methods inherited from class weblogic.html.SinglePartElement |
getElement,
printBody,
printBody,
printBody,
setElement,
setElement,
widthAsLiteral |
Methods inherited from class weblogic.html.ElementWithAttributes |
addAttribute,
addAttribute,
escapeQuotes,
getBooleanAttribute,
getElementAttribute,
getLocalVar,
getQuotedAttribute,
output,
output,
output,
printCR,
setBooleanAttribute,
setBooleanAttribute,
setClass,
setDirection,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setId,
setLang,
setLocalVar,
setQuotedAttribute,
setStyle |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ImageElement()
public ImageElement(java.lang.String src)
src
- SRC attribute for imagepublic ImageElement(HtmlElement src)
src
- SRC attribute for imageMethod Detail |
protected java.lang.String getHtmlCode()
protected boolean printEndingTag()
protected boolean printBody()
public ImageElement setAlign(AlignType val)
val
- AlignType objectpublic ImageElement setAlt(java.lang.String val)
val
- Text to be displayed if image is notpublic ImageElement setBorder(int val)
val
- Size of border in pixelspublic ImageElement setHeight(int val)
val
- Height of imagepublic ImageElement setHSpace(int val)
val
- Hspace of imagepublic ImageElement setIsMap(boolean ismap)
ImageElement ie = new ImageElement("icons.gif"); ie.setIsMap(true); hp.getBody() .addElement(new AnchorElement("/cgi-bin/imagemap", ie));
ismap
- True if the ISMAP attribute should be added to an ImageElementpublic ImageElement setLowSource(java.lang.String val)
val
- Source for the imagepublic ImageElement setSource(java.lang.String val)
val
- Source for the imagepublic ImageElement setUseMap(java.lang.String url, boolean ismap)
url
- URL for the map to use with the imageismap
- True to add the attribute ISMAPMapElement
public ImageElement setUseMap(HtmlElement url, boolean ismap)
url
- URL for the map to use with the imageismap
- True to add the attribute ISMAPMapElement
public ImageElement setVSpace(int val)
val
- Vspace of imagepublic ImageElement setWidth(int val)
val
- Width of imagepublic ImageElement setWidth(java.lang.String val)
val
- String (as in "50%")
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |