org.ujac.print.tag
Class ListTag

java.lang.Object
  extended by org.ujac.print.BaseDocumentTag
      extended by org.ujac.print.tag.BaseElementTag
          extended by org.ujac.print.tag.ListTag
All Implemented Interfaces:
FontHolder

public class ListTag
extends BaseElementTag
implements FontHolder

Name: ListTag
Description: A class handling list tags.

Author:
lauerc

Field Summary
static float DEFAULT_SYMBOL_INDENT
          The default symbol indentation distance.
static AttributeDefinition LETTERED
          Definition of the 'lettered' attribute.
static AttributeDefinition LIST_ITEMSTART
          Definition of the 'itemstart' attribute.
static AttributeDefinition LIST_TYPE
          Definition of the 'list-type' attribute.
static AttributeDefinition NUMBERED
          Definition of the 'numbered' attribute.
static AttributeDefinition SYMBOL_INDENT
          Definition of the 'symbol-indent' attribute.
static String TAG_NAME
          The item's name.
static AttributeDefinition TYPE
          Definition of the 'type' attribute.
 
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
ListTag()
          Constructs a ListTag instance with no specific attributes.
 
Method Summary
 void addItem(com.lowagie.text.ListItem item)
          Adds an item to the list.
 void addSubList(com.lowagie.text.List sublist)
          Adds a sublist to the list.
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 attributes.
 void closeItem()
          Closes the item.
 char getCharAttribute(String name)
          Added by Kiran Gets the value for the given attribute's name.
 String getDescription()
          Gets a brief description for the item.
 float getLineSpacing()
          Gets the line spacing.
 char getUnicodeChar(String s)
          Added by Kiran Creates a char based on the unicode string given.
 void initialize()
          Initializes the item.
 boolean isStyleable()
          Tells whether or not this tag does respect style attributes or not.
 void openItem()
          Opens the item.
 void setListSymbol(com.lowagie.text.Chunk symbol)
          Sets the list symbol.
 void setupList()
          Added by Kiran Creates a list based on the type given.
 
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, flushContent, getActualContent, 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, isTextBodyAllowed, 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

DEFAULT_SYMBOL_INDENT

public static final float DEFAULT_SYMBOL_INDENT
The default symbol indentation distance.

See Also:
Constant Field Values

NUMBERED

public static final AttributeDefinition NUMBERED
Definition of the 'numbered' attribute.


LETTERED

public static final AttributeDefinition LETTERED
Definition of the 'lettered' attribute.


SYMBOL_INDENT

public static final AttributeDefinition SYMBOL_INDENT
Definition of the 'symbol-indent' attribute.


LIST_TYPE

public static final AttributeDefinition LIST_TYPE
Definition of the 'list-type' attribute.


LIST_ITEMSTART

public static final AttributeDefinition LIST_ITEMSTART
Definition of the 'itemstart' attribute.


TYPE

public static final AttributeDefinition TYPE
Definition of the 'type' attribute.


TAG_NAME

public static final String TAG_NAME
The item's name.

See Also:
Constant Field Values
Constructor Detail

ListTag

public ListTag()
Constructs a ListTag 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 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.

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.

getCharAttribute

public char getCharAttribute(String name)
                      throws TagAttributeException
Added by Kiran Gets the value for the given attribute's name.

Parameters:
name - The attribute's name.
defaultValue - The default value in case the attribute was not defined.
Returns:
The determined value.
Throws:
TagAttributeException - if the item contains an invalid value or an required attribute was not defined.

getUnicodeChar

public char getUnicodeChar(String s)
Added by Kiran Creates a char based on the unicode string given. '찴5' The same can be achieved by doing String.getBytes("UTF-8") but since we cannot change the encoding dynamically its better to get the hex representation of the string and let the font take care of it.

Parameters:
s - The unicode string.
Returns:
The parsed unicode character.

setupList

public void setupList()
               throws DocumentHandlerException
Added by Kiran Creates a list based on the type given. The listtype can be only 'list', 'roman', 'greek' or 'zapfdingbats'.

Parameters:
sublist - The sublist to add.
Throws:
DocumentHandlerException - In case and unsupported list type was specified.

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.

setListSymbol

public void setListSymbol(com.lowagie.text.Chunk symbol)
Sets the list symbol.

Parameters:
symbol - The chunk to use as symbol.

addSubList

public void addSubList(com.lowagie.text.List sublist)
Adds a sublist to the list.

Parameters:
sublist - The sublist to add.

addItem

public void addItem(com.lowagie.text.ListItem item)
Adds an item to the list.

Parameters:
item - The item to add.

getLineSpacing

public float getLineSpacing()
Gets the line spacing.

Returns:
The current line spacing.


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