Package org.apache.fop.fo.properties
Class CorrespondingPropertyMaker
java.lang.Object
org.apache.fop.fo.properties.CorrespondingPropertyMaker
- Direct Known Subclasses:
DimensionPropertyMaker
,IndentPropertyMaker
,SpacePropertyMaker
Maker class for handling corresponding properties.
-
Field Summary
Modifier and TypeFieldDescriptionprotected PropertyMaker
base property makerprotected int
corresponding property for lr-tb writing modeprotected int
corresponding property for rl-tb writing modeprotected int
corresponding property for tb-lr writing modeprotected int
corresponding property for tb-rl writing modeprotected boolean
user parent property list -
Constructor Summary
ConstructorDescriptionCorrespondingPropertyMaker
(PropertyMaker baseMaker) Construct a corresponding property maker. -
Method Summary
Modifier and TypeMethodDescriptioncompute
(PropertyList propertyList) Return a Property object representing the value of this property, based on other property values for this FO.protected PropertyList
getWMPropertyList
(PropertyList pList) Return the property list to use for fetching writing mode depending property ids.boolean
isCorrespondingForced
(PropertyList propertyList) For properties that operate on a relative direction (before, after, start, end) instead of an absolute direction (top, bottom, left, right), this method determines whether a corresponding property is specified on the corresponding absolute direction.void
setCorresponding
(int lrtb, int rltb, int tbrl, int tblr) Set corresponding property identifiers.void
setRelative
(boolean relative) Set relative flag.void
setUseParent
(boolean useParent) Controls whether the PropertyMaker accesses the parent property list or the current property list for determining the writing mode.
-
Field Details
-
baseMaker
base property maker -
lrtb
protected int lrtbcorresponding property for lr-tb writing mode -
rltb
protected int rltbcorresponding property for rl-tb writing mode -
tbrl
protected int tbrlcorresponding property for tb-rl writing mode -
tblr
protected int tblrcorresponding property for tb-lr writing mode -
useParent
protected boolean useParentuser parent property list
-
-
Constructor Details
-
CorrespondingPropertyMaker
Construct a corresponding property maker.- Parameters:
baseMaker
- the base property maker
-
-
Method Details
-
setCorresponding
public void setCorresponding(int lrtb, int rltb, int tbrl, int tblr) Set corresponding property identifiers.- Parameters:
lrtb
- the property that corresponds with lr-tb writing moderltb
- the property that corresponds with rl-tb writing modetbrl
- the property that corresponds with tb-lr writing modetblr
- the property that corresponds with tb-lr writing mode
-
setUseParent
public void setUseParent(boolean useParent) Controls whether the PropertyMaker accesses the parent property list or the current property list for determining the writing mode.- Parameters:
useParent
- true if the parent property list should be used.
-
setRelative
public void setRelative(boolean relative) Set relative flag.- Parameters:
relative
- true if properties operate on a relative direction
-
isCorrespondingForced
For properties that operate on a relative direction (before, after, start, end) instead of an absolute direction (top, bottom, left, right), this method determines whether a corresponding property is specified on the corresponding absolute direction. For example, the border-start-color property in a lr-tb writing-mode specifies the same thing that the border-left-color property specifies. In this example, if the Maker for the border-start-color property is testing, and if the border-left-color is specified in the properties, this method should return true.- Parameters:
propertyList
- collection of properties to be tested- Returns:
- true iff 1) the property operates on a relative direction, AND 2) the property has a corresponding property on an absolute direction, AND 3) the corresponding property on that absolute direction has been specified in the input properties
-
compute
Return a Property object representing the value of this property, based on other property values for this FO. A special case is properties which inherit the specified value, rather than the computed value.- Parameters:
propertyList
- The PropertyList for the FO.- Returns:
- Property A computed Property value or null if no rules are specified (in foproperties.xml) to compute the value.
- Throws:
PropertyException
- if a property exception occurs
-
getWMPropertyList
Return the property list to use for fetching writing mode depending property ids.- Parameters:
pList
- a property list- Returns:
- the property list to use
-