WPParagraphStyle API

The WPParagraphStyle class defines API properties and methods that specify the font and text attributes, line and paragraph spacing, indentation, and alignment you can apply to a paragraph. The methods and properties are listed below in the following categories:

Text and font attributes

The following properties set and get text and font attributes. The properties you set for a WPParagraphStyle object override the global text and font settings you set at the document (that is, the WordProcessor object) level. [[PS: Is this correct?]]
void  setBold(boolean on)
boolean  isBold()
void  setItalic(boolean on)
boolean  isItalic()
void  setUnderline(boolean on)
boolean  isUnderline()
void  setStrikeThrough(boolean on)
boolean  isStrikeThrough()
void  setProtected(boolean on)   [[PS: What kind of protection? Against reading or against writing to?]]
boolean  isProtected()
void  setFontFace(String face)  [[PS: What are the valid values?]] 
String  getFontFace()
void  setFontSize(int size)  [[PS: What is the valid range of sizes?]]
int  getFontSize()
void  setFontColor(Color color)  [[PS: What is the Color data type? How do I access it?]]
Color  getFontColor()

Paragraph indentation, spacing, and alignment

The following properties set and get the indentation and spacing for the paragraph.
int  getLeftMargin()	/* Returns the left indent for the paragraph. */
void  setLeftMargin(int margin)	/* Sets the left indent for the paragraph. */
int  getRightMargin()	/* Returns the right indent for the paragraph. */
void  setRightMargin(int margin)	/* Sets the right indent for the paragraph. */
int  getTextIndent()	/* Returns the first line indent for the paragraph. */
void  setTextIndent(int margin)	/* Sets the first line indent for the paragraph. For a hanging indent, pass a negative value. */
int  getTopMargin()	/* Returns the amount of space before the paragraph. [[PS: Space is measured in what units?]] */
void  setTopMargin(int margin)	/* Sets the amount of space before the paragraph. [[PS: Space is measured in what units?]] */
int  getBottomMargin()	/* Returns the amount of space after the paragraph. [[PS: Space is measured in what units?]] */
void  setBottomMargin(int margin)	/* Sets the amount of space after the paragraph. [[PS: Space is measured in what units?]] */
void  setAlignment(String align)	/* Left/Right/Center/Justify  [[PS: Are these the exact strings I can pass? Are they case-sensitive?]] */
String  getAlignment()

Line spacing

The following properties set and get the line spacing within the paragraph. [[PS: LineHeight means line spacing, right?]]
int  getLineHeight()
void  setLineHeight(int margin)

Paragraph leaders

The following method gets a reference to the paragraph leader object for the paragraph. A leader is a bullet, number, image, or text string. Once you have a reference to a paragraph leader object, you can set the WPParagraphLeader properties to specify the appearance of the leader.
WPParagraphLeader  getParagraphLeader()	
See also
WordProcessor API Index
WordProcessor Object Model
WordProcessor Home Page