org.ujac.print.tag
Class BoxTag

java.lang.Object
  extended by org.ujac.print.BaseDocumentTag
      extended by org.ujac.print.tag.BaseCellTag
          extended by org.ujac.print.tag.BoxTag
All Implemented Interfaces:
CommonAttributesHolder, ElementContainer, FontHolder, PdfCellContainer, PhraseHolder, StyleHolder

public class BoxTag
extends BaseCellTag
implements PhraseHolder, FontHolder, ElementContainer

Name: BoxTag
Description: Places a text box at a fix position on the current page.

Author:
lauerc

Field Summary
static String TAG_NAME
          The item's name.
 
Fields inherited from class org.ujac.print.tag.BaseCellTag
colspan, composite, DEFAULT_HALIGN, DEFAULT_VALIGN, fillRow, itemClosed
 
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
BoxTag()
          Constructs a BoxTag instance with no specific attributes.
 
Method Summary
protected  AttributeDefinitionMap buildSupportedAttributes()
          Gets the list of supported attributes.
 ChildDefinitionMap buildSupportedChilds()
          Gets the list of supported childs.
protected  AttributeDefinitionMap buildSupportedStyleAttributes()
          Gets the list of supported style attributes.
 void closeItem()
          Closes the item.
 String getDescription()
          Gets a brief description for the item.
 ElementContainer getElementContainer()
          Gets the element container.
 float getLineSpacing()
          Gets the line spacing.
protected  CellAttributes getParentAttributes()
          Gets the parent attributes.
 void initialize()
          Initializes the item.
protected  void insertImage(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document, com.lowagie.text.Image image)
          Inserts the given image into the document.
 void openItem()
          Opens the item.
 
Methods inherited from class org.ujac.print.tag.BaseCellTag
addCell, addCellEventHandler, addChunk, addChunk, addElement, buildCell, flushContent, getActualContent, getCell, getCellAttributes, getLeading, getLocalCellAttributes, getPdfTable, getRemainingPdfColumns, isStyleable, isTextBodyAllowed, isTopLevel
 
Methods inherited from class org.ujac.print.BaseDocumentTag
addAttributeDefinition, addChunk, addChunk, addChunk, addContent, addContent, addStyleAttributeDefinition, addToLatestCellContainer, addToLatestElementContainer, addToLatestPdfCellContainer, checkAttributes, colorFromString, createChunk, createFont, ensureNumberOfPagesTemplate, evalAttribute, evalAttribute, extendLeading, extendLeading, extendLeading, extendLeading, filterContents, 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, getName, 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, isStructureChecksDisabled, isStyleAttributeDefined, isTrimBody, isTrimNextHead, isValid, isVirtualContainer, 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
 
Methods inherited from interface org.ujac.print.PhraseHolder
addChunk, addChunk
 
Methods inherited from interface org.ujac.print.FontHolder
getFont
 
Methods inherited from interface org.ujac.print.ElementContainer
addElement, isTopLevel
 
Methods inherited from interface org.ujac.print.CommonAttributesHolder
getLeading
 
Methods inherited from interface org.ujac.print.StyleHolder
getStyleAttribute
 

Field Detail

TAG_NAME

public static final String TAG_NAME
The item's name.

See Also:
Constant Field Values
Constructor Detail

BoxTag

public BoxTag()
Constructs a BoxTag instance with no specific attributes.

Method Detail

getDescription

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

Overrides:
getDescription in class BaseCellTag
Returns:
The item's description.

buildSupportedAttributes

protected AttributeDefinitionMap buildSupportedAttributes()
Gets the list of supported attributes.

Overrides:
buildSupportedAttributes in class BaseCellTag
Returns:
The attribute definitions.

buildSupportedStyleAttributes

protected AttributeDefinitionMap buildSupportedStyleAttributes()
Gets the list of supported style attributes.

Overrides:
buildSupportedStyleAttributes in class BaseCellTag
Returns:
The attribute definitions.

buildSupportedChilds

public ChildDefinitionMap buildSupportedChilds()
Gets the list of supported childs.

Overrides:
buildSupportedChilds in class BaseCellTag
Returns:
The child definitions.

initialize

public void initialize()
                throws DocumentHandlerException
Initializes the item.

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

openItem

public void openItem()
              throws DocumentHandlerException
Opens the item.

Overrides:
openItem in class BaseCellTag
Throws:
DocumentHandlerException - Thrown in case something went wrong while opening the document item.

getParentAttributes

protected CellAttributes getParentAttributes()
Gets the parent attributes.

Specified by:
getParentAttributes in class BaseCellTag
Returns:
The parent attributes.

closeItem

public void closeItem()
               throws DocumentHandlerException
Closes the item.

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

insertImage

protected void insertImage(com.lowagie.text.pdf.PdfWriter writer,
                           com.lowagie.text.Document document,
                           com.lowagie.text.Image image)
Inserts the given image into the document.

Parameters:
writer - The pdf writer.
document - The document to add the image to.
image - The image to insert.

getLineSpacing

public float getLineSpacing()
Gets the line spacing.

Specified by:
getLineSpacing in interface CommonAttributesHolder
Overrides:
getLineSpacing in class BaseCellTag
Returns:
The current line spacing.

getElementContainer

public ElementContainer getElementContainer()
Gets the element container. In case no element container has been set so far, it obtains the root element container from the DocumentHandler.

Returns:
The current element container.


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