Package org.apache.fop.fo.properties
Class LineHeightPropertyMaker
java.lang.Object
org.apache.fop.fo.properties.PropertyMaker
org.apache.fop.fo.properties.CompoundPropertyMaker
org.apache.fop.fo.properties.SpaceProperty.Maker
org.apache.fop.fo.properties.LineHeightPropertyMaker
- All Implemented Interfaces:
Cloneable
A maker which calculates the line-height property.
This property maker is special because line-height inherits the specified
value, instead of the computed value.
So when a line-height is create based on an attribute, the specified value
is stored in the property and in compute() the stored specified value of
the nearest specified is used to recalculate the line-height.
-
Field Summary
Fields inherited from class org.apache.fop.fo.properties.PropertyMaker
contextDep, corresponding, defaultProperty, defaultValue, propId, setByShorthand
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Property
compute
(PropertyList propertyList) Recalculate the line-height value based on the nearest specified value.convertProperty
(Property p, PropertyList propertyList, FObj fo) Return a Property object based on the passed Property object.make
(PropertyList propertyList, String value, FObj fo) Create a Property object from an attribute specification.Methods inherited from class org.apache.fop.fo.properties.SpaceProperty.Maker
makeNewProperty
Methods inherited from class org.apache.fop.fo.properties.CompoundPropertyMaker
addSubpropMaker, checkEnumValues, get, getSubpropMaker, make, make, makeCompound, useGeneric
Methods inherited from class org.apache.fop.fo.properties.PropertyMaker
addEnum, addKeyword, addShorthand, checkValueKeywords, clone, convertPropertyDatatype, convertShorthandProperty, findProperty, getName, getPercentBase, getPropId, getShorthand, getSubprop, isInherited, setByShorthand, setCorresponding, setDatatypeParser, setDefault, setDefault, setInherited, setPercentBase, setSubprop
-
Constructor Details
-
LineHeightPropertyMaker
public LineHeightPropertyMaker(int propId) Create a maker for line-height.- Parameters:
propId
- the is for linehight.
-
-
Method Details
-
make
Create a Property object from an attribute specification.- Overrides:
make
in classCompoundPropertyMaker
- Parameters:
propertyList
- The PropertyList object being built for this FO.value
- The attribute value.fo
- The parent FO for the FO whose property is being made.- Returns:
- The initialized Property object.
- Throws:
PropertyException
- for invalid or inconsistent FO input
-
compute
Recalculate the line-height value based on the nearest specified value. 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.- Overrides:
compute
in classPropertyMaker
- Parameters:
propertyList
- The PropertyList for the FO.- Returns:
- Property A computed Property value or null if no rules are specified to compute the value.
- Throws:
PropertyException
- for invalid or inconsistent FO input
-
convertProperty
public Property convertProperty(Property p, PropertyList propertyList, FObj fo) throws PropertyException Return a Property object based on the passed Property object. This method is called if the Property object built by the parser isn't the right type for this compound property.- Overrides:
convertProperty
in classSpaceProperty.Maker
- Parameters:
p
- The Property object return by the expression parserpropertyList
- The PropertyList object being built for this FO.fo
- The parent FO for the FO whose property is being made.- Returns:
- A Property of the correct type or null if the parsed value can't be converted to the correct type.
- Throws:
PropertyException
- for invalid or inconsistent FO input
-