de.vc.jfo.attributes

## Class Margin

- java.lang.Object
- - de.vc.jfo.attributes.AttributeSubSet
  - - de.vc.jfo.attributes.Margin

- All Implemented Interfaces:
    java.lang.Cloneable

      public class Margin
      extends AttributeSubSet

  Defines margins, spaces and indents of a formatting object.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `KEY_SET`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Margin()` Creates a new margin without any definitions.
    `Margin(int left, int right)` Creates a new margin.
    `Margin(int top, int left, int right, int bottom)` Creates a new margin.
    `Margin(Measure left, Measure right)` Creates a new margin.
    `Margin(Measure top, Measure left, Measure right, Measure bottom)` Creates a new margin.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Margin` | `copy()` Creates a copy (clone) of this margin.
    `void` | `flipLeftAndRight()` Flips left and right margin.
    `void` | `flipTopAndBottom()` Flips top and bottom margin.
    `java.lang.Object` | `getAttribute(int keyIdx)`
    `MeasureFunction` | `getEndIndent()`
    `Measure` | `getMarginBottom()`
    `Measure` | `getMarginLeft()`
    `Measure` | `getMarginRight()`
    `Measure` | `getMarginTop()`
    `Measure` | `getSpaceAfter()`
    `Measure` | `getSpaceBefore()`
    `Measure` | `getSpaceEnd()`
    `Measure` | `getSpaceStart()`
    `MeasureFunction` | `getStartIndent()`
    `void` | `setEndIndent(Measure endIndent)`
    `void` | `setEndIndent(MeasureFunction endIndent)`
    `void` | `setMarginBottom(Measure marginBottom)`
    `void` | `setMarginLeft(Measure marginLeft)`
    `void` | `setMarginRight(Measure marginRight)`
    `void` | `setMarginTop(Measure marginTop)`
    `void` | `setSpaceAfter(Measure spaceAfter)`
    `void` | `setSpaceBefore(Measure spaceBefore)`
    `void` | `setSpaceEnd(Measure spaceEnd)`
    `void` | `setSpaceStart(Measure spaceStart)`
    `void` | `setStartIndent(Measure startIndent)`
    `void` | `setStartIndent(MeasureFunction startIndent)`

    - ### Methods inherited from class de.vc.jfo.attributes.AttributeSubSet

      `addDefinedAttributes, applyAttributes, clone, isMutable, makeImmutable, setAttribute`

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

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

- - ### Field Detail

    - #### KEY_SET

          public static final java.lang.String[] KEY_SET

  - ### Constructor Detail

    - #### Margin

          public Margin()

      Creates a new margin without any definitions.

    - #### Margin

          public Margin(int left,
                int right)

      Creates a new margin.
      Parameters:
        `left` - Margin left in points.
        `right` - Margin right in points.

    - #### Margin

          public Margin(Measure left,
                Measure right)

      Creates a new margin.
      Parameters:
        `left` - Margin left.
        `right` - Margin right.

    - #### Margin

          public Margin(int top,
                int left,
                int right,
                int bottom)

      Creates a new margin.
      Parameters:
        `top` - Margin top in points.
        `left` - Margin left in points.
        `right` - Margin right in points.
        `bottom` - Margin bottom in points.

    - #### Margin

          public Margin(Measure top,
                Measure left,
                Measure right,
                Measure bottom)

      Creates a new margin.
      Parameters:
        `top` - Margin top.
        `left` - Margin left.
        `right` - Margin right.
        `bottom` - Margin bottom.

  - ### Method Detail

    - #### copy

          public Margin copy()

      Creates a copy (clone) of this margin.
      Returns:
        A copy.

    - #### flipLeftAndRight

          public void flipLeftAndRight()

      Flips left and right margin.

    - #### flipTopAndBottom

          public void flipTopAndBottom()

      Flips top and bottom margin.

    - #### getEndIndent

          public MeasureFunction getEndIndent()

    - #### getStartIndent

          public MeasureFunction getStartIndent()

    - #### getMarginBottom

          public Measure getMarginBottom()

    - #### getMarginLeft

          public Measure getMarginLeft()

    - #### getMarginRight

          public Measure getMarginRight()

    - #### getMarginTop

          public Measure getMarginTop()

    - #### getSpaceAfter

          public Measure getSpaceAfter()

    - #### getSpaceBefore

          public Measure getSpaceBefore()

    - #### getSpaceEnd

          public Measure getSpaceEnd()

    - #### getSpaceStart

          public Measure getSpaceStart()

    - #### setStartIndent

          public void setStartIndent(MeasureFunction startIndent)

    - #### setStartIndent

          public void setStartIndent(Measure startIndent)

    - #### setSpaceEnd

          public void setSpaceEnd(Measure spaceEnd)

    - #### setSpaceBefore

          public void setSpaceBefore(Measure spaceBefore)

    - #### setSpaceAfter

          public void setSpaceAfter(Measure spaceAfter)

    - #### setMarginRight

          public void setMarginRight(Measure marginRight)

    - #### setMarginTop

          public void setMarginTop(Measure marginTop)

    - #### setMarginLeft

          public void setMarginLeft(Measure marginLeft)

    - #### setEndIndent

          public void setEndIndent(MeasureFunction endIndent)

    - #### setEndIndent

          public void setEndIndent(Measure endIndent)

    - #### setMarginBottom

          public void setMarginBottom(Measure marginBottom)

    - #### setSpaceStart

          public void setSpaceStart(Measure spaceStart)

    - #### getAttribute

          public java.lang.Object getAttribute(int keyIdx)

      Specified by:
        `getAttribute` in class `AttributeSubSet`

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