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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.ujac.print.BaseDocumentTag
      extended byorg.ujac.print.tag.PdfCellTag
All Implemented Interfaces:
org.ujac.print.ElementContainer, PdfCellAttributeHolder, org.ujac.print.PdfCellContainer, org.ujac.print.PhraseHolder, TagAttributes
Direct Known Subclasses:
RowCellTag

public class PdfCellTag
extends org.ujac.print.BaseDocumentTag
implements org.ujac.print.ElementContainer, org.ujac.print.PdfCellContainer, org.ujac.print.PhraseHolder, PdfCellAttributeHolder

Name: PdfCellTag
Description: A class handling 'cell' items.

Log: $Log: PdfCellTag.java,v $
Log: Revision 1.7 2003/11/27 08:06:33 lauerc
Log: Added support for nested chunks.
Log:
Log: Revision 1.6 2003/11/24 22:36:38 lauerc
Log: Properly considering the surrounding attribute holder's alignment properties now.
Log:
Log: Revision 1.5 2003/11/23 14:04:07 lauerc
Log: Moved cell creation into new method buildCell.
Log: Added method hasNestedElements.
Log:
Log: Revision 1.4 2003/11/23 03:11:28 lauerc
Log: Fixed javadoc comments.
Log: Added method getCellAlignmentAttribute.
Log:
Log: Revision 1.3 2003/11/21 00:57:42 lauerc
Log: Made almost all attribute values behave dynamic using the Expression interpreter.
Log:
Log: Revision 1.2 2003/11/01 12:05:19 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.1 2003/09/29 21:15:03 lauerc
Log: Renamed classes from XyzItem to XyzTag.
Log:
Log: Revision 1.25 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.24 2003/07/21 05:35:53 lauerc
Log: Centralized chunk handling.
Log:
Log: Revision 1.23 2003/07/18 06:26:01 lauerc
Log: Content handling re-designed.
Log:
Log: Revision 1.22 2003/07/15 19:27:42 lauerc
Log: Applied coding style fixes.
Log:
Log: Revision 1.21 2003/07/14 19:02:40 lauerc
Log: Implemented interface PdfCellAttributeHolder.
Log: Making use of surrounding PdfCellAttributeHolders to realize default settings now.
Log: Added attribute documentation.
Log:
Log: Revision 1.20 2003/07/09 22:02:47 lauerc
Log: Implemented the getDescription method.
Log:
Log: Revision 1.19 2003/07/07 06:58:21 lauerc
Log: Changed visibility of method initialize to public.
Log:
Log: Revision 1.18 2003/06/30 23:12:40 lauerc
Log: In case the nested element was a Phrase, keeping this one as nested element
Log: after adding the given element at method addElement.
Log:
Log: Revision 1.17 2003/05/26 06:53:07 lauerc
Log: Added initial support for charts (package org.ujac.chart).
Log:
Log: Revision 1.16 2003/05/20 21:23:33 lauerc
Log: Enhanced child declaration: Just added the base type of a group of items (e.g. BaseFontTag).
Log: This provides automatic support of new classes which extend specific supported items.
Log:
Log: Revision 1.15 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.14 2003/05/08 06:33:49 lauerc
Log: Avoided the adding of empty content.
Log:
Log: Revision 1.13 2003/05/04 14:00:27 lauerc
Log: Re-organized imports.
Log:
Log: Revision 1.12 2003/04/29 20:33:02 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.11 2003/04/29 19:44:44 lauerc
Log: Checking for valid condition to avoid output when surronding condition evaluates to false.
Log:
Log: Revision 1.10 2003/04/28 22:12:59 lauerc
Log: Fixed image handling.
Log:
Log: Revision 1.9 2003/04/26 00:16:12 lauerc
Log: Resetting the item's child data at the openItem method.
Log:
Log: Revision 1.8 2003/04/24 18:23:52 lauerc
Log: Added support for formatting items even in dynamic content.
Log:
Log: Revision 1.7 2003/04/09 16:42:44 lauerc
Log: Fixed bugs in font handling.
Log:
Log: Revision 1.6 2003/04/08 23:50:46 lauerc
Log: Enhanced font support.
Log:
Log: Revision 1.5 2003/04/01 22:57:22 lauerc
Log: Improved exception handling, fixed attribute declarations.
Log:
Log: Revision 1.4 2003/03/31 22:29:05 lauerc
Log: Implemented meta information serving methods (getSupportedAttributes, getSupportedChilds).
Log:
Log: Revision 1.3 2003/03/31 19:35:31 lauerc
Log: Determining item attributes in initialize method.
Log: Inheriting attributes from surrounding cell.
Log:
Log: Revision 1.2 2003/03/30 13:30:20 lauerc
Log: Externalized attribute names to interface TagAttributes.
Log:
Log: Revision 1.1 2003/03/28 08:59:45 lauerc
Log: Initial revision.
Log:

Version:
$Revision: 1.7 $

Field Summary
protected  java.awt.Color bgColor
          The background color of the cell.
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.
private  PdfCellAttributeHolder cellAttributeHolder
          The latest surrounding cell attribute holder.
private  org.ujac.print.PdfCellContainer cellContainer
          The cell container.
protected  int colspan
          The column span of the cell.
protected  int hAlign
          The horizontal alignment of the cell.
protected  boolean itemClosed
          The item closed flag.
static java.lang.String NAME
          The item's name.
private  com.lowagie.text.pdf.PdfPCell nestedCell
          The nested cell.
private  com.lowagie.text.Element nestedElement
          The nested element.
protected  boolean noWrap
          The no-wrap flag.
protected  float paddingBottom
          The bottom padding.
protected  float paddingLeft
          The left padding.
protected  float paddingRight
          The right padding.
protected  float paddingTop
          The top padding.
private  com.lowagie.text.Phrase phrase
          The phrase.
private static org.ujac.print.AttributeDefinition[] supportedAttributes
          The item's supported attributes.
private static org.ujac.print.ChildDefinition[] supportedChilds
          The item's supported childs.
protected  int vAlign
          The vertical alignment of the cell.
 
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
PdfCellTag()
           
 
Method Summary
 void addCell(org.ujac.print.BaseDocumentTag item, com.lowagie.text.pdf.PdfPCell cell)
          Adds a PDF cell to the container.
 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.
 void addElement(org.ujac.print.BaseDocumentTag item, com.lowagie.text.Element element)
          Adds a element to the container.
protected  com.lowagie.text.pdf.PdfPCell buildCell()
          Builds a table cell according to the tags contents and attributes.
 void closeItem()
          Closes the item.
 void flushContent()
          Flushes the content buffer.
 int getCellAlignmentAttribute(java.lang.String name)
          Gets the alignment value for the given attribute's name.
 java.lang.String getCellAttribute(java.lang.String name)
          Gets the value for the given attribute's name.
 int getCellBorderAttribute(java.lang.String name)
          Gets the border value for the given attribute's name.
 java.awt.Color getCellColorAttribute(java.lang.String name)
          Gets the color value for the given attribute's name.
 float getCellFloatAttribute(java.lang.String name)
          Gets the float value for the given attribute's name.
 int getCellIntegerAttribute(java.lang.String name)
          Gets the integer value for the given attribute's name.
 java.lang.String getDescription()
          Gets a brief description for the item.
 java.lang.String getName()
          Gets the item's name.
 com.lowagie.text.Phrase getRootPhrase()
          Gets the root phrase.
 org.ujac.print.AttributeDefinition[] getSupportedAttributes()
          Gets the list of supported attributes.
 org.ujac.print.ChildDefinition[] getSupportedChilds()
          Gets the list of supported childs.
protected  boolean hasNestedElement()
          Checks whether a nested element exists.
 void initialize()
          Initializes the item.
 void openItem()
          Opens the item.
 
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, getDocumentHandler, getExamples, getFloatAttribute, getFloatAttribute, getFont, getHorizontalAlignmentAttribute, getHorizontalAlignmentAttribute, getIntegerAttribute, getIntegerAttribute, getParentItem, getPhraseHeight, getPhraseWidth, getPreviousItem, 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

NAME

public static final java.lang.String NAME
The item's name.

See Also:
Constant Field Values

supportedAttributes

private static final org.ujac.print.AttributeDefinition[] supportedAttributes
The item's supported attributes.


supportedChilds

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


cellContainer

private org.ujac.print.PdfCellContainer cellContainer
The cell container.


cellAttributeHolder

private PdfCellAttributeHolder cellAttributeHolder
The latest surrounding cell attribute holder.


nestedElement

private com.lowagie.text.Element nestedElement
The nested element.


nestedCell

private com.lowagie.text.pdf.PdfPCell nestedCell
The nested cell.


bgColor

protected java.awt.Color bgColor
The background color of the cell.


colspan

protected int colspan
The column span of the cell.


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.


hAlign

protected int hAlign
The horizontal alignment of the cell.


vAlign

protected int vAlign
The vertical alignment of the cell.


paddingLeft

protected float paddingLeft
The left padding.


paddingRight

protected float paddingRight
The right padding.


paddingTop

protected float paddingTop
The top padding.


paddingBottom

protected float paddingBottom
The bottom padding.


noWrap

protected boolean noWrap
The no-wrap flag.


phrase

private com.lowagie.text.Phrase phrase
The phrase.


itemClosed

protected boolean itemClosed
The item closed flag.

Constructor Detail

PdfCellTag

public PdfCellTag()
Method Detail

getName

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


getDescription

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


getSupportedAttributes

public org.ujac.print.AttributeDefinition[] getSupportedAttributes()
Gets the list of supported attributes.


getSupportedChilds

public org.ujac.print.ChildDefinition[] getSupportedChilds()
Gets the list of supported childs.


hasNestedElement

protected boolean hasNestedElement()
Checks whether a nested element exists.


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.


buildCell

protected com.lowagie.text.pdf.PdfPCell buildCell()
                                           throws org.ujac.print.DocumentHandlerException
Builds a table cell according to the tags contents and attributes.


addElement

public void addElement(org.ujac.print.BaseDocumentTag item,
                       com.lowagie.text.Element element)
                throws org.ujac.print.DocumentHandlerException
Adds a element to the container.

Specified by:
addElement in interface org.ujac.print.ElementContainer

addCell

public void addCell(org.ujac.print.BaseDocumentTag item,
                    com.lowagie.text.pdf.PdfPCell cell)
             throws org.ujac.print.DocumentHandlerException
Adds a PDF cell to the container.

Specified by:
addCell in interface org.ujac.print.PdfCellContainer

flushContent

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


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

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

getCellAttribute

public java.lang.String getCellAttribute(java.lang.String name)
                                  throws org.ujac.print.TagAttributeException
Gets the value for the given attribute's name.

Specified by:
getCellAttribute in interface PdfCellAttributeHolder

getCellFloatAttribute

public float getCellFloatAttribute(java.lang.String name)
                            throws org.ujac.print.TagAttributeException
Gets the float value for the given attribute's name.

Specified by:
getCellFloatAttribute in interface PdfCellAttributeHolder

getCellIntegerAttribute

public int getCellIntegerAttribute(java.lang.String name)
                            throws org.ujac.print.TagAttributeException
Gets the integer value for the given attribute's name.

Specified by:
getCellIntegerAttribute in interface PdfCellAttributeHolder

getCellColorAttribute

public java.awt.Color getCellColorAttribute(java.lang.String name)
                                     throws org.ujac.print.TagAttributeException
Gets the color value for the given attribute's name.

Specified by:
getCellColorAttribute in interface PdfCellAttributeHolder

getCellBorderAttribute

public int getCellBorderAttribute(java.lang.String name)
                           throws org.ujac.print.TagAttributeException
Gets the border value for the given attribute's name.

Specified by:
getCellBorderAttribute in interface PdfCellAttributeHolder

getCellAlignmentAttribute

public int getCellAlignmentAttribute(java.lang.String name)
                              throws org.ujac.print.TagAttributeException
Gets the alignment value for the given attribute's name.

Specified by:
getCellAlignmentAttribute in interface PdfCellAttributeHolder