org.apache.fop.fo.properties

## Class CommonBorderPaddingBackground

- java.lang.Object
- - org.apache.fop.fo.properties.CommonBorderPaddingBackground

-     public class CommonBorderPaddingBackground
      extends java.lang.Object

  Stores all common border and padding properties. See Sec. 7.7 of the XSL-FO Standard.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CommonBorderPaddingBackground.BorderInfo` Utility class to express border info.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `AFTER` the "after" edge
    `int` | `backgroundAttachment` The "background-attachment" property.
    `java.awt.Color` | `backgroundColor` The "background-color" property.
    `java.lang.String` | `backgroundImage` The "background-image" property.
    `Length` | `backgroundPositionHorizontal` The "background-position-horizontal" property.
    `Length` | `backgroundPositionVertical` The "background-position-vertical" property.
    `int` | `backgroundRepeat` The "background-repeat" property.
    `Length` | `backgroungImageTargetHeight`
    `Length` | `backgroungImageTargetWidth`
    `static int` | `BEFORE` the "before" edge
    `static int` | `END` the "end" edge
    `static int` | `START` the "start" edge

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `int` | `getBackgroundAttachment()` Returns the "background-attachment" property.
    `java.awt.Color` | `getBackgroundColor()` Returns the "background-color" property.
    `java.lang.String` | `getBackgroundImage()` Returns the "background-image" property.
    `org.apache.xmlgraphics.image.loader.ImageInfo` | `getBackgroundImageInfo()` Returns the background image info
    `Length` | `getBackgroundPositionHorizontal()` Returns the "background-position-horizontal" property.
    `Length` | `getBackgroundPositionVertical()` Returns the "background-position-vertical" property.
    `int` | `getBackgroundRepeat()` Returns the "background-repeat" property.
    `int` | `getBorderAfterWidth(boolean discard)`
    `int` | `getBorderBeforeWidth(boolean discard)`
    `java.awt.Color` | `getBorderColor(int side)` The border-color for the given side
    `int` | `getBorderEndWidth(boolean discard)`
    `CommonBorderPaddingBackground.BorderInfo[]` | `getBorderInfo()` Returns the border info
    `CommonBorderPaddingBackground.BorderInfo` | `getBorderInfo(int side)`
    `int` | `getBorderRadiusEnd(int side, boolean discard, PercentBaseContext context)` Returns the border corner radius of the ending edge i.e.
    `int` | `getBorderRadiusStart(int side, boolean discard, PercentBaseContext context)` Returns the border corner radius of the starting edge i.e.
    `int` | `getBorderStartWidth(boolean discard)`
    `int` | `getBorderStyle(int side)` The border-style for the given side
    `int` | `getBorderWidth(int side, boolean discard)`
    `int` | `getBPPaddingAndBorder(boolean discard, PercentBaseContext context)` Return all the border and padding height in the block progression dimension.
    `static CommonBorderPaddingBackground.BorderInfo` | `getDefaultBorderInfo()` Returns a default BorderInfo of style none.
    `org.apache.xmlgraphics.image.loader.ImageInfo` | `getImageInfo()`
    `static CommonBorderPaddingBackground` | `getInstance(PropertyList pList)` Obtain a CommonBorderPaddingBackground instance based on the related property valus in the given `PropertyList`
    `int` | `getIPPaddingAndBorder(boolean discard, PercentBaseContext context)` Return all the border and padding width in the inline progression dimension.
    `CondLengthProperty[]` | `getPadding()` Returns the padding
    `int` | `getPadding(int side, boolean discard, PercentBaseContext context)` Return the padding for the given side, taking into account the conditionality and evaluating any percentages in the given context.
    `int` | `getPaddingAfter(boolean discard, PercentBaseContext context)`
    `int` | `getPaddingBefore(boolean discard, PercentBaseContext context)`
    `int` | `getPaddingEnd(boolean discard, PercentBaseContext context)`
    `CondLengthProperty` | `getPaddingLengthProperty(int side)` Returns the CondLengthProperty for the padding on one side.
    `int` | `getPaddingStart(boolean discard, PercentBaseContext context)`
    `boolean` | `hasBackground()`
    `boolean` | `hasBorder()`
    `boolean` | `hasBorderInfo()`
    `int` | `hashCode()`
    `boolean` | `hasPadding(PercentBaseContext context)`
    `java.lang.String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### backgroundAttachment

          public final int backgroundAttachment

      The "background-attachment" property.

    - #### backgroundColor

          public final java.awt.Color backgroundColor

      The "background-color" property.

    - #### backgroundImage

          public final java.lang.String backgroundImage

      The "background-image" property.

    - #### backgroundRepeat

          public final int backgroundRepeat

      The "background-repeat" property.

    - #### backgroundPositionHorizontal

          public final Length backgroundPositionHorizontal

      The "background-position-horizontal" property.

    - #### backgroundPositionVertical

          public final Length backgroundPositionVertical

      The "background-position-vertical" property.

    - #### backgroungImageTargetWidth

          public final Length backgroungImageTargetWidth

    - #### backgroungImageTargetHeight

          public final Length backgroungImageTargetHeight

    - #### BEFORE

          public static final int BEFORE

      the "before" edge
      See Also:
        Constant Field Values

    - #### AFTER

          public static final int AFTER

      the "after" edge
      See Also:
        Constant Field Values

    - #### START

          public static final int START

      the "start" edge
      See Also:
        Constant Field Values

    - #### END

          public static final int END

      the "end" edge
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getDefaultBorderInfo

          public static CommonBorderPaddingBackground.BorderInfo getDefaultBorderInfo()

      Returns a default BorderInfo of style none.
      Returns:
        a BorderInfo instance with style set to `Constants.EN_NONE`

    - #### getInstance

          public static CommonBorderPaddingBackground getInstance(PropertyList pList)
                                                           throws PropertyException

      Obtain a CommonBorderPaddingBackground instance based on the related property valus in the given `PropertyList`
      Parameters:
        `pList` - the `PropertyList` to use
      Returns:
        a CommonBorderPaddingBackground instance (cached if possible)
      Throws:
        `PropertyException` - in case of an error

    - #### getBorderInfo

          public CommonBorderPaddingBackground.BorderInfo getBorderInfo(int side)

      Parameters:
        `side` - the side to retrieve
      Returns:
        the border info for a side

    - #### getImageInfo

          public org.apache.xmlgraphics.image.loader.ImageInfo getImageInfo()

      Returns:
        the background image info object, null if there is no background image.

    - #### getBorderStartWidth

          public int getBorderStartWidth(boolean discard)

      Parameters:
        `discard` - indicates whether the .conditionality component should be considered (start of a reference-area)
      Returns:
        the width of the start-border, taking into account the specified conditionality

    - #### getBorderEndWidth

          public int getBorderEndWidth(boolean discard)

      Parameters:
        `discard` - indicates whether the .conditionality component should be considered (end of a reference-area)
      Returns:
        the width of the end-border, taking into account the specified conditionality

    - #### getBorderBeforeWidth

          public int getBorderBeforeWidth(boolean discard)

      Parameters:
        `discard` - indicates whether the .conditionality component should be considered (start of a reference-area)
      Returns:
        the width of the before-border, taking into account the specified conditionality

    - #### getBorderAfterWidth

          public int getBorderAfterWidth(boolean discard)

      Parameters:
        `discard` - indicates whether the .conditionality component should be considered (end of a reference-area)
      Returns:
        the width of the after-border, taking into account the specified conditionality

    - #### getPaddingStart

          public int getPaddingStart(boolean discard,
                                     PercentBaseContext context)

      Parameters:
        `discard` - indicates whether the .conditionality component should be considered (start of a reference-area)
        `context` - the context to evaluate percentage values
      Returns:
        the width of the start-padding, taking into account the specified conditionality

    - #### getPaddingEnd

          public int getPaddingEnd(boolean discard,
                                   PercentBaseContext context)

      Parameters:
        `discard` - indicates whether the .conditionality component should be considered (start of a reference-area)
        `context` - the context to evaluate percentage values
      Returns:
        the width of the end-padding, taking into account the specified conditionality

    - #### getPaddingBefore

          public int getPaddingBefore(boolean discard,
                                      PercentBaseContext context)

      Parameters:
        `discard` - indicates whether the .conditionality component should be considered (start of a reference-area)
        `context` - the context to evaluate percentage values
      Returns:
        the width of the before-padding, taking into account the specified conditionality

    - #### getPaddingAfter

          public int getPaddingAfter(boolean discard,
                                     PercentBaseContext context)

      Parameters:
        `discard` - indicates whether the .conditionality component should be considered (start of a reference-area)
        `context` - the context to evaluate percentage values
      Returns:
        the width of the after-padding, taking into account the specified conditionality

    - #### getBorderWidth

          public int getBorderWidth(int side,
                                    boolean discard)

      Parameters:
        `side` - the side of the border
        `discard` - indicates whether the .conditionality component should be considered (end of a reference-area)
      Returns:
        the width of the start-border, taking into account the specified conditionality

    - #### getBorderRadiusStart

          public int getBorderRadiusStart(int side,
                                          boolean discard,
                                          PercentBaseContext context)

      Returns the border corner radius of the starting edge i.e. the edge either adjacent to the before or start border.
      Parameters:
        `side` - the border side
        `discard` - indicates whether the .conditionality component should be considered (end of a reference-area)
        `context` - the context for percentage calculations
      Returns:
        the border radius of the of the starting corner

    - #### getBorderRadiusEnd

          public int getBorderRadiusEnd(int side,
                                        boolean discard,
                                        PercentBaseContext context)

      Returns the border corner radius of the ending edge i.e. the edge either adjacent to the after or end border
      Parameters:
        `side` - the border side
        `discard` - indicates whether the .conditionality component should be considered (end of a reference-area)
        `context` - the context for percentage calculations
      Returns:
        the border radius of the of the ending corner

    - #### getBorderColor

          public java.awt.Color getBorderColor(int side)

      The border-color for the given side
      Parameters:
        `side` - one of `BEFORE`, `AFTER`, `START`, `END`
      Returns:
        the border-color for the given side

    - #### getBorderStyle

          public int getBorderStyle(int side)

      The border-style for the given side
      Parameters:
        `side` - one of `BEFORE`, `AFTER`, `START`, `END`
      Returns:
        the border-style for the given side

    - #### getPadding

          public int getPadding(int side,
                                boolean discard,
                                PercentBaseContext context)

      Return the padding for the given side, taking into account the conditionality and evaluating any percentages in the given context.
      Parameters:
        `side` - one of `BEFORE`, `AFTER`, `START`, `END`
        `discard` - true if the conditionality component should be considered
        `context` - the context for percentage-resolution
      Returns:
        the computed padding for the given side

    - #### getPaddingLengthProperty

          public CondLengthProperty getPaddingLengthProperty(int side)

      Returns the CondLengthProperty for the padding on one side.
      Parameters:
        `side` - the side
      Returns:
        the requested CondLengthProperty

    - #### getIPPaddingAndBorder

          public int getIPPaddingAndBorder(boolean discard,
                                           PercentBaseContext context)

      Return all the border and padding width in the inline progression dimension.
      Parameters:
        `discard` - the discard flag.
        `context` - for percentage evaluation.
      Returns:
        all the padding and border width.

    - #### getBPPaddingAndBorder

          public int getBPPaddingAndBorder(boolean discard,
                                           PercentBaseContext context)

      Return all the border and padding height in the block progression dimension.
      Parameters:
        `discard` - the discard flag.
        `context` - for percentage evaluation
      Returns:
        all the padding and border height.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### hasBackground

          public boolean hasBackground()

      Returns:
        true if there is any kind of background to be painted

    - #### hasBorder

          public boolean hasBorder()

      Returns:
        true if border is non-zero.

    - #### hasPadding

          public boolean hasPadding(PercentBaseContext context)

      Parameters:
        `context` - for percentage based evaluation.
      Returns:
        true if padding is non-zero.

    - #### hasBorderInfo

          public boolean hasBorderInfo()

      Returns:
        true if there are any borders defined.

    - #### getBackgroundColor

          public java.awt.Color getBackgroundColor()

      Returns the "background-color" property.
      Returns:
        the "background-color" property.

    - #### getBackgroundAttachment

          public int getBackgroundAttachment()

      Returns the "background-attachment" property.
      Returns:
        the "background-attachment" property.

    - #### getBackgroundImage

          public java.lang.String getBackgroundImage()

      Returns the "background-image" property.
      Returns:
        the "background-image" property.

    - #### getBackgroundRepeat

          public int getBackgroundRepeat()

      Returns the "background-repeat" property.
      Returns:
        the "background-repeat" property.

    - #### getBackgroundPositionHorizontal

          public Length getBackgroundPositionHorizontal()

      Returns the "background-position-horizontal" property.
      Returns:
        the "background-position-horizontal" property.

    - #### getBackgroundPositionVertical

          public Length getBackgroundPositionVertical()

      Returns the "background-position-vertical" property.
      Returns:
        the "background-position-vertical" property.

    - #### getBackgroundImageInfo

          public org.apache.xmlgraphics.image.loader.ImageInfo getBackgroundImageInfo()

      Returns the background image info
      Returns:
        the background image info

    - #### getBorderInfo

          public CommonBorderPaddingBackground.BorderInfo[] getBorderInfo()

      Returns the border info
      Returns:
        the border info

    - #### getPadding

          public CondLengthProperty[] getPadding()

      Returns the padding
      Returns:
        the padding

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.