|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.print.BaseDocumentTag org.ujac.print.tag.BaseElementTag org.ujac.print.tag.BaseLoopTag org.ujac.print.tag.ForeachTag
public class ForeachTag
Name: ForeachTag
Description: A class iterating over a given sequence (list, table etc.) and repeats the
nested body for each element of the sequence.
Field Summary | |
---|---|
protected CellContainer |
cellContainer
The cell container. |
protected boolean |
childsAdded
Indicates, whether elements or cells have been added through this condition or not. |
protected PdfCellContainer |
pdfCellContainer
The PDF cell container. |
protected com.lowagie.text.Phrase |
phrase
The phrase which takes the content. |
protected PhraseHolder |
phraseHolder
The phrase holder. |
static String |
TAG_NAME
The item's name. |
Fields inherited from class org.ujac.print.tag.BaseLoopTag |
---|
insertItems, iterationIdx, sequenceHolder, sequenceIterator |
Constructor Summary | |
---|---|
ForeachTag()
Constructs a ForeachTag instance with no specific attributes. |
Method Summary | |
---|---|
void |
addCell(BaseDocumentTag item,
com.lowagie.text.Cell cell)
Adds a cell to the container. |
void |
addCell(BaseDocumentTag item,
com.lowagie.text.pdf.PdfPCell cell)
Adds a cell to the container. |
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. |
protected AttributeDefinitionMap |
buildSupportedAttributes()
Gets the list of supported attributes. |
void |
flushContent()
Flushes the content buffer. |
CellAttributes |
getCellAttributes()
Gets the cell attributes. |
CellContainer |
getCellContainer()
Gets the cell container. |
String |
getDescription()
Gets a brief description for the item. |
float |
getLeading()
Gets the fixed vertical leading distance. |
float |
getLineSpacing()
Gets the line spacing. |
PdfCellContainer |
getPdfCellContainer()
Gets the PDF cell container. |
PdfTableHolder |
getPdfTable()
Gets the PDF table holder. |
int |
getRemainingColumns()
Gets the number of remaining columns of the current row. |
int |
getRemainingPdfColumns()
Gets the number of remaining columns of the current row. |
void |
initialize()
Initializes the item. |
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. |
boolean |
isVirtualContainer()
Is the item virtual container, such as if, else or foreach. |
Methods inherited from class org.ujac.print.tag.BaseLoopTag |
---|
closeItem, getCurrentValue, getLoopIdxVariable, getLoopVariable, getSequenceHolder, hasNext, isFirstLoop, isTrue, openItem, postLoopChildItems, postRepeatChildItems, preLoopChildItems, preRepeatChildItems, recordEvent, repeatChildItems, setCurrentValue, setLoopVariable, setSequenceHolder |
Methods inherited from class org.ujac.print.tag.BaseElementTag |
---|
getElementContainer |
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.Condition |
---|
isTrue |
Field Detail |
---|
public static final String TAG_NAME
protected CellContainer cellContainer
protected PdfCellContainer pdfCellContainer
protected PhraseHolder phraseHolder
protected com.lowagie.text.Phrase phrase
protected boolean childsAdded
Constructor Detail |
---|
public ForeachTag()
Method Detail |
---|
public String getDescription()
getDescription
in class BaseDocumentTag
protected AttributeDefinitionMap buildSupportedAttributes()
buildSupportedAttributes
in class BaseElementTag
public boolean isVirtualContainer()
isVirtualContainer
in class BaseDocumentTag
public boolean isTextBodyAllowed()
isTextBodyAllowed
in class BaseDocumentTag
public void initialize() throws DocumentHandlerException
initialize
in class BaseLoopTag
DocumentHandlerException
- If something went badly wrong.public void addElement(BaseDocumentTag item, com.lowagie.text.Element element) throws DocumentHandlerException
addElement
in interface ElementContainer
item
- The document item.element
- The element to be added.
DocumentHandlerException
- If something went wrong when adding the element.public boolean isTopLevel()
isTopLevel
in interface ElementContainer
public void addCell(BaseDocumentTag item, com.lowagie.text.Cell cell) throws DocumentHandlerException
addCell
in interface CellContainer
item
- The document item.cell
- The cell to be added.
DocumentHandlerException
- If something went wrong when adding the cell.public int getRemainingColumns()
getRemainingColumns
in interface CellContainer
public void addCell(BaseDocumentTag item, com.lowagie.text.pdf.PdfPCell cell) throws DocumentHandlerException
addCell
in interface PdfCellContainer
item
- The document item.cell
- The PDF cell to be added.
DocumentHandlerException
- If something went wrong when adding the cell.public int getRemainingPdfColumns()
getRemainingPdfColumns
in interface PdfCellContainer
public PdfTableHolder getPdfTable()
getPdfTable
in interface PdfCellContainer
public void addChunk(BaseDocumentTag item, String chunk, DocumentFont font) throws DocumentHandlerException
addChunk
in interface PhraseHolder
item
- The document item.chunk
- The chunk to add to the root phrase.font
- The font to use.
DocumentHandlerException
- In case the document processing failed.public void addChunk(BaseDocumentTag item, com.lowagie.text.Chunk chunk) throws DocumentHandlerException
addChunk
in interface PhraseHolder
item
- The document item.chunk
- The chunk to add to the root phrase.
DocumentHandlerException
- In case the document processing failed.public float getLeading()
getLeading
in interface CommonAttributesHolder
public float getLineSpacing()
getLineSpacing
in interface CommonAttributesHolder
public void flushContent() throws DocumentHandlerException
flushContent
in class BaseDocumentTag
DocumentHandlerException
- If something went wrong while flushing the content buffer.public CellContainer getCellContainer()
public PdfCellContainer getPdfCellContainer()
public CellAttributes getCellAttributes()
getCellAttributes
in interface PdfCellContainer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |