Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.ujac.print
Class BaseDocumentTag  view BaseDocumentTag download BaseDocumentTag.java

java.lang.Object
  extended byorg.ujac.print.BaseDocumentTag
All Implemented Interfaces:
org.ujac.print.tag.TagAttributes

public abstract class BaseDocumentTag
extends java.lang.Object
implements org.ujac.print.tag.TagAttributes

Name: BaseDocumentTag
Description: Description of class.

Log: $Log: BaseDocumentTag.java,v $
Log: Revision 1.17 2003/12/15 23:45:08 lauerc
Log: Added support for image holding chunks at method getPhraseWidth.
Log:
Log: Revision 1.16 2003/12/13 01:06:58 lauerc
Log: Making use of the xml reader class which is defined at the document handler to parse nested content now.
Log:
Log: Revision 1.15 2003/12/02 21:34:13 lauerc
Log: Fixed font handling.
Log:
Log: Revision 1.14 2003/11/27 01:15:46 lauerc
Log: Added method isAttributeSupported.
Log:
Log: Revision 1.13 2003/11/24 08:06:56 lauerc
Log: At method rotate phrase: Assuming the baseline position is 25% of the font size.
Log:
Log: Revision 1.12 2003/11/24 07:47:55 lauerc
Log: Moved phrase rotation to BaseDocumentTag.
Log:
Log: Revision 1.11 2003/11/24 00:31:27 lauerc
Log: Added methods getPhraseHeight and getPhraseWidth.
Log:
Log: Revision 1.10 2003/11/23 23:16:05 lauerc
Log: Fixed font handling.
Log:
Log: Revision 1.9 2003/11/23 17:20:57 lauerc
Log: Added missing javadoc tags.
Log:
Log: Revision 1.8 2003/11/23 14:01:52 lauerc
Log: Added method addContent.
Log:
Log: Revision 1.7 2003/11/21 00:57:18 lauerc
Log: Made almost all attribute values behave dynamic using the Expression interpreter.
Log:
Log: Revision 1.6 2003/11/01 12:05:19 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.5 2003/10/16 17:09:09 lauerc
Log: Using FontFactory to create fonts now.
Log:
Log: Revision 1.4 2003/10/13 19:17:49 lauerc
Log: In method addChunk: Creating new prase in case no phrase has been given as argument before adding the given chunk to it to avoid NullPointerExceptions.
Log:
Log: Revision 1.3 2003/09/29 23:07:30 lauerc
Log: Removed unneccessary import.
Log:
Log: Revision 1.2 2003/09/29 22:52:43 lauerc
Log: Allowed to define specific tag handlers, to enable users to extend the default tag set.
Log:
Log: Revision 1.1 2003/09/29 21:12:40 lauerc
Log: Renamed BaseDocumentItem to BaseDocumentTag.
Log:
Log: Revision 1.39 2003/09/01 22:45:00 lauerc
Log: Changed type of content to StringBuffer again.
Log: Fixed handling of splitted content to avoid errors while
Log: evaluating the item's content.
Log:
Log: Revision 1.38 2003/07/24 19:14:05 lauerc
Log: Fixed JavaDoc comments.
Log:
Log: Revision 1.37 2003/07/22 06:14:52 lauerc
Log: Removed method formatPhrase in advance of method addChunk.
Log: The content processing is now centralized at this method.
Log:
Log: Revision 1.36 2003/07/21 05:35:53 lauerc
Log: Centralized chunk handling.
Log:
Log: Revision 1.35 2003/07/19 15:30:56 lauerc
Log: Moved content trimming stuff to characters method of DocumentHandler.
Log:
Log: Revision 1.34 2003/07/18 06:51:38 lauerc
Log: Avoided crash due to recursive calling formatPhrase at due to
Log: dynamically nested XML content, by checking the ignoreFlush flag.
Log:
Log: Revision 1.33 2003/07/18 06:26:20 lauerc
Log: Content handling re-designed.
Log:
Log: Revision 1.32 2003/07/15 19:28:14 lauerc
Log: Added method getTrimmedContent.
Log:
Log: Revision 1.31 2003/07/10 23:09:01 lauerc
Log: Added method getSupportedChildItems, which generates a list of registered child items.
Log:
Log: Revision 1.30 2003/07/10 06:51:41 lauerc
Log: Not overwriting locator attribute (in case of re-initialization) at method initialize.
Log:
Log: Revision 1.29 2003/07/09 21:55:42 lauerc
Log: Added abstract method getDescription.
Log: Added method getExamples: This method returns null String,
Log: if you like to specify one or more examples for your item,
Log: overload this method.
Log:
Log: Revision 1.28 2003/07/08 22:11:40 lauerc
Log: Enabled redefinition of parent item.
Log:
Log: Revision 1.27 2003/07/07 06:55:16 lauerc
Log: Changed visibility of method initialize to public.
Log:
Log: Revision 1.26 2003/07/06 22:07:08 lauerc
Log: Added method getExcludedChilds.
Log:
Log: Revision 1.25 2003/06/28 09:48:09 lauerc
Log: Fixed syntax error at method formatPhrase.
Log:
Log: Revision 1.24 2003/06/27 06:29:11 lauerc
Log: Fixed bug in yml content recognition in method formatPhrase.
Log:
Log: Revision 1.23 2003/05/18 11:30:33 lauerc
Log: Checking for not supported items now.
Log: Checking if an attribute is required is based on attribute definitions now (see getSupportedAttributes).
Log:
Log: Revision 1.22 2003/05/10 09:29:33 lauerc
Log: Fixed incompabilities with JDK 1.3.
Log:
Log: Revision 1.21 2003/05/08 06:32:07 lauerc
Log: Reusing XML reader for dynamic content.
Log:
Log: Revision 1.20 2003/05/07 22:39:50 lauerc
Log: Fixed font handling.
Log:
Log: Revision 1.19 2003/04/29 20:32:29 lauerc
Log: Added item to the argument list of the addElement method of ElementContainer interface.
Log: Added item to the argument list of the addChunk method of PhraseHolder interface.
Log:
Log: Revision 1.18 2003/04/29 19:48:13 lauerc
Log: Added method isValid to check if this item is valid in the context of its surrounding condition item.
Log:
Log: Revision 1.17 2003/04/28 22:11:34 lauerc
Log: Added method containsWhitespacesOnly.
Log:
Log: Revision 1.16 2003/04/27 18:56:32 lauerc
Log: Fixed bug in handling line breaks at method formatPhrase.
Log:
Log: Revision 1.15 2003/04/26 00:17:25 lauerc
Log: Removed the nextItem attribute.
Log: Enhanced the formatPhrase method.
Log:
Log: Revision 1.14 2003/04/25 16:24:43 lauerc
Log: Fixed method colorFromString.
Log:
Log: Revision 1.13 2003/04/24 18:22:23 lauerc
Log: Added support for formatting items even in dynamic content.
Log:
Log: Revision 1.12 2003/04/08 23:50:09 lauerc
Log: Enhanced font support.
Log:
Log: Revision 1.11 2003/04/06 20:06:40 lauerc
Log: Reorganized imports.
Log:
Log: Revision 1.10 2003/04/05 15:46:41 lauerc
Log: Added support for header and footer item.
Log:
Log: Revision 1.9 2003/04/01 22:59:04 lauerc
Log: Improved exception handling.
Log:
Log: Revision 1.8 2003/03/31 22:27:54 lauerc
Log: Declared method getName as public.
Log: Added abstract methods getSupportedAttributes and getSupportedChilds which serve meta informations about the item.
Log: Added method isVirtualContainer, which tells whether the item has a physical representation in the document, such as a
Log: phrase, a cell or a table or not. Examples for virtual items are: if, else, foreach and font.
Log:
Log: Revision 1.7 2003/03/31 19:36:29 lauerc
Log: Added methods getBooleanAttribute and isAttributeDefined.
Log: Fixed method getBorderAttribute.
Log:
Log: Revision 1.6 2003/03/31 07:24:27 lauerc
Log: Added reference to parent item.
Log:
Log: Revision 1.5 2003/03/30 13:27:10 lauerc
Log: Added method initialize which is called prior the openItem method and does basic initialization stuff.
Log: Added property condition.
Log: Added property depth.
Log: Added properties nextItem and previousItem.
Log:
Log: Revision 1.4 2003/03/28 09:01:34 lauerc
Log: Added support for alignment PDF cells.
Log: Added method which parse alignment attributes.
Log:
Log: Revision 1.3 2003/03/27 10:28:45 lauerc
Log: Added helper methods for handling of attributes.
Log:
Log: Revision 1.2 2003/03/27 01:53:25 lauerc
Log: Further progress in printing stuff.
Log:
Log: Revision 1.1 2003/03/26 07:50:58 lauerc
Log: Initial revision.
Log:

Version:
$Revision: 1.17 $

Field Summary
protected  org.xml.sax.Attributes attributes
          The item's attributes.
private static java.util.Map colorMap
          A map holding the most common colors.
protected  Condition condition
          The condition.
protected  java.lang.StringBuffer content
          The item's content.
static DocumentFont DEFAULT_FONT
          The default font.
static java.awt.Color DEFAULT_FONT_COLOR
          The default font color.
static java.lang.String DEFAULT_FONT_FAMILY
          The default font family.
static float DEFAULT_FONT_SIZE
          The default font size.
static int DEFAULT_FONT_STYLE
          The default font style.
protected  int depth
          The item's depth in the document tree.
protected  DocumentHandler documentHandler
          The document handler.
private  org.xml.sax.XMLReader dynamicContentXmlReader
          The dynamic content XML reader.
private  boolean evaluateXml
          Flag telling whether to evaluate XML tags, which are embedded in the tags content or not.
private  FontHolder fontHolder
          The font holder.
private  boolean ignoreFlush
          The ignore flush flag.
private  boolean itemClosed
          Flag indicating whether the current item has already been closed or not.
private  boolean itemOpened
          Flag indicating whether the current item has just been opened or not.
private  org.xml.sax.Locator locator
          The document locator for better error handling.
protected  BaseDocumentTag parentItem
          The parent item.
protected  BaseDocumentTag previousItem
          The previous item.
protected  java.util.Map supportedAttributeMap
          The supported attribute map.
protected  DocumentTagFactory tagFactory
          The tag factory.
 
Fields inherited from interface org.ujac.print.tag.TagAttributes
ATTR_AUTHOR, ATTR_BACKGROUND_COLOR, ATTR_BAR_COLOR, ATTR_BAR_HEIGHT, ATTR_BAR_WIDTH, ATTR_BASELINE, ATTR_BORDER_COLOR, ATTR_BORDER_STYLE, ATTR_BORDER_WIDTH, ATTR_COLOR, ATTR_COLSPAN, ATTR_COLUMNS, ATTR_CONDITION, ATTR_COUNT, ATTR_CREATION_DATE, ATTR_CREATOR, ATTR_DEFAULT_VALUE, ATTR_DESCRIPTION_FONT, ATTR_DESCRIPTION_PATTERN, ATTR_DESCRIPTIONS, ATTR_DRAW_FOREGROUND, ATTR_FAMILY, ATTR_FONT_DEF, ATTR_FORMAT, ATTR_GENERATE_CHECKSUM, ATTR_GROUP_NAME, ATTR_HEIGHT, ATTR_HORIZONTAL_ALIGNMENT, ATTR_KEEP_HEADER, ATTR_KEYWORDS, ATTR_LEADING, ATTR_LETTERED, ATTR_LIST, ATTR_LOOP_VARIABLE, ATTR_MARGIN_BOTTOM, ATTR_MARGIN_LEFT, ATTR_MARGIN_RIGHT, ATTR_MARGIN_TOP, ATTR_NAME, ATTR_NEW_PAGE, ATTR_NO_WRAP, ATTR_NUMBER, ATTR_NUMBERED, ATTR_OPTIONAL, ATTR_PADDING, ATTR_PADDING_BOTTOM, ATTR_PADDING_LEFT, ATTR_PADDING_RIGHT, ATTR_PADDING_TOP, ATTR_PERCENT_FORMAT, ATTR_PRINT_HEADER, ATTR_REFERENCE, ATTR_ROTATE, ATTR_SEQUENCE, ATTR_SIZE, ATTR_SOURCE, ATTR_START_STOP_TEXT, ATTR_STYLE, ATTR_SUBJECT, ATTR_SYMBOL_INDENT, ATTR_TEXT_COLOR, ATTR_TEXTWRAP, ATTR_TITLE, ATTR_TITLE_FONT, ATTR_TYPE, ATTR_UNDERLYING, ATTR_VALUE, ATTR_VALUE_FORMAT, ATTR_VALUES, ATTR_VERTICAL_ALIGNMENT, ATTR_WIDTH, ATTR_WIDTHS, ATTR_X, ATTR_Y
 
Constructor Summary
BaseDocumentTag()
           
 
Method Summary
 com.lowagie.text.Phrase addChunk(BaseDocumentTag item, com.lowagie.text.Phrase phrase, com.lowagie.text.Chunk chunk)
          Adds the given chunk to the root phrase.
 com.lowagie.text.Phrase addChunk(BaseDocumentTag item, com.lowagie.text.Phrase phrase, java.lang.String chunk, com.lowagie.text.Font font)
          Adds the given chunk to the root phrase.
 com.lowagie.text.Phrase addChunk(com.lowagie.text.Phrase phrase)
          Adds the current content to the given root phrase.
 void addContent(char[] content, int offset, int length)
          Adds the specified subset of the given character array to the content buffer.
 void addContent(java.lang.String content)
          Adds the given String to the content buffer.
protected  void addToLatestCellContainer(com.lowagie.text.Cell cell)
          Adds the cell at the latest parent item.
protected  void addToLatestElementContainer(com.lowagie.text.Element element)
          Adds the element at the latest parent item.
protected  void addToLatestPdfCellContainer(com.lowagie.text.pdf.PdfPCell cell)
          Adds the cell at the latest parent item.
 void closeItem()
          s Closes the item.
protected  java.awt.Color colorFromString(java.lang.String color)
          Gets the color from the given String.
protected static DocumentFont createFont(java.lang.String family, float size, int style, java.awt.Color color)
          Creates the item's font according to the item's attributes.
 void flushContent()
          Flushes the content buffer.
protected  java.lang.String getAttribute(java.lang.String name, boolean evaluate)
          Gets the value for the given attribute's name.
protected  java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue, boolean evaluate)
          Gets the value for the given attribute's name.
protected  AttributeDefinition getAttributeDefinition(java.lang.String name)
          Gets the attribute definition for the given name
 org.xml.sax.Attributes getAttributes()
          Gets the item's attributes.
protected  boolean getBooleanAttribute(java.lang.String name, boolean evaluate)
          Gets the boolean value for the given attribute's name.
protected  boolean getBooleanAttribute(java.lang.String name, boolean defaultValue, boolean evaluate)
          Gets the boolean value for the given attribute's name.
protected  int getBorderAttribute(java.lang.String name, boolean evaluate)
          Gets the border value for the given attribute's name.
protected  int getBorderAttribute(java.lang.String name, int defaultValue, boolean evaluate)
          Gets the border value for the given attribute's name.
protected  java.awt.Color getColorAttribute(java.lang.String name, boolean evaluate)
          Gets the color value for the given attribute's name.
protected  java.awt.Color getColorAttribute(java.lang.String name, java.awt.Color defaultValue, boolean evaluate)
          Gets the color value for the given attribute's name.
 java.lang.String getContent()
          Gets the current content.
 int getDepth()
          Gets the item's depth in the document tree.
abstract  java.lang.String getDescription()
          Gets a description for the item.
 DocumentHandler getDocumentHandler()
          Gets the document handler.
 java.lang.String getExamples()
          Gets examples for the item.
protected  float getFloatAttribute(java.lang.String name, boolean evaluate)
          Gets the float value for the given attribute's name.
protected  float getFloatAttribute(java.lang.String name, float defaultValue, boolean evaluate)
          Gets the float value for the given attribute's name.
 DocumentFont getFont()
          Gets the font.
protected  int getHorizontalAlignmentAttribute(java.lang.String name, boolean evaluate)
          Gets the horizontal alignment value for the given attribute's name.
protected  int getHorizontalAlignmentAttribute(java.lang.String name, int defaultValue, boolean evaluate)
          Gets the horizontal alignment value for the given attribute's name.
protected  int getIntegerAttribute(java.lang.String name, boolean evaluate)
          Gets the integer value for the given attribute's name.
protected  int getIntegerAttribute(java.lang.String name, int defaultValue, boolean evaluate)
          Gets the integer value for the given attribute's name.
abstract  java.lang.String getName()
          Gets the item's name.
 BaseDocumentTag getParentItem()
          Gets the parent item.
protected  float getPhraseHeight(com.lowagie.text.Phrase item)
          Gets the height of the given phrase.
protected  float getPhraseWidth(com.lowagie.text.Phrase item)
          Gets the width of the given phrase.
 BaseDocumentTag getPreviousItem()
          Gets the previous item.
abstract  AttributeDefinition[] getSupportedAttributes()
          Gets the list of supported attributes.
abstract  ChildDefinition[] getSupportedChilds()
          Gets the list of supported childs.
 java.util.List getSupportedChildTags()
          Finds the supported child tags from the DocumentTagFactory using the informations from the methods getSupportedChilds and getExcludedChilds.
 DocumentTagFactory getTagFactory()
          Gets the document tag factory.
 java.lang.String getTrimmedContent()
          Gets the trimmed content.
protected  int getVerticalAlignmentAttribute(java.lang.String name, boolean evaluate)
          Gets the vertical alignment value for the given attribute's name.
protected  int getVerticalAlignmentAttribute(java.lang.String name, int defaultValue, boolean evaluate)
          Gets the vertical alignment value for the given attribute's name.
 boolean hasContent()
          Gets the current content.
 void initialize()
          Initializes the item.
protected  boolean isAttributeDefined(java.lang.String name)
          Checks whether the given attribute is defined or not.
protected  boolean isAttributeSupported(java.lang.String name)
          Checks, if the given attribute is supported.
protected  boolean isEmptyContent()
          Checks if the content contains no or no real data.
protected  boolean isIgnoreFlush()
          Gets the ignore flush flag.
 boolean isItemClosed()
          Gets the item closed flag.
 boolean isItemOpened()
          Gets the item opened flag.
protected  boolean isValid()
          Checks whether the condition is valid or not.
 boolean isVirtualContainer()
          Is the item virtual container, such as if, else or foreach.
 org.xml.sax.Locator locator()
          Gets the document locator, which describes the position of this item.
 void openItem()
          Opens the item.
private  void printPhrase(com.lowagie.text.pdf.PdfTemplate template, com.lowagie.text.Phrase phrase, float xPos, float yPos)
          Prints a phrase into the given template.
 void resetContent()
          Clears the current content.
protected  com.lowagie.text.Phrase rotatePhrase(com.lowagie.text.Phrase phrase, float rotate)
          Rotates the given phrase.
protected  void setAttributes(org.xml.sax.Attributes attributes)
          Sets the item's attributes.
protected  void setDepth(int depth)
          Sets the item's depht in the document tree.
protected  void setDocumentHandler(DocumentHandler documentHandler)
          Sets the document handler.
 void setItemClosed(boolean itemClosed)
          Sets the item closed flag.
 void setItemOpened(boolean itemOpened)
          Sets the item opened flag.
 void setParentItem(BaseDocumentTag item)
          Sets the parent item.
protected  void setPreviousItem(BaseDocumentTag item)
          Sets the previous item.
protected  void setTagFactory(DocumentTagFactory tagFactory)
          Sets the document tag factory.
protected  void trimContentTail()
          Trims off the tail of the content buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FONT_FAMILY

public static final java.lang.String DEFAULT_FONT_FAMILY
The default font family.

See Also:
Constant Field Values

DEFAULT_FONT_SIZE

public static final float DEFAULT_FONT_SIZE
The default font size.

See Also:
Constant Field Values

DEFAULT_FONT_COLOR

public static final java.awt.Color DEFAULT_FONT_COLOR
The default font color.


DEFAULT_FONT_STYLE

public static final int DEFAULT_FONT_STYLE
The default font style.

See Also:
Constant Field Values

DEFAULT_FONT

public static DocumentFont DEFAULT_FONT
The default font.


colorMap

private static final java.util.Map colorMap
A map holding the most common colors.


documentHandler

protected DocumentHandler documentHandler
The document handler.


tagFactory

protected DocumentTagFactory tagFactory
The tag factory.


depth

protected int depth
The item's depth in the document tree.


supportedAttributeMap

protected java.util.Map supportedAttributeMap
The supported attribute map.


attributes

protected org.xml.sax.Attributes attributes
The item's attributes.


content

protected java.lang.StringBuffer content
The item's content.


parentItem

protected BaseDocumentTag parentItem
The parent item.


previousItem

protected BaseDocumentTag previousItem
The previous item.


condition

protected Condition condition
The condition.


locator

private org.xml.sax.Locator locator
The document locator for better error handling.


fontHolder

private FontHolder fontHolder
The font holder.


ignoreFlush

private boolean ignoreFlush
The ignore flush flag.


dynamicContentXmlReader

private org.xml.sax.XMLReader dynamicContentXmlReader
The dynamic content XML reader.


itemOpened

private boolean itemOpened
Flag indicating whether the current item has just been opened or not.


itemClosed

private boolean itemClosed
Flag indicating whether the current item has already been closed or not.


evaluateXml

private boolean evaluateXml
Flag telling whether to evaluate XML tags, which are embedded in the tags content or not. Default is true, in case < or > characters are explicitely added to the content, this flag is switched to false.

Constructor Detail

BaseDocumentTag

public BaseDocumentTag()
Method Detail

getName

public abstract java.lang.String getName()
Gets the item's name.


getDescription

public abstract java.lang.String getDescription()
Gets a description for the item.


getExamples

public java.lang.String getExamples()
Gets examples for the item.


getSupportedAttributes

public abstract AttributeDefinition[] getSupportedAttributes()
Gets the list of supported attributes.


getSupportedChilds

public abstract ChildDefinition[] getSupportedChilds()
Gets the list of supported childs.


isVirtualContainer

public boolean isVirtualContainer()
Is the item virtual container, such as if, else or foreach.


getSupportedChildTags

public java.util.List getSupportedChildTags()
                                     throws TagInstantiationException
Finds the supported child tags from the DocumentTagFactory using the informations from the methods getSupportedChilds and getExcludedChilds.


getDocumentHandler

public DocumentHandler getDocumentHandler()
Gets the document handler.


setDocumentHandler

protected void setDocumentHandler(DocumentHandler documentHandler)
Sets the document handler.


getTagFactory

public DocumentTagFactory getTagFactory()
Gets the document tag factory.


setTagFactory

protected void setTagFactory(DocumentTagFactory tagFactory)
Sets the document tag factory.


getDepth

public int getDepth()
Gets the item's depth in the document tree.


setDepth

protected void setDepth(int depth)
Sets the item's depht in the document tree.


getAttributes

public org.xml.sax.Attributes getAttributes()
Gets the item's attributes.


setAttributes

protected void setAttributes(org.xml.sax.Attributes attributes)
Sets the item's attributes.


getParentItem

public BaseDocumentTag getParentItem()
Gets the parent item.


setParentItem

public void setParentItem(BaseDocumentTag item)
Sets the parent item.


getPreviousItem

public BaseDocumentTag getPreviousItem()
Gets the previous item.


setPreviousItem

protected void setPreviousItem(BaseDocumentTag item)
Sets the previous item.


setItemOpened

public void setItemOpened(boolean itemOpened)
Sets the item opened flag.


isItemOpened

public boolean isItemOpened()
Gets the item opened flag.


setItemClosed

public void setItemClosed(boolean itemClosed)
Sets the item closed flag.


isItemClosed

public boolean isItemClosed()
Gets the item closed flag.


locator

public org.xml.sax.Locator locator()
Gets the document locator, which describes the position of this item.


initialize

public void initialize()
                throws DocumentHandlerException
Initializes the item.


resetContent

public void resetContent()
Clears the current content.


addContent

public void addContent(char[] content,
                       int offset,
                       int length)
                throws DocumentHandlerException
Adds the specified subset of the given character array to the content buffer.


addContent

public void addContent(java.lang.String content)
                throws DocumentHandlerException
Adds the given String to the content buffer.


hasContent

public boolean hasContent()
Gets the current content.


getContent

public java.lang.String getContent()
Gets the current content.


getTrimmedContent

public java.lang.String getTrimmedContent()
Gets the trimmed content.


flushContent

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


trimContentTail

protected void trimContentTail()
Trims off the tail of the content buffer.


isIgnoreFlush

protected boolean isIgnoreFlush()
Gets the ignore flush flag.


isAttributeSupported

protected boolean isAttributeSupported(java.lang.String name)
                                throws TagAttributeException
Checks, if the given attribute is supported.


getAttributeDefinition

protected AttributeDefinition getAttributeDefinition(java.lang.String name)
                                              throws TagAttributeException
Gets the attribute definition for the given name


isAttributeDefined

protected boolean isAttributeDefined(java.lang.String name)
                              throws TagAttributeException
Checks whether the given attribute is defined or not.


getAttribute

protected java.lang.String getAttribute(java.lang.String name,
                                        boolean evaluate)
                                 throws TagAttributeException
Gets the value for the given attribute's name.


getAttribute

protected java.lang.String getAttribute(java.lang.String name,
                                        java.lang.String defaultValue,
                                        boolean evaluate)
                                 throws TagAttributeException
Gets the value for the given attribute's name.


getFloatAttribute

protected float getFloatAttribute(java.lang.String name,
                                  boolean evaluate)
                           throws TagAttributeException
Gets the float value for the given attribute's name.


getFloatAttribute

protected float getFloatAttribute(java.lang.String name,
                                  float defaultValue,
                                  boolean evaluate)
                           throws TagAttributeException
Gets the float value for the given attribute's name.


getIntegerAttribute

protected int getIntegerAttribute(java.lang.String name,
                                  boolean evaluate)
                           throws TagAttributeException
Gets the integer value for the given attribute's name.


getIntegerAttribute

protected int getIntegerAttribute(java.lang.String name,
                                  int defaultValue,
                                  boolean evaluate)
                           throws TagAttributeException
Gets the integer value for the given attribute's name.


getBooleanAttribute

protected boolean getBooleanAttribute(java.lang.String name,
                                      boolean evaluate)
                               throws TagAttributeException
Gets the boolean value for the given attribute's name.


getBooleanAttribute

protected boolean getBooleanAttribute(java.lang.String name,
                                      boolean defaultValue,
                                      boolean evaluate)
                               throws TagAttributeException
Gets the boolean value for the given attribute's name.


getColorAttribute

protected java.awt.Color getColorAttribute(java.lang.String name,
                                           boolean evaluate)
                                    throws TagAttributeException
Gets the color value for the given attribute's name.


getColorAttribute

protected java.awt.Color getColorAttribute(java.lang.String name,
                                           java.awt.Color defaultValue,
                                           boolean evaluate)
                                    throws TagAttributeException
Gets the color value for the given attribute's name.


getBorderAttribute

protected int getBorderAttribute(java.lang.String name,
                                 boolean evaluate)
                          throws TagAttributeException
Gets the border value for the given attribute's name.


getBorderAttribute

protected int getBorderAttribute(java.lang.String name,
                                 int defaultValue,
                                 boolean evaluate)
                          throws TagAttributeException
Gets the border value for the given attribute's name.


getHorizontalAlignmentAttribute

protected int getHorizontalAlignmentAttribute(java.lang.String name,
                                              boolean evaluate)
                                       throws TagAttributeException
Gets the horizontal alignment value for the given attribute's name.


getHorizontalAlignmentAttribute

protected int getHorizontalAlignmentAttribute(java.lang.String name,
                                              int defaultValue,
                                              boolean evaluate)
                                       throws TagAttributeException
Gets the horizontal alignment value for the given attribute's name.


getVerticalAlignmentAttribute

protected int getVerticalAlignmentAttribute(java.lang.String name,
                                            boolean evaluate)
                                     throws TagAttributeException
Gets the vertical alignment value for the given attribute's name.


getVerticalAlignmentAttribute

protected int getVerticalAlignmentAttribute(java.lang.String name,
                                            int defaultValue,
                                            boolean evaluate)
                                     throws TagAttributeException
Gets the vertical alignment value for the given attribute's name.


openItem

public void openItem()
              throws DocumentHandlerException
Opens the item.


closeItem

public void closeItem()
               throws DocumentHandlerException
s Closes the item.


addChunk

public com.lowagie.text.Phrase addChunk(com.lowagie.text.Phrase phrase)
                                 throws DocumentHandlerException
Adds the current content to the given root phrase.


addChunk

public com.lowagie.text.Phrase addChunk(BaseDocumentTag item,
                                        com.lowagie.text.Phrase phrase,
                                        java.lang.String chunk,
                                        com.lowagie.text.Font font)
                                 throws DocumentHandlerException
Adds the given chunk to the root phrase.


addChunk

public com.lowagie.text.Phrase addChunk(BaseDocumentTag item,
                                        com.lowagie.text.Phrase phrase,
                                        com.lowagie.text.Chunk chunk)
Adds the given chunk to the root phrase.


colorFromString

protected java.awt.Color colorFromString(java.lang.String color)
                                  throws TagAttributeException
Gets the color from the given String.


getFont

public DocumentFont getFont()
Gets the font.


addToLatestElementContainer

protected void addToLatestElementContainer(com.lowagie.text.Element element)
                                    throws DocumentHandlerException
Adds the element at the latest parent item.


addToLatestCellContainer

protected void addToLatestCellContainer(com.lowagie.text.Cell cell)
                                 throws DocumentHandlerException
Adds the cell at the latest parent item.


addToLatestPdfCellContainer

protected void addToLatestPdfCellContainer(com.lowagie.text.pdf.PdfPCell cell)
                                    throws DocumentHandlerException
Adds the cell at the latest parent item.


isEmptyContent

protected boolean isEmptyContent()
Checks if the content contains no or no real data.


isValid

protected boolean isValid()
Checks whether the condition is valid or not.


createFont

protected static final DocumentFont createFont(java.lang.String family,
                                               float size,
                                               int style,
                                               java.awt.Color color)
Creates the item's font according to the item's attributes.


getPhraseWidth

protected float getPhraseWidth(com.lowagie.text.Phrase item)
Gets the width of the given phrase.


getPhraseHeight

protected float getPhraseHeight(com.lowagie.text.Phrase item)
Gets the height of the given phrase.


rotatePhrase

protected com.lowagie.text.Phrase rotatePhrase(com.lowagie.text.Phrase phrase,
                                               float rotate)
                                        throws DocumentHandlerException
Rotates the given phrase.


printPhrase

private void printPhrase(com.lowagie.text.pdf.PdfTemplate template,
                         com.lowagie.text.Phrase phrase,
                         float xPos,
                         float yPos)
Prints a phrase into the given template.