SimpleServlets v5.5.0

com.simpleservlets.htmlobjects
Class HTMLImage

java.lang.Object
  extended by com.simpleservlets.htmlobjects.GenericHTMLElement
      extended by com.simpleservlets.htmlobjects.HTMLImage
All Implemented Interfaces:
HTMLElement, MustMinimizeEmpty, NoChildrenAllowed

public class HTMLImage
extends GenericHTMLElement
implements HTMLElement, NoChildrenAllowed, MustMinimizeEmpty

Inline image, <img> tag.

Author:
Paul Hyde

Field Summary
 
Fields inherited from interface com.simpleservlets.htmlobjects.HTMLElement
ZERO_LEN_ARRAY
 
Constructor Summary
HTMLImage()
           
HTMLImage(String url, int width, int height, String altText)
           
HTMLImage(String url, int width, int height, String altText, int border)
           
 
Method Summary
 void setAltText(String altText)
           
 void setBorder(int border)
           
 void setSafeToWrapWithWhitespace(boolean extraWhitespaceIsHarmless)
          On HTMLImage, this defaults to true.
 void setSize(int width, int height)
           
 void setSource(String url)
           
 
Methods inherited from class com.simpleservlets.htmlobjects.GenericHTMLElement
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.simpleservlets.htmlobjects.HTMLElement
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setStyle
 

Constructor Detail

HTMLImage

public HTMLImage(String url,
                 int width,
                 int height,
                 String altText,
                 int border)

HTMLImage

public HTMLImage(String url,
                 int width,
                 int height,
                 String altText)

HTMLImage

public HTMLImage()
Method Detail

setSource

public void setSource(String url)

setSize

public void setSize(int width,
                    int height)

setAltText

public void setAltText(String altText)

setBorder

public void setBorder(int border)

setSafeToWrapWithWhitespace

public void setSafeToWrapWithWhitespace(boolean extraWhitespaceIsHarmless)
On HTMLImage, this defaults to true. Use this method if needed to change from the default.

Overrides:
setSafeToWrapWithWhitespace in class GenericHTMLElement

SimpleServlets v5.5.0

Copyright © 2001-2007 Programix Incorporated. All rights reserved. SimpleServlets is free and is OSI Certified Open Source Software under the BSD license.