org.apache.fop.fo.properties

Class GenericShorthandParser

Implemented Interfaces:
ShorthandParser
Known Direct Subclasses:
BackgroundPositionShorthandParser, BorderSpacingShorthandParser, BoxPropShorthandParser, FontShorthandParser

public class GenericShorthandParser
extends java.lang.Object
implements ShorthandParser

Generic shorthand parser for ListProperties

Constructor Summary

GenericShorthandParser()
Constructor.

Method Summary

protected Property
convertValueForProperty(int propId, Property property, PropertyMaker maker, PropertyList propertyList)
Converts a property name into a Property
protected Property
getElement(Property list, int index)
Property
getValueForProperty(int propId, Property property, PropertyMaker maker, PropertyList propertyList)

Constructor Details

GenericShorthandParser

public GenericShorthandParser()
Constructor.

Method Details

convertValueForProperty

protected Property convertValueForProperty(int propId,
                                           Property property,
                                           PropertyMaker maker,
                                           PropertyList propertyList)
            throws PropertyException
Converts a property name into a Property
Parameters:
propId - the property ID in the Constants interface
property - ...
maker - the Property.Maker to be used in the conversion
propertyList - the PropertyList from which the Property should be extracted
Returns:
the Property matching the parameters, or null if not found
Throws:
PropertyException - (when?)

getElement

protected Property getElement(Property list,
                              int index)
Parameters:
list - the ListProperty
index - the index into the List of properties
Returns:
the property from the List of properties at the index parameter

getValueForProperty

public Property getValueForProperty(int propId,
                                    Property property,
                                    PropertyMaker maker,
                                    PropertyList propertyList)
            throws PropertyException
Specified by:
getValueForProperty in interface ShorthandParser

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