org.ujac.print.tag
Class ListItemTag

java.lang.Object
  extended by org.ujac.print.BaseDocumentTag
      extended by org.ujac.print.tag.BaseElementTag
          extended by org.ujac.print.tag.ListItemTag
All Implemented Interfaces:
CommonAttributesHolder, ElementContainer, FontHolder, PhraseHolder

public class ListItemTag
extends BaseElementTag
implements ElementContainer, PhraseHolder, FontHolder

Name: ListItemTag
Description: Class handling list-item tags.

Author:
lauerc

Field Summary
static String TAG_NAME
          The item's name.
 
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
ListItemTag()
          Constructs a ListItemTag instance with no specific attributes.
 
Method Summary
 void addChunk(BaseDocumentTag item, com.lowagie.text.Chunk chunk)
          Adds the given chunk to the root phrase.
 void addChunk(BaseDocumentTag item, String chunk, DocumentFont font)
          Adds the given chunk to the root phrase.
 void addElement(BaseDocumentTag item, com.lowagie.text.Element element)
          Adds a element to the container.
 void addSubList(com.lowagie.text.List sublist)
          Added by Kiran Adds a sublist to the list-item.
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.
 void flushContent()
          Flushes the content buffer.
 String getActualContent()
          Gets the actual content.
 String getDescription()
          Gets a brief description for the item.
 float getLeading()
          Gets the fixed vertical leading distance.
 float getLineSpacing()
          Gets the line spacing.
 void initialize()
          Initializes the item.
 boolean isStyleable()
          Tells whether or not this tag does respect style attributes or not.
 boolean isTextBodyAllowed()
          Tells whether textual content is allowed for the tag or not.
 boolean isTopLevel()
          Tells whether the element container is a top level container or not.
 void openItem()
          Opens the item.
 
Methods inherited from class org.ujac.print.tag.BaseElementTag
getElementContainer
 
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.FontHolder
getFont
 

Field Detail

TAG_NAME

public static final String TAG_NAME
The item's name.

See Also:
Constant Field Values
Constructor Detail

ListItemTag

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

Method Detail

getDescription

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

Specified by:
getDescription in class BaseDocumentTag
Returns:
The item's description.

buildSupportedAttributes

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

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

buildSupportedStyleAttributes

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

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

buildSupportedChilds

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

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

isStyleable

public boolean isStyleable()
Tells whether or not this tag does respect style attributes or not.

Overrides:
isStyleable in class BaseDocumentTag
Returns:
always true.

isTextBodyAllowed

public boolean isTextBodyAllowed()
Tells whether textual content is allowed for the tag or not.

Overrides:
isTextBodyAllowed in class BaseDocumentTag
Returns:
true if the item is allowed to contain textual content, else false.

initialize

public void initialize()
                throws DocumentHandlerException
Initializes the item.

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

openItem

public void openItem()
              throws DocumentHandlerException
Opens the item.

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

getActualContent

public String getActualContent()
Gets the actual content. This method is intended for testing purposes.

Overrides:
getActualContent in class BaseDocumentTag
Returns:
The last content.

flushContent

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

Overrides:
flushContent in class BaseDocumentTag
Throws:
DocumentHandlerException - Thrown in case something went wrong while flushing the content buffer.

closeItem

public void closeItem()
               throws DocumentHandlerException
Closes the item.

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

addChunk

public void addChunk(BaseDocumentTag item,
                     String chunk,
                     DocumentFont font)
              throws DocumentHandlerException
Adds the given chunk to the root phrase.

Specified by:
addChunk in interface PhraseHolder
Parameters:
item - The document item.
chunk - The chunk to add to the root phrase.
font - The font to use.
Throws:
DocumentHandlerException - In case the document processing failed.

addChunk

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

Specified by:
addChunk in interface PhraseHolder
Parameters:
item - The document item.
chunk - The chunk to add to the root phrase.

getLeading

public float getLeading()
Gets the fixed vertical leading distance.

Specified by:
getLeading in interface CommonAttributesHolder
Returns:
The current fixed vertical leading distance.

getLineSpacing

public float getLineSpacing()
Gets the line spacing.

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

addElement

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

Specified by:
addElement in interface ElementContainer
Parameters:
item - The document item.
element - The element to be added.
Throws:
DocumentHandlerException - If something went wrong when adding the element.

isTopLevel

public boolean isTopLevel()
Tells whether the element container is a top level container or not.

Specified by:
isTopLevel in interface ElementContainer
Returns:
true if the element container is a top level container, else false.

addSubList

public void addSubList(com.lowagie.text.List sublist)
Added by Kiran Adds a sublist to the list-item.

Parameters:
sublist - The sublist to add.


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