Class FOPropertyMapping

  • All Implemented Interfaces:
    Constants

    public final class FOPropertyMapping
    extends java.lang.Object
    implements Constants
    This class creates and returns an array of Property.Maker instances indexed by the PR_* propId from Constants.java. TODO Check multi-threading safety of the statics below
    • Field Detail

      • propNames

        private static java.util.Map<java.lang.String,​java.lang.Integer> propNames
      • subPropNames

        private static java.util.Map<java.lang.String,​java.lang.Integer> subPropNames
      • propIds

        private static java.util.Map<java.lang.Integer,​java.lang.String> propIds
      • genericCondBorderWidth

        private PropertyMaker genericCondBorderWidth
      • genericCondCornerRadius

        private PropertyMaker genericCondCornerRadius
    • Constructor Detail

      • FOPropertyMapping

        private FOPropertyMapping()
    • Method Detail

      • createGenerics

        private void createGenerics()
        Create the generic property maker templates. These templates are used be the actual makers as a parameter to .useGeneric(...).
      • addPropertyMaker

        private static void addPropertyMaker​(java.lang.String name,
                                             PropertyMaker maker)
        Add a property maker to the generics array. Also creates the name <-> id mapping in propNames and propIds.
        Parameters:
        name - the name of the property maker.
        maker - the maker.
      • addSubpropMakerName

        private static void addSubpropMakerName​(java.lang.String name,
                                                int id)
        Create the name<->id mapping for the subproperty names.
        Parameters:
        name - name of the subproperty.
        id - Id for the subproperty from CP_* in Constants.java.
      • getEnumProperty

        private Property getEnumProperty​(int enumValue,
                                         java.lang.String text)
        Return a (possibly cached) enum property based in the enum value.
        Parameters:
        enumValue - A enum value from Constants.java.
        text - the text value by which this enum property is known
        Returns:
        An EnumProperty instance.
      • getGenericMappings

        public static PropertyMaker[] getGenericMappings()
        Return the array of Makers.
        Returns:
        the maker array.
      • getPropertyId

        public static int getPropertyId​(java.lang.String name)
        Return the propId for a property name.
        Parameters:
        name - the property name
        Returns:
        a propId that matches the property name.
      • getSubPropertyId

        public static int getSubPropertyId​(java.lang.String name)
        Return the subpropId for a subproperty name.
        Parameters:
        name - the subproperty name.
        Returns:
        a subpropId that matches the subproperty name.
      • getPropertyName

        public static java.lang.String getPropertyName​(int id)
        Returns the property name corresponding to the PR_* id
        Parameters:
        id - the property id in Constants
        Returns:
        the property name
      • createAccessibilityProperties

        private void createAccessibilityProperties()
      • createAbsolutePositionProperties

        private void createAbsolutePositionProperties()
      • createAuralProperties

        private void createAuralProperties()
      • createBorderPaddingBackgroundProperties

        private void createBorderPaddingBackgroundProperties()
      • createFontProperties

        private void createFontProperties()
      • createHyphenationProperties

        private void createHyphenationProperties()
      • createMarginBlockProperties

        private void createMarginBlockProperties()
      • createMarginInlineProperties

        private void createMarginInlineProperties()
      • createRelativePosProperties

        private void createRelativePosProperties()
      • createAreaAlignmentProperties

        private void createAreaAlignmentProperties()
      • createAreaDimensionProperties

        private void createAreaDimensionProperties()
      • calcWritingModeDependent

        private Property calcWritingModeDependent​(int pv,
                                                  int wm)
      • makeWritingModeDependentEnum

        private Property makeWritingModeDependentEnum​(int pv)
      • createBlockAndLineProperties

        private void createBlockAndLineProperties()
      • createCharacterProperties

        private void createCharacterProperties()
      • createColorProperties

        private void createColorProperties()
      • createFloatProperties

        private void createFloatProperties()
      • createKeepsAndBreaksProperties

        private void createKeepsAndBreaksProperties()
      • createLayoutProperties

        private void createLayoutProperties()
      • createLeaderAndRuleProperties

        private void createLeaderAndRuleProperties()
      • createDynamicProperties

        private void createDynamicProperties()
      • createMarkersProperties

        private void createMarkersProperties()
      • createNumberToStringProperties

        private void createNumberToStringProperties()
      • createPaginationAndLayoutProperties

        private void createPaginationAndLayoutProperties()
      • createTableProperties

        private void createTableProperties()
      • createWritingModeProperties

        private void createWritingModeProperties()
      • createChangeBarProperties

        private void createChangeBarProperties()
      • createMiscProperties

        private void createMiscProperties()
      • createShorthandProperties

        private void createShorthandProperties()