de.vc.jfo.writing

## Class FlowStyle

- java.lang.Object
- - de.vc.jfo.writing.FlowStyle

- All Implemented Interfaces:
    java.lang.Cloneable

      public class FlowStyle
      extends java.lang.Object
      implements java.lang.Cloneable

  A style defines some properties used by flow writer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlowStyle()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBlockValues(java.util.Map attr2value)`
    `void` | `addInlineValues(java.util.Map attr2value)`
    `void` | `applyStyle(Block block)` Applies block-properties of this style to a block.
    `void` | `applyStyle(Inline inline)` Applies text-properties of this style to an inline.
    `void` | `applyStyle(Table table)` Applies table-properties and some block-properties of this style to a table.
    `protected java.lang.Object` | `clone()`
    `FlowStyle` | `cloned()` Clones this style.
    `void` | `setBlockValue(java.lang.String name, java.lang.String value)`
    `void` | `setFirstLineIndent(Measure value)` Sets indent of first line.
    `void` | `setFontFamily(java.lang.String family)` Sets the font family.
    `void` | `setFontSize(int points)` Sets the font size.
    `void` | `setFontSize(Measure size)` Sets the font size.
    `void` | `setFontStyle(FontSupport.Style style)` Sets the font style.
    `void` | `setFontWeight(FontSupport.Weight weight)` Sets the font weight.
    `void` | `setForegroundColor(java.awt.Color c)` Sets the foreground (text) color.
    `void` | `setInlineValue(java.lang.String name, java.lang.String value)`
    `void` | `setLeftIndent(Measure value)` Sets the space at left side of paragraph.
    `void` | `setRightIndent(Measure value)` Sets the space at right side of paragraph.
    `void` | `setSpaceAfter(Measure space)` Sets the space after paragraph.
    `void` | `setSpaceBefore(Measure space)` Sets the space before paragraph.
    `void` | `setTableLeftMargin(Measure tableLeftMargin)` Sets the left margin of next tables.
    `void` | `setTableRightMargin(Measure tableRightMargin)` Sets the right margin of next tables.
    `void` | `setTextAlignment(Values.Alignment alignment)` Sets the alignment of a paragraph.
    `void` | `setUnderline(boolean b)` Sets underline.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FlowStyle

          public FlowStyle()

  - ### Method Detail

    - #### setForegroundColor

          public void setForegroundColor(java.awt.Color c)

      Sets the foreground (text) color.
      Parameters:
        `c` - Color.

    - #### setUnderline

          public void setUnderline(boolean b)

      Sets underline.
      Parameters:
        `b` - true, if underline.

    - #### setSpaceBefore

          public void setSpaceBefore(Measure space)

      Sets the space before paragraph.
      Parameters:
        `space` - Space.

    - #### setSpaceAfter

          public void setSpaceAfter(Measure space)

      Sets the space after paragraph.
      Parameters:
        `space` - Space.

    - #### setTextAlignment

          public void setTextAlignment(Values.Alignment alignment)

      Sets the alignment of a paragraph.
      Parameters:
        `alignment` - Alignment of text.

    - #### setLeftIndent

          public void setLeftIndent(Measure value)

      Sets the space at left side of paragraph.
      Parameters:
        `value` - Left indent.

    - #### setRightIndent

          public void setRightIndent(Measure value)

      Sets the space at right side of paragraph.
      Parameters:
        `value` - Right indent.

    - #### setFirstLineIndent

          public void setFirstLineIndent(Measure value)

      Sets indent of first line.
      Parameters:
        `value` - Indent.

    - #### setFontStyle

          public void setFontStyle(FontSupport.Style style)

      Sets the font style. (See FontSupport.STYLE_*).
      Parameters:
        `style` - Style.

    - #### setFontSize

          public void setFontSize(Measure size)

      Sets the font size.
      Parameters:
        `size` - Size.

    - #### setFontSize

          public void setFontSize(int points)

      Sets the font size.
      Parameters:
        `points` - Font size in points.

    - #### setFontWeight

          public void setFontWeight(FontSupport.Weight weight)

      Sets the font weight. (See FontSupport.WEIGHT_*).
      Parameters:
        `weight` - Weight.

    - #### setFontFamily

          public void setFontFamily(java.lang.String family)

      Sets the font family.
      Parameters:
        `family` - Family name.

    - #### applyStyle

          public void applyStyle(Inline inline)

      Applies text-properties of this style to an inline. Following properties are applied:
    - Foreground color
    - Underline
    - All font attributes
    - All properties of inline-value map

Parameters:
  `inline` - Inline.

- #### applyStyle

      public void applyStyle(Block block)

  Applies block-properties of this style to a block. Following properties are applied:
- Space before
- Space after
- Text alignment
- Left (Start) indent
- Right (End) indent
- Text indent (first line left)
- All font attributes
- All properties of block-value map

Parameters:
  `block` - Block.

- #### applyStyle

      public void applyStyle(Table table)

  Applies table-properties and some block-properties of this style to a table. Following properties are applied:
- Space before
- Space after
- Table left margin
- Table right margin

Parameters:
  `table` - Table.

- #### cloned

      public FlowStyle cloned()

  Clones this style.
  Returns:
    Clone of style.

- #### addInlineValues

      public void addInlineValues(java.util.Map attr2value)

- #### addBlockValues

      public void addBlockValues(java.util.Map attr2value)

- #### setInlineValue

      public void setInlineValue(java.lang.String name,
                        java.lang.String value)

- #### setBlockValue

      public void setBlockValue(java.lang.String name,
                       java.lang.String value)

- #### setTableLeftMargin

      public void setTableLeftMargin(Measure tableLeftMargin)

  Sets the left margin of next tables.
  Parameters:
    `tableLeftMargin` - Left margin.

- #### setTableRightMargin

      public void setTableRightMargin(Measure tableRightMargin)

  Sets the right margin of next tables.
  Parameters:
    `tableRightMargin` - Right margin.

- #### clone

      protected java.lang.Object clone()
                                throws java.lang.CloneNotSupportedException

  Overrides:
    `clone` in class `java.lang.Object`
  Throws:
    `java.lang.CloneNotSupportedException`

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.