PAJES 2.3.9

org.pajes.html
Class StyleSheet

java.lang.Object
  extended byorg.pajes.html.Tag
      extended byorg.pajes.html.TraversableElement
          extended byorg.pajes.html.Container
              extended byorg.pajes.html.StyleSheet
All Implemented Interfaces:
java.lang.Cloneable, HTML, java.io.Serializable, Traversable

public class StyleSheet
extends Container

This class builds the STYLE tag and all of the Style Attributes that appear between the STYLE and /STYLE 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
StyleSheet()
          Creates an empty style sheet.
StyleSheet(java.lang.String contentType)
          Creates and empty style sheet of the specified type.
 
Method Summary
 Container add(HTML plainText)
          Over-rides Container.add(HTML) to prevent anything except text being added to a stylesheet object.
 Container add(java.lang.String text, boolean suppressNewLine)
          Adds a line to the style sheet.
 StyleSheet setType(java.lang.String contentType)
          Set the Style Sheet Type
 
Methods inherited from class org.pajes.html.Container
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

StyleSheet

public StyleSheet()
Creates an empty style sheet.


StyleSheet

public StyleSheet(java.lang.String contentType)
Creates and empty style sheet of the specified type.

Parameters:
contentType - the content type (eg. text/css)
Method Detail

setType

public StyleSheet setType(java.lang.String contentType)
Set the Style Sheet Type

Parameters:
contentType - the content type (eg. text/css)
Returns:
the modified StyleSheet object.

add

public Container add(HTML plainText)
Over-rides Container.add(HTML) to prevent anything except text being added to a stylesheet object.

Overrides:
add in class Container
Parameters:
plainText - the text to be added.
Returns:
the modified Container instance.
Throws:
TagException - if anything except PlainText is added to the style sheet.

add

public Container add(java.lang.String text,
                     boolean suppressNewLine)
Adds a line to the style sheet.

Overrides:
add in class Container
Parameters:
text - the style sheet text.
suppressNewLine - suppresses a new line after the text.
Returns:
the modified Container object.

PAJES 2.3.9

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