SimpleServlets v5.5.0

com.simpleservlets.htmlobjects
Class HTMLPre

java.lang.Object
  extended by com.simpleservlets.htmlobjects.GenericHTMLElement
      extended by com.simpleservlets.htmlobjects.HTMLPre
All Implemented Interfaces:
HTMLElement

public class HTMLPre
extends GenericHTMLElement
implements HTMLElement

Pre-formatted text, <pre> tag.

Author:
Paul Hyde

Field Summary
 
Fields inherited from interface com.simpleservlets.htmlobjects.HTMLElement
ZERO_LEN_ARRAY
 
Constructor Summary
HTMLPre()
           
HTMLPre(HTMLElement element)
           
HTMLPre(String text)
           
 
Method Summary
 HTMLElement addln(HTMLElement element)
          Add the specified element to this container, followed by a HTMLString.NEWLINE.
 HTMLString addln(String text)
          Convenience method to wrap the specified text in an HTMLString and call addln(HTMLElement).
 
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, setSafeToWrapWithWhitespace, 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

HTMLPre

public HTMLPre(HTMLElement element)

HTMLPre

public HTMLPre(String text)

HTMLPre

public HTMLPre()
Method Detail

addln

public HTMLElement addln(HTMLElement element)
Add the specified element to this container, followed by a HTMLString.NEWLINE. The value returned is the same as the value passed in—allowing for convenient method chaining.

Parameters:
element - the element to add. null is ignored (and returned).
Returns:
the element added (same as what is passed in).

addln

public HTMLString addln(String text)
Convenience method to wrap the specified text in an HTMLString and call addln(HTMLElement). Only adds the specified text if it is not null and has a length greater than 0. The value returned is the HTMLString created, or null if the passed text was null or zero-length.


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.