All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.graphics.BasicPSModifier
java.lang.Object
|
+----jp.kyasu.graphics.Modifier
|
+----jp.kyasu.graphics.BasicPSModifier
- public class BasicPSModifier
- extends Modifier
- implements ParagraphStyleModifier
The BasicPSModifier
class is a basic implementation of
the interface for the paragraph style modifier.
An example of the modification is:
ParagraphStyle pStyle = new ParagraphStyle(ParagraphStyle.LEFT, 2, 2, 0)
BasicPSModifier modifier = new BasicPSModifier();
modifier.put(BasicPSModifier.ALIGNMENT, ParagraphStyle.RIGHT);
modifier.put(BasicPSModifier.LINE_SPACE, 4);
modifier.put(BasicPSModifier.HEADING, new VRectangle(4, 4));
pStyle = modifier.modify(pStyle);
// pStyle: new ParagraphStyle(ParagraphStyle.RIGHT, 2, 2, 4) with visual heading
modifier.clear();
modifier.put(BasicPSModifier.ALIGNMENT, ParagraphStyle.LEFT);
modifier.put(BasicPSModifier.LINE_SPACE_DIFF, -2);
modifier.put(BasicPSModifier.HEADING, BasicPSModifier.NULL);
pStyle = modifier.modify(pStyle);
// pStyle: new ParagraphStyle(ParagraphStyle.LEFT, 2, 2, 2)
- Version:
- 11 Nov 1997
- Author:
- Kazuki YASUMATSU
- See Also:
- ParagraphStyleModifier, Modifier
-
ALIGNMENT
- The constant for the attribute "alignment".
-
BASE_STYLE
- The constant for the attribute "base style".
-
HEADING
- The constant for the attribute "heading".
-
HEADING_SPACE
- The constant for the attribute "heading space".
-
LEFT_INDENT
- The constant for the attribute "left indent".
-
LEFT_INDENT_DIFF
- The constant for the attribute "left indent".
-
LINE_SPACE
- The constant for the attribute "line space".
-
LINE_SPACE_DIFF
- The constant for the attribute "line space".
-
PARAGRAPH_SPACE
- The constant for the attribute "paragraph space".
-
PARAGRAPH_SPACE_DIFF
- The constant for the attribute "paragraph space".
-
RIGHT_INDENT
- The constant for the attribute "right indent".
-
RIGHT_INDENT_DIFF
- The constant for the attribute "right indent".
-
STYLE_NAME
- The constant for the attribute "style name".
-
BasicPSModifier()
- Constructs an empty paragraph style modifier.
-
modify(ParagraphStyle)
- Modifies the given paragraph style, i.e., Creates the modified version
of the given paragraph style.
STYLE_NAME
public static final String STYLE_NAME
- The constant for the attribute "style name". The value of this attribute
should be a String.
ALIGNMENT
public static final String ALIGNMENT
- The constant for the attribute "alignment". The value of this attribute
should be an alignment integer.
- See Also:
- LEFT, RIGHT, CENTER
LEFT_INDENT
public static final String LEFT_INDENT
- The constant for the attribute "left indent". The value of this
attribute should be an integer.
LEFT_INDENT_DIFF
public static final String LEFT_INDENT_DIFF
- The constant for the attribute "left indent". The value of this
attribute should be an integer. The modification is done by adding
the specified value to the left indent of the paragraph style to
be modified.
RIGHT_INDENT
public static final String RIGHT_INDENT
- The constant for the attribute "right indent". The value of this
attribute should be an integer.
RIGHT_INDENT_DIFF
public static final String RIGHT_INDENT_DIFF
- The constant for the attribute "right indent". The value of this
attribute should be an integer. The modification is done by adding
the specified value to the right indent of the paragraph style to
be modified.
LINE_SPACE
public static final String LINE_SPACE
- The constant for the attribute "line space". The value of this
attribute should be an integer.
LINE_SPACE_DIFF
public static final String LINE_SPACE_DIFF
- The constant for the attribute "line space". The value of this
attribute should be an integer. The modification is done by adding
the specified value to the line space of the paragraph style to
be modified.
PARAGRAPH_SPACE
public static final String PARAGRAPH_SPACE
- The constant for the attribute "paragraph space". The value of this
attribute should be an integer.
PARAGRAPH_SPACE_DIFF
public static final String PARAGRAPH_SPACE_DIFF
- The constant for the attribute "paragraph space". The value of this
attribute should be an integer. The modification is done by adding
the specified value to the paragraph space of the paragraph style to
be modified.
HEADING
public static final String HEADING
- The constant for the attribute "heading". The value of this
attribute should be a visual object (
Visualizable
).
- See Also:
- Visualizable
HEADING_SPACE
public static final String HEADING_SPACE
- The constant for the attribute "heading space". The value of this
attribute should be an integer.
BASE_STYLE
public static final String BASE_STYLE
- The constant for the attribute "base style". The value of this
attribute should be a TextStyle.
- See Also:
- TextStyle
BasicPSModifier
public BasicPSModifier()
- Constructs an empty paragraph style modifier.
modify
public ParagraphStyle modify(ParagraphStyle pStyle)
- Modifies the given paragraph style, i.e., Creates the modified version
of the given paragraph style.
- Parameters:
- pStyle - the given paragraph style.
- Returns:
- the modified version of the given paragraph style;
or the given paragraph style, if the modification has no
effect on the given paragraph style.
- See Also:
- modify
All Packages Class Hierarchy This Package Previous Next Index