Expresso 5-6

com.jcorporate.expresso.services.html
Class Paragraph

java.lang.Object
  extended bycom.jcorporate.expresso.services.html.HtmlElement
      extended bycom.jcorporate.expresso.services.html.Paragraph

public class Paragraph
extends HtmlElement

An HTML paragraph object

Version:
$Revision: 1.8 $ $Date: 2004/11/17 20:48:18 $
Author:
Michael Nash

Field Summary
 
Fields inherited from class com.jcorporate.expresso.services.html.HtmlElement
attributes, contents, cSSClass, cSSID
 
Constructor Summary
Paragraph()
          Constructor
Paragraph(HtmlElement newElement)
          Constructor Create the paragraph with the given element as it's contents
Paragraph(String newString)
          Constructor Create a paragraph with the given name
 
Method Summary
protected  void display(PrintWriter out, int depth)
          Display the paragraph
 void setAlignment(String newAlignment)
          Set the horizontal alignment of the contents of this paragraph
 
Methods inherited from class com.jcorporate.expresso.services.html.HtmlElement
add, display, finalize, getAttribute, getContentCount, getCSSClass, getName, padWithTabs, setAttribute, setCSSClass, setCSSID, setDisplayed, setName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Paragraph

public Paragraph()
          throws HtmlException
Constructor

Throws:
HtmlException - If the superclass constructor fails

Paragraph

public Paragraph(HtmlElement newElement)
          throws HtmlException
Constructor Create the paragraph with the given element as it's contents

Parameters:
newElement - Element to use as contents
Throws:
HtmlException - If the parameter is invalid

Paragraph

public Paragraph(String newString)
          throws HtmlException
Constructor Create a paragraph with the given name

Parameters:
newString - Name of the new paragraph
Throws:
HtmlException - If the parameter is invalid
Method Detail

display

protected void display(PrintWriter out,
                       int depth)
                throws HtmlException
Display the paragraph

Specified by:
display in class HtmlElement
Parameters:
out - PrintWriter to the client
depth - the number of tabs to indent
Throws:
HtmlException - If the paragraph cannot be displayed

setAlignment

public void setAlignment(String newAlignment)
                  throws HtmlException
Set the horizontal alignment of the contents of this paragraph

Parameters:
newAlignment - New alignment as a string. Must be "left", "right" or "center"
Throws:
HtmlException - If the parameter is invalid

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.