Home » iText-2.1.7 » com.lowagie » text » rtf » style » [javadoc | source]
com.lowagie.text.rtf.style
public class: RtfParagraphStyle [javadoc | source]
java.lang.Object
   com.lowagie.text.Font
      com.lowagie.text.rtf.style.RtfFont
         com.lowagie.text.rtf.style.RtfParagraphStyle

All Implemented Interfaces:
    RtfExtendedElement, Comparable

The RtfParagraphStyle stores all style/formatting attributes of a RtfParagraph. Additionally it also supports the style name system available in RTF. The RtfParagraphStyle is a Font and can thus be used as such. To use the stylesheet functionality it needs to be set as the font of a Paragraph. Otherwise it will work like a RtfFont. It also supports inheritance of styles.
Field Summary
public static final  byte[] ALIGN_LEFT    Constant for left alignment 
public static final  byte[] ALIGN_RIGHT    Constant for right alignment 
public static final  byte[] ALIGN_CENTER    Constant for center alignment 
public static final  byte[] ALIGN_JUSTIFY    Constant for justified alignment 
public static final  byte[] FIRST_LINE_INDENT    Constant for the first line indentation 
public static final  byte[] INDENT_LEFT    Constant for left indentation 
public static final  byte[] INDENT_RIGHT    Constant for right indentation 
public static final  byte[] KEEP_TOGETHER    Constant for keeping the paragraph together on one page 
public static final  byte[] KEEP_TOGETHER_WITH_NEXT    Constant for keeping the paragraph together with the next one on one page 
public static final  byte[] SPACING_AFTER    Constant for the space after the paragraph. 
public static final  byte[] SPACING_BEFORE    Constant for the space before the paragraph. 
public static final  RtfParagraphStyle STYLE_NORMAL    The NORMAL/STANDARD style. 
public static final  RtfParagraphStyle STYLE_HEADING_1    The style for level 1 headings. 
public static final  RtfParagraphStyle STYLE_HEADING_2    The style for level 2 headings. 
public static final  RtfParagraphStyle STYLE_HEADING_3    The style for level 3 headings. 
Fields inherited from com.lowagie.text.rtf.style.RtfFont:
FONT_SIZE,  STYLE_NONE,  STYLE_BOLD,  STYLE_ITALIC,  STYLE_UNDERLINE,  STYLE_STRIKETHROUGH,  STYLE_DOUBLE_STRIKETHROUGH,  STYLE_SHADOW,  STYLE_OUTLINE,  STYLE_EMBOSSED,  STYLE_ENGRAVED,  STYLE_HIDDEN,  DEFAULT_FONT,  document
Fields inherited from com.lowagie.text.Font:
COURIER,  HELVETICA,  TIMES_ROMAN,  SYMBOL,  ZAPFDINGBATS,  NORMAL,  BOLD,  ITALIC,  UNDERLINE,  STRIKETHRU,  BOLDITALIC,  UNDEFINED,  DEFAULTSIZE
Constructor:
 public RtfParagraphStyle(String styleName,
    String basedOnName) 
    Constructs a new RtfParagraphStyle that is based on an existing RtfParagraphStyle.
    Parameters:
    styleName - The name of this RtfParagraphStyle.
    basedOnName - The name of the RtfParagraphStyle this RtfParagraphStyle is based on.
 public RtfParagraphStyle(RtfDocument doc,
    RtfParagraphStyle style) 
    Constructs a RtfParagraphStyle from another RtfParagraphStyle. INTERNAL USE ONLY
    Parameters:
    doc - The RtfDocument this RtfParagraphStyle belongs to.
    style - The RtfParagraphStyle to copy settings from.
 public RtfParagraphStyle(String styleName,
    String fontName,
    int fontSize,
    int fontStyle,
    Color fontColor) 
    Constructs a new RtfParagraphStyle with the given attributes.
    Parameters:
    styleName - The name of this RtfParagraphStyle.
    fontName - The name of the font to use for this RtfParagraphStyle.
    fontSize - The size of the font to use for this RtfParagraphStyle.
    fontStyle - The style of the font to use for this RtfParagraphStyle.
    fontColor - The color of the font to use for this RtfParagraphStyle.
Method from com.lowagie.text.rtf.style.RtfParagraphStyle Summary:
equals,   getAlignment,   getBasedOnName,   getFirstLineIndent,   getIndentLeft,   getIndentRight,   getKeepTogether,   getKeepTogetherWithNext,   getLineLeading,   getSpacingAfter,   getSpacingBefore,   getStyleName,   handleInheritance,   hashCode,   setAlignment,   setColor,   setFirstLineIndent,   setFontName,   setIndentLeft,   setIndentRight,   setKeepTogether,   setKeepTogetherWithNext,   setLineLeading,   setSize,   setSpacingAfter,   setSpacingBefore,   setStyle,   setStyleNumber,   writeBegin,   writeContent,   writeDefinition,   writeEnd
Methods from com.lowagie.text.rtf.style.RtfFont:
compareTo,   difference,   equals,   getCharset,   getFamilyname,   getFontName,   getFontNumber,   getFontSize,   getFontStyle,   hashCode,   intToByteArray,   isStandardFont,   setCharset,   setColor,   setColor,   setFamily,   setFontName,   setInHeader,   setInTable,   setRtfDocument,   setSize,   setStyle,   setStyle,   writeBegin,   writeContent,   writeDefinition,   writeEnd
Methods from com.lowagie.text.Font:
compareTo,   difference,   getBaseFont,   getCalculatedBaseFont,   getCalculatedLeading,   getCalculatedSize,   getCalculatedStyle,   getColor,   getFamily,   getFamilyIndex,   getFamilyname,   getSize,   getStyle,   getStyleValue,   isBold,   isItalic,   isStandardFont,   isStrikethru,   isUnderlined,   setColor,   setColor,   setFamily,   setSize,   setStyle,   setStyle
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.rtf.style.RtfParagraphStyle Detail:
 public boolean equals(Object o) 
    Tests whether two RtfParagraphStyles are equal. Equality is determined via the name.
 public int getAlignment() 
    Gets the alignment of this RtfParagraphStyle.
 public String getBasedOnName() 
    Gets the name of the RtfParagraphStyle this RtfParagraphStyle is based on.
 public int getFirstLineIndent() 
    Gets the first line indentation of this RtfParagraphStyle.
 public int getIndentLeft() 
    Gets the left indentation of this RtfParagraphStyle.
 public int getIndentRight() 
    Gets the right indentation of this RtfParagraphStyle.
 public boolean getKeepTogether() 
    Gets whether the lines in the paragraph should be kept together in this RtfParagraphStyle.
 public boolean getKeepTogetherWithNext() 
    Gets whether the paragraph should be kept together with the next in this RtfParagraphStyle.
 public int getLineLeading() 
    Gets the line leading of this RtfParagraphStyle.
 public int getSpacingAfter() 
    Gets the space after the paragraph of this RtfParagraphStyle.
 public int getSpacingBefore() 
    Gets the space before the paragraph of this RtfParagraphStyle..
 public String getStyleName() 
    Gets the name of this RtfParagraphStyle.
 public  void handleInheritance() 
    Handles the inheritance of paragraph style settings. All settings that have not been modified will be inherited from the base RtfParagraphStyle. If this RtfParagraphStyle is not based on another one, then nothing happens.
 public int hashCode() 
    Gets the hash code of this RtfParagraphStyle.
 public  void setAlignment(int alignment) 
    Sets the alignment of this RtfParagraphStyle.
 public  void setColor(Color color) 
    Sets the color of this RtfParagraphStyle.
 public  void setFirstLineIndent(int firstLineIndent) 
    Sets the first line indentation of this RtfParagraphStyle. It is relative to the left indentation.
 public  void setFontName(String fontName) 
    Sets the font name of this RtfParagraphStyle.
 public  void setIndentLeft(int indentLeft) 
    Sets the left indentation of this RtfParagraphStyle.
 public  void setIndentRight(int indentRight) 
    Sets the right indentation of this RtfParagraphStyle.
 public  void setKeepTogether(boolean keepTogether) 
    Sets whether the lines in the paragraph should be kept together in this RtfParagraphStyle.
 public  void setKeepTogetherWithNext(boolean keepTogetherWithNext) 
    Sets whether the paragraph should be kept together with the next in this RtfParagraphStyle.
 public  void setLineLeading(int lineLeading) 
    Sets the line leading of this RtfParagraphStyle.
 public  void setSize(float fontSize) 
    Sets the font size of this RtfParagraphStyle.
 public  void setSpacingAfter(int spacingAfter) 
    Sets the space after the paragraph of this RtfParagraphStyle.
 public  void setSpacingBefore(int spacingBefore) 
    Sets the space before the paragraph of this RtfParagraphStyle.
 public  void setStyle(int fontStyle) 
    Sets the font style of this RtfParagraphStyle.
 protected  void setStyleNumber(int styleNumber) 
    Sets the number of this RtfParagraphStyle in the stylesheet list.
 public  void writeBegin(OutputStream result) throws IOException 
    Writes the start information of this RtfParagraphStyle.
 public  void writeContent(OutputStream out) throws IOException 
    unused
 public  void writeDefinition(OutputStream result) throws IOException 
    Writes the definition of this RtfParagraphStyle for the stylesheet list.
 public  void writeEnd(OutputStream result) throws IOException 
    Unused