Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, 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:
  $Id: RtfTab.java 2996 2007-11-20 22:40:36Z hallm $
Author:
  Mark Hall (mhall@edu.uni-klu.ac.at), Thomas Bickel (tmb99@inode.at)

Field Summary
`private int` | `position` The tab position in twips.
`static int` | `TAB_CENTER_ALIGN` A tab where the text is centre aligned.
`static int` | `TAB_DECIMAL_ALIGN` A tab where the text is aligned on the decimal character.
`static int` | `TAB_LEFT_ALIGN` A tab where the text is left aligned.
`static int` | `TAB_RIGHT_ALIGN` A tab where the text is right aligned.
`private int` | `type` The tab alignment.

Fields inherited from class com.lowagie.text.rtf.RtfAddableElement
`doc, inHeader, inTable`

Fields inherited from class com.lowagie.text.Chunk
`ACTION, attributes, BACKGROUND, COLOR, content, ENCODING, font, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TEXTRENDERMODE, UNDERLINE`

Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
`CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR`

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, HEADER, IMGRAW, IMGTEMPLATE, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE`

Constructor Summary
`RtfTab(float position, int type)` Constructs a new RtfTab with the given position and type.

Method Summary
`byte[]` | `write()` Deprecated. As of iText 2.0.6 or earlier, replaced by `writeContent(OutputStream)`, scheduled for removal at or after 2.1.0
`void` | `writeContent(OutputStream result)` Writes the tab settings.

Methods inherited from class com.lowagie.text.rtf.RtfAddableElement
`intToByteArray, isEmpty, setInHeader, setInTable, setRtfDocument`

Methods inherited from class com.lowagie.text.Chunk
`addToArray, append, content, font, getAttributes, getChunks, getContent, getFont, getHorizontalScaling, getImage, getKeySet, getTextRise, getWidthPoint, hasAttributes, process, setAction, setAnchor, setAnchor, setAnnotation, setAttributes, setBackground, setBackground, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### 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

### position

    private int position

  The tab position in twips.

### type

    private int type

  The tab alignment.

Constructor Detail

### 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.

Method Detail

### write

    public byte[] write()

  Deprecated. As of iText 2.0.6 or earlier, replaced by `writeContent(OutputStream)`, scheduled for removal at or after 2.1.0

  Writes the tab settings.

  Specified by:
    `write` in interface `RtfBasicElement`
  Specified by:
    `write` in class `RtfAddableElement`
  Returns:
    The byte array containing the data

### writeContent

    public void writeContent(OutputStream result)
                      throws IOException

  Writes the tab settings.

  Specified by:
    `writeContent` in interface `RtfBasicElement`
  Overrides:
    `writeContent` in class `RtfAddableElement`
  Throws:
    `IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD