All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.graphics.ParagraphStyle
java.lang.Object
|
+----jp.kyasu.graphics.ParagraphStyle
- public class ParagraphStyle
- extends Object
- implements Cloneable, Serializable
The ParagraphStyle
class implements the paragraph style
for the rich text object. The paragraph style has following attributes:
- Style name
- The name of the paragraph style.
- Alignment
- The alignment (justification) of the paragraph.
- Left indentation
- The left margin indentation of the paragraph.
- Right indentation
- The right margin indentation of the
paragraph.
- Line space
- The space between lines in the paragraph.
- Paragraph space
- The space below the paragraph.
- Tab width
- The indentation for the tab character. If the
tab width is not set, the default tab width of the rich text style
is used.
- Paragraph heading
- The visual heading of the paragraph.
- Paragraph heading space
- The space for the visual heading
from the left indentation.
- Base text style
- The base text style of the paragraph. If
the text in the paragraph has a
ModTextStyle
, the style
of the text is modified from the base text style of the paragraph.
The paragraph style is immutable.
- Version:
- 11 Nov 1997
- Author:
- Kazuki YASUMATSU
- See Also:
- ModTextStyle
-
CENTER
- The constant for the center alignment (justification).
-
DEFAULT_STYLE
- The default paragraph style constant.
-
HARD_TAB_LENGTH
- The constant for the tab width.
-
LEFT
- The constant for the left alignment (justification).
-
RIGHT
- The constant for the right alignment (justification).
-
ParagraphStyle(int)
- Constructs a paragraph style with the specified alignment.
-
ParagraphStyle(int, int, int)
- Constructs a paragraph style with the specified alignment, left
indent and right indent.
-
ParagraphStyle(int, int, int, int)
- Constructs a paragraph style with the specified alignment, left
indent, right indent and line space.
-
ParagraphStyle(int, int, int, int, int)
- Constructs a paragraph style with the specified alignment, left
indent, right indent, line space and paragraph space.
-
ParagraphStyle(int, int, int, int, int, int)
- Constructs a paragraph style with the specified alignment, left
indent, right indent, line space, paragraph space and tab width.
-
ParagraphStyle(int, int, int, int, int, int, TextStyle)
- Constructs a paragraph style with the specified alignment, left
indent, right indent, line space, paragraph space, tab width and
base text style.
-
ParagraphStyle(int, int, int, int, int, int, Visualizable, int)
- Constructs a paragraph style with the specified alignment, left
indent, right indent, line space, paragraph space, tab width,
visual heading and heading space.
-
ParagraphStyle(String, int, int, int, int, int, int, TextStyle)
- Constructs a paragraph style with the specified name, alignment,
left indent, right indent, line space, paragraph space, tab width
and base text style.
-
ParagraphStyle(String, int, int, int, int, int, int, Visualizable, int)
- 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(String, int, int, int, int, int, int, Visualizable, int, TextStyle)
- 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.
-
clone()
- Returns a clone of this paragraph style.
-
deriveStyle(ParagraphStyleModifier)
- Creates a new style by modifying this style by a paragraph style
modifier.
-
deriveStyle(String)
- Creates a new style by replicating this style with a new style
name associated with it.
-
deriveStyle(TextStyle)
- Creates a new style by replicating this style with a new base
text style associated with it.
-
deriveStyle(Visualizable, int)
- Creates a new style by replicating this style with a new visual
heading and a new heading space associated with it.
-
equals(Object)
- Compares two objects for equality.
-
getAlignment()
- Returns the alignment (justification) of the paragraph.
-
getBaseStyle()
- Returns the base text style of the paragraph.
-
getHeading()
- Returns the visual heading of the paragraph.
-
getHeadingSpace()
- Returns the space for the visual heading from the left indentation.
-
getLeftIndent()
- Returns the left margin indentation of the paragraph.
-
getLineSpace()
- Returns the space between lines in the paragraph.
-
getParagraphSpace()
- Returns the space below the paragraph.
-
getRightIndent()
- Returns the right margin indentation of the paragraph.
-
getStyleName()
- Returns the name of the paragraph style.
-
getTabWidth()
- Returns the indentation for the tab character.
-
hasBaseStyle()
- Checks if this paragraph style has a base text style.
-
hashCode()
- Returns a hashcode for this paragraph style.
-
hasHeading()
- Checks if this paragraph style has a visual heading.
-
hasStyleName()
- Checks if this paragraph style has a style name.
-
toString()
- Returns the string representation of this paragraph style.
LEFT
public static final int LEFT
- The constant for the left alignment (justification).
RIGHT
public static final int RIGHT
- The constant for the right alignment (justification).
CENTER
public static final int CENTER
- The constant for the center alignment (justification).
HARD_TAB_LENGTH
public static final int HARD_TAB_LENGTH
- The constant for the tab width.
DEFAULT_STYLE
public static final ParagraphStyle DEFAULT_STYLE
- The default paragraph style constant.
ParagraphStyle
public ParagraphStyle(int alignment)
- Constructs a paragraph style with the specified alignment.
- Parameters:
- alignment - the alignment.
ParagraphStyle
public ParagraphStyle(int alignment,
int leftIndent,
int rightIndent)
- Constructs a paragraph style with the specified alignment, left
indent and right indent.
- Parameters:
- alignment - the alignment.
- leftIndent - the left indent.
- rightIndent - the right indent.
ParagraphStyle
public ParagraphStyle(int alignment,
int leftIndent,
int rightIndent,
int lineSpace)
- Constructs a paragraph style with the specified alignment, left
indent, right indent and line space.
- Parameters:
- alignment - the alignment.
- leftIndent - the left indent.
- rightIndent - the right indent.
- lineSpace - the line space.
ParagraphStyle
public 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.
- Parameters:
- alignment - the alignment.
- leftIndent - the left indent.
- rightIndent - the right indent.
- lineSpace - the line space.
- paragraphSpace - the paragraph space.
ParagraphStyle
public 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.
- Parameters:
- alignment - the alignment.
- leftIndent - the left indent.
- rightIndent - the right indent.
- lineSpace - the line space.
- paragraphSpace - the paragraph space.
- tabWidth - the tab width.
ParagraphStyle
public 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.
- Parameters:
- 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.
ParagraphStyle
public 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.
- Parameters:
- 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.
ParagraphStyle
public ParagraphStyle(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.
- Parameters:
- 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.
ParagraphStyle
public ParagraphStyle(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.
- Parameters:
- 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.
ParagraphStyle
public ParagraphStyle(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.
- Parameters:
- 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.
getStyleName
public final String getStyleName()
- Returns the name of the paragraph style.
getAlignment
public final int getAlignment()
- Returns the alignment (justification) of the paragraph.
getLeftIndent
public final int getLeftIndent()
- Returns the left margin indentation of the paragraph.
getRightIndent
public final int getRightIndent()
- Returns the right margin indentation of the paragraph.
getLineSpace
public final int getLineSpace()
- Returns the space between lines in the paragraph.
getParagraphSpace
public final int getParagraphSpace()
- Returns the space below the paragraph.
getTabWidth
public final int getTabWidth()
- Returns the indentation for the tab character.
getHeading
public final Visualizable getHeading()
- Returns the visual heading of the paragraph.
getHeadingSpace
public final int getHeadingSpace()
- Returns the space for the visual heading from the left indentation.
getBaseStyle
public final TextStyle getBaseStyle()
- Returns the base text style of the paragraph.
hasStyleName
public boolean hasStyleName()
- Checks if this paragraph style has a style name.
hasHeading
public boolean hasHeading()
- Checks if this paragraph style has a visual heading.
hasBaseStyle
public boolean hasBaseStyle()
- Checks if this paragraph style has a base text style.
deriveStyle
public ParagraphStyle deriveStyle(String styleName)
- Creates a new style by replicating this style with a new style
name associated with it.
- Parameters:
- styleName - the style name for the new style.
- Returns:
- a new style.
deriveStyle
public ParagraphStyle deriveStyle(TextStyle baseStyle)
- Creates a new style by replicating this style with a new base
text style associated with it.
- Parameters:
- baseStyle - the base text style for the new style.
- Returns:
- a new style.
deriveStyle
public 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.
- Parameters:
- visualizable - the visual heading for the new style.
- space - the heading space for the new style.
- Returns:
- a new style.
deriveStyle
public ParagraphStyle deriveStyle(ParagraphStyleModifier modifier)
- Creates a new style by modifying this style by a paragraph style
modifier.
- Parameters:
- modifier - the paragraph style modifier.
- Returns:
- a new style.
hashCode
public int hashCode()
- Returns a hashcode for this paragraph style.
- Overrides:
- hashCode in class Object
equals
public boolean equals(Object anObject)
- Compares two objects for equality.
- Overrides:
- equals in class Object
clone
public Object clone()
- Returns a clone of this paragraph style.
- Overrides:
- clone in class Object
toString
public String toString()
- Returns the string representation of this paragraph style.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index