com.lowagie.text.rtf.text
Class RtfTab
java.lang.Object
com.lowagie.text.Chunk
com.lowagie.text.rtf.RtfAddableElement
com.lowagie.text.rtf.text.RtfTab
- All Implemented Interfaces:
- Element, MarkupAttributes, RtfBasicElement
public class RtfTab
- extends RtfAddableElement
The RtfTab encapsulates a tab position and tab type in a paragraph.
To add tabs to a paragraph construct new RtfTab objects with the desired
tab position and alignment and then add them to the paragraph. In the actual
text the tabs are then defined as standard \t characters.
RtfTab tab = new RtfTab(300, RtfTab.TAB_LEFT_ALIGN);
Paragraph para = new Paragraph();
para.add(tab);
para.add("This paragraph has a\ttab defined.");
- Version:
- $Revision: 1.1 $
- Author:
- Mark Hall (mhall@edu.uni-klu.ac.at)
Fields inherited from class com.lowagie.text.Chunk |
ACTION, attributes, BACKGROUND, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, markupAttributes, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TEXTRENDERMODE, UNDERLINE |
Constructor Summary |
RtfTab(float position,
int type)
Constructs a new RtfTab with the given position and type. |
Method Summary |
byte[] |
write()
Writes the tab settings. |
Methods inherited from class com.lowagie.text.Chunk |
addToArray, append, content, font, getAttributes, getChunks, getHorizontalScaling, getImage, getKeySet, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, getTextRise, getWidthPoint, hasAttributes, isEmpty, isTag, process, setAction, setAnchor, setAnchor, setAnnotation, setBackground, setBackground, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setMarkupAttribute, setMarkupAttributes, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type |
TAB_LEFT_ALIGN
public static final int TAB_LEFT_ALIGN
- A tab where the text is left aligned.
- See Also:
- Constant Field Values
TAB_CENTER_ALIGN
public static final int TAB_CENTER_ALIGN
- A tab where the text is centre aligned.
- See Also:
- Constant Field Values
TAB_RIGHT_ALIGN
public static final int TAB_RIGHT_ALIGN
- A tab where the text is right aligned.
- See Also:
- Constant Field Values
TAB_DECIMAL_ALIGN
public static final int TAB_DECIMAL_ALIGN
- A tab where the text is aligned on the decimal character. Which
character that is depends on the language settings of the viewer.
- See Also:
- Constant Field Values
RtfTab
public RtfTab(float position,
int type)
- Constructs a new RtfTab with the given position and type. The position
is in standard iText points. The type is one of the tab alignment
constants defined in the RtfTab.
- Parameters:
position
- The position of the tab in points.type
- The tab type constant.
write
public byte[] write()
- Writes the tab settings.
- Specified by:
write
in interface RtfBasicElement
- Specified by:
write
in class RtfAddableElement
- Returns:
- The byte array containing the data
Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.