org.ujac.print
Class DynamicContentContainer

java.lang.Object
  extended by org.ujac.print.BaseDocumentTag
      extended by org.ujac.print.DynamicContentContainer
All Implemented Interfaces:
CommonAttributesHolder, ElementContainer, PhraseHolder

public class DynamicContentContainer
extends BaseDocumentTag
implements PhraseHolder, ElementContainer

Name: DynamicContentContainer
Description: A container tag holding results of dynamic content evaluation.

Author:
lauerc

Field Summary
protected  ElementContainer elementContainer
          The element container.
static String TAG_NAME
          The item's name.
 
Fields inherited from class org.ujac.print.BaseDocumentTag
actualContent, attributes, condition, content, customAttributes, DEFAULT_FONT, DEFAULT_FONT_COLOR, DEFAULT_FONT_ENCODING, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_LEADING, DEFAULT_LINE_SPACING, depth, documentHandler, IMAGE_CHUNK_ATTR, log, NUMBER_OF_PAGES_TEMPLATES, parentItem, previousItem, styleParent, supportedAttributeMap, supportedChildMap, supportedStyleAttributeMap, tagFactory
 
Constructor Summary
DynamicContentContainer()
           
 
Method Summary
 void addChunk(BaseDocumentTag item, com.lowagie.text.Chunk chunk)
          Adds the given chunk to the root phrase.
 void addChunk(BaseDocumentTag item, String chunk, DocumentFont font)
          Adds the given chunk to the root phrase.
 void addElement(BaseDocumentTag item, com.lowagie.text.Element element)
          Adds a element to the container.
 void closeItem()
          Processes the item.
 void flushContent()
          Flushes the content buffer.
 com.lowagie.text.Phrase getContents()
          Getter method for the the property contents.
 String getDescription()
          Gets a description for the item.
 float getLeading()
          Gets the fixed vertical leading distance.
 float getLineSpacing()
          Gets the line spacing.
 String getName()
          Gets the item's name.
 void initialize()
          Initializes the item.
 boolean isStructureChecksDisabled()
          Tells whether or not to disable checks which test if this tag fits into its parent tag.
 boolean isTopLevel()
          Tells whether the element container is a top level container or not.
 boolean isVirtualContainer()
          Is the item virtual container, such as <if>, <else> or <foreach>.
 void openItem()
          Opens the item.
 void setContents(com.lowagie.text.Phrase contents)
          Setter method for the the property contents.
 
Methods inherited from class org.ujac.print.BaseDocumentTag
addAttributeDefinition, addChunk, addChunk, addChunk, addContent, addContent, addStyleAttributeDefinition, addToLatestCellContainer, addToLatestElementContainer, addToLatestPdfCellContainer, buildSupportedAttributes, buildSupportedChilds, buildSupportedStyleAttributes, checkAttributes, colorFromString, createChunk, createFont, ensureNumberOfPagesTemplate, evalAttribute, evalAttribute, extendLeading, extendLeading, extendLeading, extendLeading, filterContents, getActualContent, getAttribute, getAttribute, getAttributeDefinition, getAttributeHandler, getAttributes, getBackgroundColor, getBooleanAttribute, getBooleanAttribute, getBorderAttribute, getBorderAttribute, getColorAttribute, getColorAttribute, getCommonAttributesHolder, getContent, getCustomAttributes, getDepth, getDimensionAttribute, getDimensionAttribute, getDimensionAttribute, getDocumentHandler, getExamples, getFloatAttribute, getFloatAttribute, getFont, getHorizontalAlignmentAttribute, getHorizontalAlignmentAttribute, getIntegerAttribute, getIntegerAttribute, getLocalAttribute, getLocalFont, getLocalStyleAttribute, getParentItem, getPhraseContent, getPhraseHeight, getPhraseWidth, getPreviousItem, getRawAttribute, getSortedAttributeDefinitions, getSortedStyleAttributeDefinitions, getStringAttribute, getStringAttribute, getStringAttribute, getStyle, getStyleAttribute, getStyleAttribute, getStyleAttributeDefinition, getStyleAttributes, getStyleClass, getSupportedAttributes, getSupportedChilds, getSupportedChildTags, getSupportedStyleAttributes, getTagFactory, getTextAttribute, getTextAttribute, getTrimmedContent, getVerticalAlignmentAttribute, getVerticalAlignmentAttribute, handleContent, handleFontAttributes, hasContent, int2FontStyle, isAttributeDefined, isAttributeDefined, isAttributeDefined, isAttributeDefined, isAttributeSupported, isAttributeSupported, isAttributeSupported, isAttributeSupported, isDocumentRoot, isEmptyContent, isEmptyString, isIgnoreFlush, isItemClosed, isItemOpened, isPhraseEmpty, isRendered, isStyleable, isStyleAttributeDefined, isTextBodyAllowed, isTrimBody, isTrimNextHead, isValid, locator, preInitialize, printPhrase, processContents, processContents, resetContent, rotatePhrase, setAttributes, setBackgroundColor, setCustomAttributes, setDepth, setDocumentHandler, setItemClosed, setItemOpened, setLocalFont, setLocalFont, setName, setParentItem, setPreviousItem, setTagFactory, setTrimBody, setTrimNextHead, trimContentHead, trimContentTail, typeCastValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final String TAG_NAME
The item's name.

See Also:
Constant Field Values

elementContainer

protected ElementContainer elementContainer
The element container.

Constructor Detail

DynamicContentContainer

public DynamicContentContainer()
Method Detail

getName

public String getName()
Description copied from class: BaseDocumentTag
Gets the item's name.

Overrides:
getName in class BaseDocumentTag
Returns:
The item's name.
See Also:
BaseDocumentTag.getName()

getDescription

public String getDescription()
Description copied from class: BaseDocumentTag
Gets a description for the item.

Specified by:
getDescription in class BaseDocumentTag
Returns:
The item's description.
See Also:
BaseDocumentTag.getDescription()

isVirtualContainer

public boolean isVirtualContainer()
Description copied from class: BaseDocumentTag
Is the item virtual container, such as <if>, <else> or <foreach>.

Overrides:
isVirtualContainer in class BaseDocumentTag
Returns:
true if the item is such a container, else false.
See Also:
BaseDocumentTag.isVirtualContainer()

isStructureChecksDisabled

public boolean isStructureChecksDisabled()
Tells whether or not to disable checks which test if this tag fits into its parent tag. This method should be overwritten by custom classes which extent the default tag base of UJAC.

Overrides:
isStructureChecksDisabled in class BaseDocumentTag
Returns:
true if structure checks are disabled for this tag.

initialize

public void initialize()
                throws DocumentHandlerException
Initializes the item.

Overrides:
initialize in class BaseDocumentTag
Throws:
DocumentHandlerException - If something went badly wrong.

openItem

public void openItem()
              throws DocumentHandlerException
Description copied from class: BaseDocumentTag
Opens the item.

Overrides:
openItem in class BaseDocumentTag
Throws:
DocumentHandlerException - Thrown in case something went wrong while opening the document item.
See Also:
BaseDocumentTag.openItem()

flushContent

public void flushContent()
                  throws DocumentHandlerException
Flushes the content buffer.

Overrides:
flushContent in class BaseDocumentTag
Throws:
DocumentHandlerException - Thrown in case something went wrong while flushing the content buffer.

closeItem

public void closeItem()
               throws DocumentHandlerException
Processes the item.

Overrides:
closeItem in class BaseDocumentTag
Throws:
DocumentHandlerException - Thrown in case something went wrong while processing the document item.

addChunk

public void addChunk(BaseDocumentTag item,
                     String chunk,
                     DocumentFont font)
              throws DocumentHandlerException
Description copied from interface: PhraseHolder
Adds the given chunk to the root phrase.

Specified by:
addChunk in interface PhraseHolder
Parameters:
item - The document item.
chunk - The chunk to add to the root phrase.
font - The font to use.
Throws:
DocumentHandlerException - In case the document processing failed.
See Also:
org.ujac.print.PhraseHolder#addChunk(org.ujac.print.BaseDocumentTag, java.lang.String, com.lowagie.text.Font)

addChunk

public void addChunk(BaseDocumentTag item,
                     com.lowagie.text.Chunk chunk)
              throws DocumentHandlerException
Description copied from interface: PhraseHolder
Adds the given chunk to the root phrase.

Specified by:
addChunk in interface PhraseHolder
Parameters:
item - The document item.
chunk - The chunk to add to the root phrase.
Throws:
DocumentHandlerException - In case the document processing failed.
See Also:
PhraseHolder.addChunk(org.ujac.print.BaseDocumentTag, com.lowagie.text.Chunk)

getLeading

public float getLeading()
Description copied from interface: CommonAttributesHolder
Gets the fixed vertical leading distance.

Specified by:
getLeading in interface CommonAttributesHolder
Returns:
The current fixed vertical leading distance.
See Also:
CommonAttributesHolder.getLeading()

getLineSpacing

public float getLineSpacing()
Description copied from interface: CommonAttributesHolder
Gets the line spacing.

Specified by:
getLineSpacing in interface CommonAttributesHolder
Returns:
The current line spacing.
See Also:
CommonAttributesHolder.getLineSpacing()

addElement

public void addElement(BaseDocumentTag item,
                       com.lowagie.text.Element element)
                throws DocumentHandlerException
Description copied from interface: ElementContainer
Adds a element to the container.

Specified by:
addElement in interface ElementContainer
Parameters:
item - The document item.
element - The element to be added.
Throws:
DocumentHandlerException - If something went wrong when adding the element.
See Also:
ElementContainer.addElement(org.ujac.print.BaseDocumentTag, com.lowagie.text.Element)

isTopLevel

public boolean isTopLevel()
Description copied from interface: ElementContainer
Tells whether the element container is a top level container or not.

Specified by:
isTopLevel in interface ElementContainer
Returns:
true if the element container is a top level container, else false.
See Also:
ElementContainer.isTopLevel()

getContents

public com.lowagie.text.Phrase getContents()
Getter method for the the property contents.

Returns:
The current value of property contents.

setContents

public void setContents(com.lowagie.text.Phrase contents)
Setter method for the the property contents.

Parameters:
contents - The value to set for the property contents.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.