PAJES 2.3.9

org.pajes.html
Class Body

java.lang.Object
  extended byorg.pajes.html.Tag
      extended byorg.pajes.html.TraversableElement
          extended byorg.pajes.html.Container
              extended byorg.pajes.html.Body
All Implemented Interfaces:
java.lang.Cloneable, HTML, java.io.Serializable, Traversable
Direct Known Subclasses:
FrameSet

public class Body
extends Container

This class builds the BODY tag and all of the HTML objects that appear between the >body< and >/body< tags.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.pajes.html.Tag
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT
 
Constructor Summary
  Body()
          Builds an empty HTML body with no parameters or attributes set.
  Body(Color bgColor, Color textColor)
          Builds an HTML document body.
  Body(Color bgColor, Color textColor, int topMargin, int leftMargin)
          Builds an HTML document body.
  Body(java.lang.String imageURL)
          Builds an HTML document body.
protected Body(java.lang.String name, DocType docType)
          Builds an empty HTML body instance.
protected Body(java.lang.String name, java.lang.String docType)
          Deprecated. 2.3.8 Use Body(java.lang.String, org.pajes.html.DocType) constructor
 
Method Summary
 Body addOnLoadHandler(java.lang.String onLoad)
          Adds the JavaScript handler to any existing handler for this event.
 Body addOnUnLoadHandler(java.lang.String onUnLoad)
          Adds the JavaScript handler to any existing handler for this event.
 DocType getDocType()
          Returns the Document Type Declaration.
 java.lang.String getDocTypeHeader()
          Returns the DOCTYPE declaration.
 java.lang.String getOnLoadHandler()
          Gets the OnLoadHandler.
 java.lang.String getOnUnLoadHandler()
          Gets the OnUnLoadHandler.
 Body setActiveHyperlinkColor(Color color)
          Sets the colour of active hyper-links.
 Body setBackgroundImage(java.lang.String imageURL)
          Sets the image to appear on the background of the document.
 Body setBGColor(Color color)
          Sets the background colour of document.
 Body setHyperLinkColor(Color color)
          Sets the colour of hyper-links that have not been visited yet and are not active.
 Body setMarginBottom(int margin)
          Sets the number of pixels to offset the bottom margin of the document.
 Body setMarginHeight(int margin)
          Sets the number of pixels to offset the top and bottom margins of the document.
 Body setMarginLeft(int margin)
          Sets the number of pixels to offset the left margin of the document.
 Body setMarginRight(int margin)
          Sets the number of pixels to offset the right margin of the document.
 Body setMarginTop(int margin)
          Sets the number of pixels to offset the top margin of the document.
 Body setMarginWidth(int margin)
          Sets the number of pixels to offset the right and left margins of the document.
 Body setOnLoadHandler(java.lang.String onLoad)
          Sets the JavaScript handler for this event.
 Body setOnUnLoadHandler(java.lang.String onUnLoad)
          Sets the JavaScript handler for this event.
 Body setTextColor(Color color)
          Sets the colour of document text.
 Body setVisitedHyperLinkColor(Color color)
          Sets the colour of visited hyper-links.
 
Methods inherited from class org.pajes.html.Container
add, add, add, add, addContent, clear, clone, delete, delete, destroy, get, getContent, getContents, getPosition, insert, replace, set, setContent, setContent, size, writeContent
 
Methods inherited from class org.pajes.html.TraversableElement
dump, dump, getAll, getFieldByName, getFirstFieldByName, getFirstTagByAttribute, getFirstTagByClass, getFirstTagByID, getFirstTagByName, getTagByAttribute, getTagByClass, getTagByID, getTagByName, setWritable
 
Methods inherited from class org.pajes.html.Tag
addAttribute, addAttributes, addAttributes, clearAttribute, clearAttributes, getAttribute, getAttributes, getAttributeSet, getContainer, getDocument, getId, getOnClickHandler, getOnDBLClickHandler, getOnKeyDownHandler, getOnKeyPressHandler, getOnKeyUpHandler, getOnMouseDownHandler, getOnMouseOutHandler, getOnMouseOverHandler, getOnMouseUpHandler, getStyle, getStyleSheetClass, getTagName, getTitle, getWritePermission, init, initAttributes, isWritable, isWritable, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContainer, setId, setOnClickHandler, setOnDBLClickHandler, setOnKeyDownHandler, setOnKeyPressHandler, setOnKeyUpHandler, setOnMouseDownHandler, setOnMouseOutHandler, setOnMouseOverHandler, setOnMouseUpHandler, setStyle, setStyleSheetClass, setTagName, setTitle, setWritable, setWriteAttributes, setWriteEndTag, setWritelnAfter, setWritelnAfterContent, setWritelnBefore, setWritelnBeforeContent, setWritePermission, toString, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Body

public Body()
Builds an empty HTML body with no parameters or attributes set.


Body

public Body(Color bgColor,
            Color textColor)
Builds an HTML document body.

Parameters:
bgColor - sets the background color.
textColor - sets the text color.

Body

public Body(Color bgColor,
            Color textColor,
            int topMargin,
            int leftMargin)
Builds an HTML document body.

Parameters:
bgColor - sets the background color.
textColor - sets the text color.
topMargin - sets the number of pixels to leave. at the top of the page before any items appear.
leftMargin - sets the number of pixels to leave. at the left of the page before any items appear.

Body

public Body(java.lang.String imageURL)
Builds an HTML document body.

Parameters:
imageURL - sets the background image to be displayed on the page.

Body

protected Body(java.lang.String name,
               java.lang.String docType)
Deprecated. 2.3.8 Use Body(java.lang.String, org.pajes.html.DocType) constructor

Builds an empty HTML body instance.

Parameters:
name - the tag name.
docType - the DOCTYPE declaration.
Throws:
java.lang.IllegalArgumentException - if the docType cannot be parsed.

Body

protected Body(java.lang.String name,
               DocType docType)
Builds an empty HTML body instance.

Parameters:
name - the tag name.
docType - the XML DOCTYPE declaration.
Method Detail

setActiveHyperlinkColor

public Body setActiveHyperlinkColor(Color color)
Sets the colour of active hyper-links.

Parameters:
color - the named color or hexadecimal RGB notation.
Returns:
the modified Body object.

setBGColor

public Body setBGColor(Color color)
Sets the background colour of document.

Parameters:
color - the named color or hexadecimal RGB notation
Returns:
the modified Body object.

setBackgroundImage

public Body setBackgroundImage(java.lang.String imageURL)
Sets the image to appear on the background of the document.

Parameters:
imageURL - the URL of the image.
Returns:
the modified Body object.

getDocType

public DocType getDocType()
Returns the Document Type Declaration. Note that this method is used to return the default XHTML DOCTYPE when no DOCTYPE has been specifically defined for the Paje.

Returns:
the DOCTYPE declaration.
See Also:
Paje.setDocType(org.pajes.html.DocType)

getDocTypeHeader

public java.lang.String getDocTypeHeader()
Returns the DOCTYPE declaration. Note that this method is used to return the default XHTML DOCTYPE when no DOCTYPE has been specifically defined for the Paje.

Returns:
the DOCTYPE declaration.
See Also:
Paje.setDocType(org.pajes.html.DocType)

setHyperLinkColor

public Body setHyperLinkColor(Color color)
Sets the colour of hyper-links that have not been visited yet and are not active.

Parameters:
color - the named color or hexadecimal RGB notation.
Returns:
the modified Body object.

setMarginBottom

public Body setMarginBottom(int margin)
Sets the number of pixels to offset the bottom margin of the document.

Parameters:
margin - number of pixels to offset the bottom margin.
Returns:
the modified Body object.

setMarginHeight

public Body setMarginHeight(int margin)
Sets the number of pixels to offset the top and bottom margins of the document.

Parameters:
margin - number of pixels to offset the margin.
Returns:
the modified Body object.

setMarginLeft

public Body setMarginLeft(int margin)
Sets the number of pixels to offset the left margin of the document.

Parameters:
margin - number of pixels to offset the left margin.
Returns:
the modified Body object.

setMarginRight

public Body setMarginRight(int margin)
Sets the number of pixels to offset the right margin of the document.

Parameters:
margin - number of pixels to offset the right margin.
Returns:
the modified Body object.

setMarginTop

public Body setMarginTop(int margin)
Sets the number of pixels to offset the top margin of the document.

Parameters:
margin - number of pixels to offset the top margin.
Returns:
the modified Body object.

setMarginWidth

public Body setMarginWidth(int margin)
Sets the number of pixels to offset the right and left margins of the document.

Parameters:
margin - number of pixels to offset the margin.
Returns:
the modified Body object.

setOnLoadHandler

public Body setOnLoadHandler(java.lang.String onLoad)
Sets the JavaScript handler for this event.

Parameters:
onLoad - the JavaScript handler for this event.
Returns:
the modified Body object.

getOnLoadHandler

public java.lang.String getOnLoadHandler()
Gets the OnLoadHandler.

Returns:
the onloadhandler string.

setOnUnLoadHandler

public Body setOnUnLoadHandler(java.lang.String onUnLoad)
Sets the JavaScript handler for this event.

Parameters:
onUnLoad - the JavaScript handler for this event.
Returns:
the modified Body object.

getOnUnLoadHandler

public java.lang.String getOnUnLoadHandler()
Gets the OnUnLoadHandler.

Returns:
the onunloadhandler string.

setTextColor

public Body setTextColor(Color color)
Sets the colour of document text.

Parameters:
color - the named color or hexadecimal RGB notation
Returns:
the modified Body object.

setVisitedHyperLinkColor

public Body setVisitedHyperLinkColor(Color color)
Sets the colour of visited hyper-links.

Parameters:
color - the named color or hexadecimal RGB notation.
Returns:
the modified Body object.

addOnLoadHandler

public Body addOnLoadHandler(java.lang.String onLoad)
Adds the JavaScript handler to any existing handler for this event.

Parameters:
onLoad - the additional JavaScript handler for this event.
Returns:
the modified Body object.

addOnUnLoadHandler

public Body addOnUnLoadHandler(java.lang.String onUnLoad)
Adds the JavaScript handler to any existing handler for this event.

Parameters:
onUnLoad - the additional JavaScript handler for this event.
Returns:
the modified Body object.

PAJES 2.3.9

Copyright © 2002-2003 Viridian Pty Limited. All Rights Reserved.