Package com.lowagie.text.rtf.text
Class RtfTabGroup
- java.lang.Object
-
- com.lowagie.text.Chunk
-
- com.lowagie.text.rtf.RtfAddableElement
-
- com.lowagie.text.rtf.text.RtfTabGroup
-
- All Implemented Interfaces:
com.lowagie.text.Element,RtfBasicElement,com.lowagie.text.RtfElementInterface
public class RtfTabGroup extends RtfAddableElement
The RtfTabGroup is a convenience class if the same tabs are to be added to multiple paragraphs.
RtfTabGroup tabs = new RtfTabGroup();
tabs.add(new RtfTab(70, RtfTab.TAB_LEFT_ALIGN));
tabs.add(new RtfTab(160, RtfTab.TAB_CENTER_ALIGN));
tabs.add(new RtfTab(250, RtfTab.TAB_DECIMAL_ALIGN));
tabs.add(new RtfTab(500, RtfTab.TAB_RIGHT_ALIGN));
Paragraph para = new Paragraph();
para.add(tabs);
para.add("\tLeft aligned\tCentre aligned\t12,45\tRight aligned");- Version:
- $Id: RtfTabGroup.java 3373 2008-05-12 16:21:24Z xlv $
- Author:
- Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at)
-
-
Field Summary
-
Fields inherited from class com.lowagie.text.rtf.RtfAddableElement
doc, inHeader, inTable
-
Fields inherited from class com.lowagie.text.Chunk
ACTION, attributes, BACKGROUND, CHAR_SPACING, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SEPARATOR, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TAB, TEXTRENDERMODE, UNDERLINE
-
Fields inherited from interface com.lowagie.text.Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, FOOTNOTE, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK
-
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
-
-
Constructor Summary
Constructors Constructor Description RtfTabGroup()Constructs an empty RtfTabGroup.RtfTabGroup(java.util.ArrayList<? extends RtfBasicElement> tabs)Constructs a RtfTabGroup with a set of tabs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(RtfTab tab)Adds a RtfTab to the list of grouped tabs.voidwriteContent(java.io.OutputStream result)Combines the tab output form all grouped tabs.-
Methods inherited from class com.lowagie.text.rtf.RtfAddableElement
intToByteArray, isEmpty, setInHeader, setInTable, setRtfDocument
-
Methods inherited from class com.lowagie.text.Chunk
append, getAttributes, getCharacterSpacing, getChunkAttributes, getChunks, getContent, getFont, getHorizontalScaling, getHyphenation, getImage, getTextRise, getWidthPoint, hasAttributes, isContent, isNestable, process, setAction, setAnchor, setAnchor, setAnnotation, setAttributes, setBackground, setBackground, setCharacterSpacing, setChunkAttributes, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type
-
-
-
-
Constructor Detail
-
RtfTabGroup
public RtfTabGroup()
Constructs an empty RtfTabGroup.
-
RtfTabGroup
public RtfTabGroup(java.util.ArrayList<? extends RtfBasicElement> tabs)
Constructs a RtfTabGroup with a set of tabs.- Parameters:
tabs- An ArrayList with the RtfTabs to group in this RtfTabGroup.
-
-
Method Detail
-
add
public void add(RtfTab tab)
Adds a RtfTab to the list of grouped tabs.- Parameters:
tab- The RtfTab to add.
-
writeContent
public void writeContent(java.io.OutputStream result) throws java.io.IOExceptionCombines the tab output form all grouped tabs.- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfAddableElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
java.io.IOException
-
-