public class CommonBorderPaddingBackground
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CommonBorderPaddingBackground.BorderInfo
Utility class to express border info.
|
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
|
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() |
public final int backgroundAttachment
public final java.awt.Color backgroundColor
public final java.lang.String backgroundImage
public final int backgroundRepeat
public final Length backgroundPositionHorizontal
public final Length backgroundPositionVertical
public final Length backgroungImageTargetWidth
public final Length backgroungImageTargetHeight
public static final int BEFORE
public static final int AFTER
public static final int START
public static final int END
public static CommonBorderPaddingBackground.BorderInfo getDefaultBorderInfo()
Constants.EN_NONE
public static CommonBorderPaddingBackground getInstance(PropertyList pList) throws PropertyException
PropertyList
pList
- the PropertyList
to usePropertyException
- in case of an errorpublic CommonBorderPaddingBackground.BorderInfo getBorderInfo(int side)
side
- the side to retrievepublic org.apache.xmlgraphics.image.loader.ImageInfo getImageInfo()
public int getBorderStartWidth(boolean discard)
discard
- indicates whether the .conditionality component should be
considered (start of a reference-area)public int getBorderEndWidth(boolean discard)
discard
- indicates whether the .conditionality component should be
considered (end of a reference-area)public int getBorderBeforeWidth(boolean discard)
discard
- indicates whether the .conditionality component should be
considered (start of a reference-area)public int getBorderAfterWidth(boolean discard)
discard
- indicates whether the .conditionality component should be
considered (end of a reference-area)public int getPaddingStart(boolean discard, PercentBaseContext context)
discard
- indicates whether the .conditionality component should be
considered (start of a reference-area)context
- the context to evaluate percentage valuespublic int getPaddingEnd(boolean discard, PercentBaseContext context)
discard
- indicates whether the .conditionality component should be
considered (start of a reference-area)context
- the context to evaluate percentage valuespublic int getPaddingBefore(boolean discard, PercentBaseContext context)
discard
- indicates whether the .conditionality component should be
considered (start of a reference-area)context
- the context to evaluate percentage valuespublic int getPaddingAfter(boolean discard, PercentBaseContext context)
discard
- indicates whether the .conditionality component should be
considered (start of a reference-area)context
- the context to evaluate percentage valuespublic int getBorderWidth(int side, boolean discard)
side
- the side of the borderdiscard
- indicates whether the .conditionality component should be considered (end of a
reference-area)public int getBorderRadiusStart(int side, boolean discard, PercentBaseContext context)
side
- the border sidediscard
- indicates whether the .conditionality component should be
considered (end of a reference-area)context
- the context for percentage calculationspublic int getBorderRadiusEnd(int side, boolean discard, PercentBaseContext context)
side
- the border sidediscard
- indicates whether the .conditionality component should be
considered (end of a reference-area)context
- the context for percentage calculationspublic java.awt.Color getBorderColor(int side)
public int getBorderStyle(int side)
public int getPadding(int side, boolean discard, PercentBaseContext context)
public CondLengthProperty getPaddingLengthProperty(int side)
side
- the sidepublic int getIPPaddingAndBorder(boolean discard, PercentBaseContext context)
discard
- the discard flag.context
- for percentage evaluation.public int getBPPaddingAndBorder(boolean discard, PercentBaseContext context)
discard
- the discard flag.context
- for percentage evaluationpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean hasBackground()
public boolean hasBorder()
public boolean hasPadding(PercentBaseContext context)
context
- for percentage based evaluation.public boolean hasBorderInfo()
public java.awt.Color getBackgroundColor()
public int getBackgroundAttachment()
public java.lang.String getBackgroundImage()
public int getBackgroundRepeat()
public Length getBackgroundPositionHorizontal()
public Length getBackgroundPositionVertical()
public org.apache.xmlgraphics.image.loader.ImageInfo getBackgroundImageInfo()
public CommonBorderPaddingBackground.BorderInfo[] getBorderInfo()
public CondLengthProperty[] getPadding()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.