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

Variable Index

 o ALIGNMENT
The constant for the attribute "alignment".
 o BASE_STYLE
The constant for the attribute "base style".
 o HEADING
The constant for the attribute "heading".
 o HEADING_SPACE
The constant for the attribute "heading space".
 o LEFT_INDENT
The constant for the attribute "left indent".
 o LEFT_INDENT_DIFF
The constant for the attribute "left indent".
 o LINE_SPACE
The constant for the attribute "line space".
 o LINE_SPACE_DIFF
The constant for the attribute "line space".
 o PARAGRAPH_SPACE
The constant for the attribute "paragraph space".
 o PARAGRAPH_SPACE_DIFF
The constant for the attribute "paragraph space".
 o RIGHT_INDENT
The constant for the attribute "right indent".
 o RIGHT_INDENT_DIFF
The constant for the attribute "right indent".
 o STYLE_NAME
The constant for the attribute "style name".

Constructor Index

 o BasicPSModifier()
Constructs an empty paragraph style modifier.

Method Index

 o modify(ParagraphStyle)
Modifies the given paragraph style, i.e., Creates the modified version of the given paragraph style.

Variables

 o STYLE_NAME
 public static final String STYLE_NAME
The constant for the attribute "style name". The value of this attribute should be a String.

 o 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
 o LEFT_INDENT
 public static final String LEFT_INDENT
The constant for the attribute "left indent". The value of this attribute should be an integer.

 o 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.

 o RIGHT_INDENT
 public static final String RIGHT_INDENT
The constant for the attribute "right indent". The value of this attribute should be an integer.

 o 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.

 o LINE_SPACE
 public static final String LINE_SPACE
The constant for the attribute "line space". The value of this attribute should be an integer.

 o 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.

 o PARAGRAPH_SPACE
 public static final String PARAGRAPH_SPACE
The constant for the attribute "paragraph space". The value of this attribute should be an integer.

 o 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.

 o 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
 o HEADING_SPACE
 public static final String HEADING_SPACE
The constant for the attribute "heading space". The value of this attribute should be an integer.

 o 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

Constructors

 o BasicPSModifier
 public BasicPSModifier()
Constructs an empty paragraph style modifier.

Methods

 o 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