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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.ujac.print.BaseDocumentTag
      extended byorg.ujac.print.tag.BaseFontTag
All Implemented Interfaces:
org.ujac.print.FontHolder, org.ujac.print.PhraseHolder, TagAttributes
Direct Known Subclasses:
BoldTag, FontTag, ItalicTag, UnderlineTag

public abstract class BaseFontTag
extends org.ujac.print.BaseDocumentTag
implements org.ujac.print.FontHolder, org.ujac.print.PhraseHolder

Name: BaseFontTag.java
Description: Description of class.

Log: $Log: BaseFontTag.java,v $
Log: Revision 1.6 2003/12/02 21:35:23 lauerc
Log: Fixed font handling.
Log:
Log: Revision 1.5 2003/11/25 22:52:52 lauerc
Log: Fixed JDK 1.3 incompabilities regarding Color constants.
Log:
Log: Revision 1.4 2003/11/23 23:16:05 lauerc
Log: Fixed font handling.
Log:
Log: Revision 1.3 2003/11/01 12:05:19 lauerc
Log: Added copyright notice.
Log:
Log: Revision 1.2 2003/10/16 16:48:26 lauerc
Log: Using FontFactory to create fonts now.
Log:
Log: Revision 1.1 2003/09/29 21:15:03 lauerc
Log: Renamed classes from XyzItem to XyzTag.
Log:
Log: Revision 1.13 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.12 2003/07/21 05:35:53 lauerc
Log: Centralized chunk handling.
Log:
Log: Revision 1.11 2003/07/18 06:26:02 lauerc
Log: Content handling re-designed.
Log:
Log: Revision 1.10 2003/07/10 23:42:53 lauerc
Log: Fixed bug at close item: Checking existence of root phrase before adding content to it to avoid exceptions.
Log:
Log: Revision 1.9 2003/07/07 06:55:50 lauerc
Log: Changed visibility of method initialize to public.
Log:
Log: Revision 1.8 2003/05/20 21:23:32 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.7 2003/05/08 06:34:46 lauerc
Log: Avoided the adding of empty content.
Log:
Log: Revision 1.6 2003/05/04 13:59:28 lauerc
Log: Resetting phrase attribute at method openItem now.
Log:
Log: Revision 1.5 2003/04/29 20:33:01 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.4 2003/04/29 18:53:33 lauerc
Log: Checking for valid condition to avoid output when surronding condition evaluates to false.
Log:
Log: Revision 1.3 2003/04/25 16:16:59 lauerc
Log: Evaluating content before adding it to chunk at method closeItem.
Log:
Log: Revision 1.2 2003/04/09 16:42:44 lauerc
Log: Fixed bugs in font handling.
Log:
Log: Revision 1.1 2003/04/08 23:50:31 lauerc
Log: Initial revision.
Log:

Version:
$Revision: 1.6 $

Field Summary
protected  java.awt.Color color
          The font's color.
protected  java.lang.String family
          The font's family.
protected  org.ujac.print.DocumentFont font
          The font.
protected  java.lang.String fontDef
          The font definition.
protected  org.ujac.print.FontHolder parentFont
          The surrounding font.
private  com.lowagie.text.Phrase phrase
          The phrase.
protected  org.ujac.print.PhraseHolder phraseHolder
          The surrounding phrase holder.
protected  float size
          The font's size.
protected  int style
          The font's style.
private static org.ujac.print.ChildDefinition[] supportedChilds
          The item's supported childs.
 
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
BaseFontTag()
           
 
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.
 void closeItem()
          Closes the item.
protected  void createFont()
          Creates the item's font according to the item's attributes.
 void flushContent()
          Flushes the content buffer.
 org.ujac.print.DocumentFont getFont()
          Gets the font.
 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.
 void initialize()
          Initializes the item.
 boolean isVirtualContainer()
          Is the item virtual container, such as if, else or foreach.
 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, getDescription, getDocumentHandler, getExamples, getFloatAttribute, getFloatAttribute, getHorizontalAlignmentAttribute, getHorizontalAlignmentAttribute, getIntegerAttribute, getIntegerAttribute, getName, getParentItem, getPhraseHeight, getPhraseWidth, getPreviousItem, getSupportedChildTags, getTagFactory, getTrimmedContent, getVerticalAlignmentAttribute, getVerticalAlignmentAttribute, hasContent, isAttributeDefined, isAttributeSupported, isEmptyContent, isIgnoreFlush, isItemClosed, isItemOpened, isValid, 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.


phraseHolder

protected org.ujac.print.PhraseHolder phraseHolder
The surrounding phrase holder.


parentFont

protected org.ujac.print.FontHolder parentFont
The surrounding font.


font

protected org.ujac.print.DocumentFont font
The font.


fontDef

protected java.lang.String fontDef
The font definition.


color

protected java.awt.Color color
The font's color.


family

protected java.lang.String family
The font's family.


size

protected float size
The font's size.


style

protected int style
The font's style.


phrase

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

Constructor Detail

BaseFontTag

public BaseFontTag()
Method Detail

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.


isVirtualContainer

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


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.


createFont

protected void createFont()
Creates the item's font according to the item's attributes.


getFont

public org.ujac.print.DocumentFont getFont()
Gets the font.

Specified by:
getFont in interface org.ujac.print.FontHolder

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