PAJES 3.0.21

org.pajes.html
Class StyleSheet

java.lang.Object
  extended by org.pajes.html.Tag
      extended by org.pajes.html.TraversableElement
          extended by org.pajes.html.Container
              extended by org.pajes.html.StyleSheet
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HTML, 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
 Traversable 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, getParent, getStyle, getStyleSheetClass, getTagName, getTitle, getWritePermission, hasAttribute, init, initAttributes, isChildOf, isChildOf, 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, setParent, 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
 
Methods inherited from interface org.pajes.html.Traversable
isWritable
 
Methods inherited from interface org.pajes.html.HTML
getContainer, getDocument, getId, getParent, getWritePermission, isChildOf, isChildOf, setContainer, setParent, setWritePermission, write
 

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

add

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

Specified by:
add in interface Traversable
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.

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.

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.