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

Quick Search    Search Deep

org.ujac.print.tag
Class HeaderFooterPartTag  view HeaderFooterPartTag download HeaderFooterPartTag.java

java.lang.Object
  extended byorg.ujac.print.BaseDocumentTag
      extended byorg.ujac.print.tag.HeaderFooterPartTag
All Implemented Interfaces:
org.ujac.print.PhraseHolder, TagAttributes
Direct Known Subclasses:
FooterPartTag, HeaderPartTag

public abstract class HeaderFooterPartTag
extends org.ujac.print.BaseDocumentTag
implements org.ujac.print.PhraseHolder

Name: HeaderFooterPartTag.java
Description: Description of class.

Log: $Log: HeaderFooterPartTag.java,v $
Log: Revision 1.10 2003/12/15 23:50:42 lauerc
Log: Taking care of image holding chunks.
Log:
Log: Revision 1.9 2003/12/02 21:35:23 lauerc
Log: Fixed font handling.
Log:
Log: Revision 1.8 2003/11/24 00:32:11 lauerc
Log: Moved phrase measuring stuff up into BaseDocumentTag class.
Log:
Log: Revision 1.7 2003/11/23 03:07:03 lauerc
Log: Cleaned up code.
Log: Fixed javadoc comments.
Log:
Log: Revision 1.6 2003/11/22 00:29:44 lauerc
Log: At method onCloseDocument: In case no numberOfPagesTemplate has been built, skipping output to avoid NullPointerException.
Log:
Log: Revision 1.5 2003/11/21 00:57:42 lauerc
Log: Made almost all attribute values behave dynamic using the Expression interpreter.
Log:
Log: Revision 1.4 2003/11/01 12:05:19 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.3 2003/10/16 17:08:38 lauerc
Log: Added support for font tags and tags 'number-format' and 'date-format'.
Log:
Log: Revision 1.2 2003/10/09 18:56:19 lauerc
Log: Added support for dynamic header or footer content.
Log:
Log: Revision 1.1 2003/09/29 21:15:03 lauerc
Log: Renamed classes from XyzItem to XyzTag.
Log:
Log: Revision 1.6 2003/07/18 06:26:01 lauerc
Log: Content handling re-designed.
Log:
Log: Revision 1.5 2003/07/07 06:57:46 lauerc
Log: Changed visibility of method initialize to public.
Log:
Log: Revision 1.4 2003/05/18 11:31:26 lauerc
Log: Checking if an attribute is required or not is based on attribute definitions now (see getSupportedAttributes).
Log:
Log: Revision 1.3 2003/05/18 10:17:32 lauerc
Log: Moved attribute definitions to the child classes.
Log:
Log: Revision 1.2 2003/04/29 20:33:00 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.1 2003/04/07 23:03:48 lauerc
Log: Initial revision.
Log:

Version:
$Revision: 1.10 $

Nested Class Summary
(package private)  class HeaderFooterPartTag.ContentPart
          Title: Itembr> Description: The class holding the parts of the content.

Log: $Log: HeaderFooterPartTag.java,v $
Log: Revision 1.10 2003/12/15 23:50:42 lauerc
Log: Taking care of image holding chunks.
 
Field Summary
protected  java.awt.Color bgColor
          The background color of t
protected  java.awt.Color borderColor
          The color of the cell's border.
protected  int borderStyle
          The style of the cell's border.
protected  float borderWidth
          The width of the cell's border.
protected  com.lowagie.text.pdf.PdfContentByte cb
          This is the contentbyte object of the writer.
protected  int hAlign
          The horizontal alignment.
protected  HeaderFooterTag headerFooterItem
          The parent item.
protected  java.util.List items
          The item list.
private  com.lowagie.text.Font numberOfPagesFont
          The font for the number of pages text.
protected  com.lowagie.text.pdf.PdfTemplate numberOfPagesTemplate
          We will put the final number of pages in a template.
private  com.lowagie.text.Phrase phrase
          The phrase that holds the content.
private static org.ujac.print.ChildDefinition[] supportedChilds
          The item's supported childs.
protected  float verticalPosition
          The vertical position of the header/footer line.
 
Fields inherited from class org.ujac.print.BaseDocumentTag
attributes, condition, content, DEFAULT_FONT, DEFAULT_FONT_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, depth, documentHandler, parentItem, previousItem, supportedAttributeMap, tagFactory
 
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
HeaderFooterPartTag()
           
 
Method Summary
 void addChunk(org.ujac.print.BaseDocumentTag item, com.lowagie.text.Chunk chunk)
          Adds the given chunk to the root phrase.
 void addChunk(org.ujac.print.BaseDocumentTag item, java.lang.String chunk, com.lowagie.text.Font font)
          Adds the given chunk to the root phrase.
private  com.lowagie.text.Phrase clonePhrase(com.lowagie.text.Phrase phrase)
          Clones the given phrase.
 void closeItem()
          Closes the item.
 void flushContent()
          Flushes the content buffer.
 com.lowagie.text.Phrase getRootPhrase()
          Gets the root phrase.
 org.ujac.print.ChildDefinition[] getSupportedChilds()
          Gets the list of supported childs.
 void initialize()
          Initializes the item.
 void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          We override the onCloseDocument method.
 void onEndPage(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
          We override the onEndPage method.
 void openItem()
          Opens the item.
protected  void parseContent(java.lang.String content)
          Parses the item's content.
 
Methods inherited from class org.ujac.print.BaseDocumentTag
addChunk, addChunk, addChunk, addContent, addContent, addToLatestCellContainer, addToLatestElementContainer, addToLatestPdfCellContainer, colorFromString, createFont, getAttribute, getAttribute, getAttributeDefinition, getAttributes, getBooleanAttribute, getBooleanAttribute, getBorderAttribute, getBorderAttribute, getColorAttribute, getColorAttribute, getContent, getDepth, getDescription, getDocumentHandler, getExamples, getFloatAttribute, getFloatAttribute, getFont, getHorizontalAlignmentAttribute, getHorizontalAlignmentAttribute, getIntegerAttribute, getIntegerAttribute, getName, getParentItem, getPhraseHeight, getPhraseWidth, getPreviousItem, getSupportedAttributes, getSupportedChildTags, getTagFactory, getTrimmedContent, getVerticalAlignmentAttribute, getVerticalAlignmentAttribute, hasContent, isAttributeDefined, isAttributeSupported, isEmptyContent, isIgnoreFlush, isItemClosed, isItemOpened, isValid, isVirtualContainer, locator, resetContent, rotatePhrase, setAttributes, setDepth, setDocumentHandler, setItemClosed, setItemOpened, setParentItem, setPreviousItem, setTagFactory, trimContentTail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

supportedChilds

private static final org.ujac.print.ChildDefinition[] supportedChilds
The item's supported childs.


headerFooterItem

protected HeaderFooterTag headerFooterItem
The parent item.


cb

protected com.lowagie.text.pdf.PdfContentByte cb
This is the contentbyte object of the writer.


numberOfPagesFont

private com.lowagie.text.Font numberOfPagesFont
The font for the number of pages text.


numberOfPagesTemplate

protected com.lowagie.text.pdf.PdfTemplate numberOfPagesTemplate
We will put the final number of pages in a template.


phrase

private com.lowagie.text.Phrase phrase
The phrase that holds the content.


hAlign

protected int hAlign
The horizontal alignment.


bgColor

protected java.awt.Color bgColor
The background color of t

borderStyle

protected int borderStyle
The style of the cell's border.


borderColor

protected java.awt.Color borderColor
The color of the cell's border.


borderWidth

protected float borderWidth
The width of the cell's border.


items

protected java.util.List items
The item list.


verticalPosition

protected float verticalPosition
The vertical position of the header/footer line.

Constructor Detail

HeaderFooterPartTag

public HeaderFooterPartTag()
Method Detail

getSupportedChilds

public org.ujac.print.ChildDefinition[] getSupportedChilds()
Description copied from class: org.ujac.print.BaseDocumentTag
Gets the list of supported childs.


initialize

public void initialize()
                throws org.ujac.print.DocumentHandlerException
Initializes the item.


openItem

public void openItem()
              throws org.ujac.print.DocumentHandlerException
Opens the item.


closeItem

public void closeItem()
               throws org.ujac.print.DocumentHandlerException
Closes the item.


clonePhrase

private com.lowagie.text.Phrase clonePhrase(com.lowagie.text.Phrase phrase)
Clones the given phrase.


onEndPage

public void onEndPage(com.lowagie.text.pdf.PdfWriter writer,
                      com.lowagie.text.Document document)
We override the onEndPage method.


onCloseDocument

public void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer,
                            com.lowagie.text.Document document)
We override the onCloseDocument method.


parseContent

protected void parseContent(java.lang.String content)
                     throws org.ujac.print.DocumentHandlerException
Parses the item's content.


getRootPhrase

public com.lowagie.text.Phrase getRootPhrase()
Description copied from interface: org.ujac.print.PhraseHolder
Gets the root phrase.

Specified by:
getRootPhrase in interface org.ujac.print.PhraseHolder

flushContent

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


addChunk

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

Specified by:
addChunk in interface org.ujac.print.PhraseHolder

addChunk

public void addChunk(org.ujac.print.BaseDocumentTag item,
                     com.lowagie.text.Chunk chunk)
Adds the given chunk to the root phrase.

Specified by:
addChunk in interface org.ujac.print.PhraseHolder