public class ParagraphStyle
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
ParagraphStyle class implements the paragraph style
for the rich text object. The paragraph style has following attributes:
ModTextStyle, the style
of the text is modified from the base text style of the paragraph.
The paragraph style is immutable.
ModTextStyle,
直列化された形式| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected int |
alignment
The alignment (justification).
|
protected TextStyle |
baseStyle
The base text style.
|
static int |
CENTER
The constant for the center alignment (justification).
|
static ParagraphStyle |
DEFAULT_STYLE
The default paragraph style constant.
|
static int |
HARD_TAB_LENGTH
The constant for the tab width.
|
protected Visualizable |
heading
The visual heading.
|
protected int |
headingSpace
The visual heading space from the left indentation.
|
static int |
LEFT
The constant for the left alignment (justification).
|
protected int |
leftIndent
The left indentation.
|
protected int |
lineSpace
The line space.
|
protected int |
paragraphSpace
The paragraph space.
|
static int |
RIGHT
The constant for the right alignment (justification).
|
protected int |
rightIndent
The right indentation.
|
protected java.lang.String |
styleName
The style name.
|
protected int |
tabWidth
The width of tab character.
|
| コンストラクタと説明 |
|---|
ParagraphStyle(int alignment)
Constructs a paragraph style with the specified alignment.
|
ParagraphStyle(int alignment,
int leftIndent,
int rightIndent)
Constructs a paragraph style with the specified alignment, left
indent and right indent.
|
ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace)
Constructs a paragraph style with the specified alignment, left
indent, right indent and line space.
|
ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace)
Constructs a paragraph style with the specified alignment, left
indent, right indent, line space and paragraph space.
|
ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth)
Constructs a paragraph style with the specified alignment, left
indent, right indent, line space, paragraph space and tab width.
|
ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
TextStyle baseStyle)
Constructs a paragraph style with the specified alignment, left
indent, right indent, line space, paragraph space, tab width and
base text style.
|
ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
Visualizable heading,
int headingSpace)
Constructs a paragraph style with the specified alignment, left
indent, right indent, line space, paragraph space, tab width,
visual heading and heading space.
|
ParagraphStyle(java.lang.String styleName,
int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
TextStyle baseStyle)
Constructs a paragraph style with the specified name, alignment,
left indent, right indent, line space, paragraph space, tab width
and base text style.
|
ParagraphStyle(java.lang.String styleName,
int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
Visualizable heading,
int headingSpace)
Constructs a paragraph style with the specified name, alignment,
left indent, right indent, line space, paragraph space, tab width,
visual heading and heading space.
|
ParagraphStyle(java.lang.String styleName,
int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
Visualizable heading,
int headingSpace,
TextStyle baseStyle)
Constructs a paragraph style with the specified name, alignment,
left indent, right indent, line space, paragraph space, tab width,
visual heading, heading space and base text style.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this paragraph style.
|
ParagraphStyle |
deriveStyle(ParagraphStyleModifier modifier)
Creates a new style by modifying this style by a paragraph style
modifier.
|
ParagraphStyle |
deriveStyle(java.lang.String styleName)
Creates a new style by replicating this style with a new style
name associated with it.
|
ParagraphStyle |
deriveStyle(TextStyle baseStyle)
Creates a new style by replicating this style with a new base
text style associated with it.
|
ParagraphStyle |
deriveStyle(Visualizable visualizable,
int space)
Creates a new style by replicating this style with a new visual
heading and a new heading space associated with it.
|
boolean |
equals(java.lang.Object anObject)
Compares two objects for equality.
|
protected boolean |
equalsStyle(ParagraphStyle pStyle)
Compares the styles of two paragraph styles for equality.
|
int |
getAlignment()
Returns the alignment (justification) of the paragraph.
|
TextStyle |
getBaseStyle()
Returns the base text style of the paragraph.
|
Visualizable |
getHeading()
Returns the visual heading of the paragraph.
|
int |
getHeadingSpace()
Returns the space for the visual heading from the left indentation.
|
int |
getLeftIndent()
Returns the left margin indentation of the paragraph.
|
int |
getLineSpace()
Returns the space between lines in the paragraph.
|
int |
getParagraphSpace()
Returns the space below the paragraph.
|
int |
getRightIndent()
Returns the right margin indentation of the paragraph.
|
java.lang.String |
getStyleName()
Returns the name of the paragraph style.
|
int |
getTabWidth()
Returns the indentation for the tab character.
|
boolean |
hasBaseStyle()
Checks if this paragraph style has a base text style.
|
int |
hashCode()
Returns a hashcode for this paragraph style.
|
boolean |
hasHeading()
Checks if this paragraph style has a visual heading.
|
boolean |
hasStyleName()
Checks if this paragraph style has a style name.
|
protected void |
setAlignment(int alignment)
Sets the alignment of the paragraph style.
|
java.lang.String |
toString()
Returns the string representation of this paragraph style.
|
protected java.lang.String styleName
protected int alignment
protected int leftIndent
protected int rightIndent
protected int lineSpace
protected int paragraphSpace
protected int tabWidth
protected Visualizable heading
protected int headingSpace
protected TextStyle baseStyle
public static final int LEFT
public static final int RIGHT
public static final int CENTER
public static final int HARD_TAB_LENGTH
public static final ParagraphStyle DEFAULT_STYLE
public ParagraphStyle(int alignment)
alignment - the alignment.public ParagraphStyle(int alignment,
int leftIndent,
int rightIndent)
alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.public ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace)
alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.lineSpace - the line space.public ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace)
alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.lineSpace - the line space.paragraphSpace - the paragraph space.public ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth)
alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.lineSpace - the line space.paragraphSpace - the paragraph space.tabWidth - the tab width.public ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
Visualizable heading,
int headingSpace)
alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.lineSpace - the line space.paragraphSpace - the paragraph space.tabWidth - the tab width.heading - the visual heading.headingSpace - the heading space.public ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
TextStyle baseStyle)
alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.lineSpace - the line space.paragraphSpace - the paragraph space.tabWidth - the tab width.baseStyle - the base text style.public ParagraphStyle(java.lang.String styleName,
int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
Visualizable heading,
int headingSpace)
styleName - the style name.alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.lineSpace - the line space.paragraphSpace - the paragraph space.tabWidth - the tab width.heading - the visual heading.headingSpace - the heading space.public ParagraphStyle(java.lang.String styleName,
int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
TextStyle baseStyle)
styleName - the style name.alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.lineSpace - the line space.paragraphSpace - the paragraph space.tabWidth - the tab width.baseStyle - the base text style.public ParagraphStyle(java.lang.String styleName,
int alignment,
int leftIndent,
int rightIndent,
int lineSpace,
int paragraphSpace,
int tabWidth,
Visualizable heading,
int headingSpace,
TextStyle baseStyle)
styleName - the style name.alignment - the alignment.leftIndent - the left indent.rightIndent - the right indent.lineSpace - the line space.paragraphSpace - the paragraph space.tabWidth - the tab width.heading - the visual heading.headingSpace - the heading space.baseStyle - the base text style.public final java.lang.String getStyleName()
public final int getAlignment()
public final int getLeftIndent()
public final int getRightIndent()
public final int getLineSpace()
public final int getParagraphSpace()
public final int getTabWidth()
public final Visualizable getHeading()
public final int getHeadingSpace()
public final TextStyle getBaseStyle()
public boolean hasStyleName()
public boolean hasHeading()
public boolean hasBaseStyle()
public ParagraphStyle deriveStyle(java.lang.String styleName)
styleName - the style name for the new style.public ParagraphStyle deriveStyle(TextStyle baseStyle)
baseStyle - the base text style for the new style.public ParagraphStyle deriveStyle(Visualizable visualizable, int space)
visualizable - the visual heading for the new style.space - the heading space for the new style.public ParagraphStyle deriveStyle(ParagraphStyleModifier modifier)
modifier - the paragraph style modifier.public int hashCode()
hashCode クラス内 java.lang.Objectpublic boolean equals(java.lang.Object anObject)
equals クラス内 java.lang.Objectprotected boolean equalsStyle(ParagraphStyle pStyle)
public java.lang.Object clone()
clone クラス内 java.lang.Objectpublic java.lang.String toString()
toString クラス内 java.lang.Objectprotected void setAlignment(int alignment)