fop 0.95

org.apache.fop.fo.properties
Class CommonBorderPaddingBackground

java.lang.Object
  extended by 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
static class CommonBorderPaddingBackground.BorderInfo
           
 
Field Summary
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.
static int BEFORE
          the "before" edge
static int END
          the "end" edge
static int START
          the "start" edge
 
Constructor Summary
CommonBorderPaddingBackground()
          Construct a CommonBorderPaddingBackground object.
CommonBorderPaddingBackground(PropertyList pList)
          Construct a CommonBorderPaddingBackground object.
 
Method Summary
 int getBorderAfterWidth(boolean bDiscard)
           
 int getBorderBeforeWidth(boolean bDiscard)
           
 java.awt.Color getBorderColor(int side)
           
 int getBorderEndWidth(boolean bDiscard)
           
 CommonBorderPaddingBackground.BorderInfo getBorderInfo(int side)
           
 int getBorderStartWidth(boolean bDiscard)
           
 int getBorderStyle(int side)
           
 int getBorderWidth(int side, boolean bDiscard)
           
 int getBPPaddingAndBorder(boolean bDiscard, 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()
           
 int getIPPaddingAndBorder(boolean bDiscard, PercentBaseContext context)
          Return all the border and padding width in the inline progression dimension.
 int getPadding(int side, boolean bDiscard, PercentBaseContext context)
           
 int getPaddingAfter(boolean bDiscard, PercentBaseContext context)
           
 int getPaddingBefore(boolean bDiscard, PercentBaseContext context)
           
 int getPaddingEnd(boolean bDiscard, PercentBaseContext context)
           
 CondLengthProperty getPaddingLengthProperty(int side)
          Returns the CondLengthProperty for the padding on one side.
 int getPaddingStart(boolean bDiscard, PercentBaseContext context)
           
 boolean hasBackground()
           
 boolean hasBorder()
           
 boolean hasBorderInfo()
           
 boolean hasPadding(PercentBaseContext context)
           
 void setBorderInfo(CommonBorderPaddingBackground.BorderInfo info, int side)
          Sets a border.
 void setPadding(CommonBorderPaddingBackground source)
          Set padding.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

backgroundAttachment

public int backgroundAttachment
The "background-attachment" property.


backgroundColor

public java.awt.Color backgroundColor
The "background-color" property.


backgroundImage

public java.lang.String backgroundImage
The "background-image" property.


backgroundRepeat

public int backgroundRepeat
The "background-repeat" property.


backgroundPositionHorizontal

public Length backgroundPositionHorizontal
The "background-position-horizontal" property.


backgroundPositionVertical

public Length backgroundPositionVertical
The "background-position-vertical" property.


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
Constructor Detail

CommonBorderPaddingBackground

public CommonBorderPaddingBackground()
Construct a CommonBorderPaddingBackground object.


CommonBorderPaddingBackground

public CommonBorderPaddingBackground(PropertyList pList)
                              throws PropertyException
Construct a CommonBorderPaddingBackground object.

Parameters:
pList - The PropertyList to get properties from.
Throws:
PropertyException - if there's an error while binding the properties
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

setBorderInfo

public void setBorderInfo(CommonBorderPaddingBackground.BorderInfo info,
                          int side)
Sets a border.

Parameters:
info - the border information
side - the side to apply the info to

getBorderInfo

public CommonBorderPaddingBackground.BorderInfo getBorderInfo(int side)
Parameters:
side - the side to retrieve
Returns:
the border info for a side

setPadding

public void setPadding(CommonBorderPaddingBackground source)
Set padding.

Parameters:
source - the padding info to copy from

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 bDiscard)
Parameters:
bDiscard - indicates whether the .conditionality component should be considered (start of a reference-area)

getBorderEndWidth

public int getBorderEndWidth(boolean bDiscard)
Parameters:
bDiscard - indicates whether the .conditionality component should be considered (end of a reference-area)

getBorderBeforeWidth

public int getBorderBeforeWidth(boolean bDiscard)
Parameters:
bDiscard - indicates whether the .conditionality component should be considered (start of a reference-area)

getBorderAfterWidth

public int getBorderAfterWidth(boolean bDiscard)
Parameters:
bDiscard - indicates whether the .conditionality component should be considered (end of a reference-area)

getPaddingStart

public int getPaddingStart(boolean bDiscard,
                           PercentBaseContext context)

getPaddingEnd

public int getPaddingEnd(boolean bDiscard,
                         PercentBaseContext context)

getPaddingBefore

public int getPaddingBefore(boolean bDiscard,
                            PercentBaseContext context)

getPaddingAfter

public int getPaddingAfter(boolean bDiscard,
                           PercentBaseContext context)

getBorderWidth

public int getBorderWidth(int side,
                          boolean bDiscard)

getBorderColor

public java.awt.Color getBorderColor(int side)

getBorderStyle

public int getBorderStyle(int side)

getPadding

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

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 bDiscard,
                                 PercentBaseContext context)
Return all the border and padding width in the inline progression dimension.

Parameters:
bDiscard - the discard flag.
context - for percentage evaluation.
Returns:
all the padding and border width.

getBPPaddingAndBorder

public int getBPPaddingAndBorder(boolean bDiscard,
                                 PercentBaseContext context)
Return all the border and padding height in the block progression dimension.

Parameters:
bDiscard - 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.

fop 0.95

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