Package org.apache.fop.fo.properties

Examples of org.apache.fop.fo.properties.PropertyMaker


        });
        addPropertyMaker("end-indent", m);
    }

    private void createMarginInlineProperties() {
        PropertyMaker m;

        // space-end
        m  = new SpaceProperty.Maker(PR_SPACE_END);
        m.useGeneric(genericSpace);
        addPropertyMaker("space-end", m);

        // space-start
        m  = new SpaceProperty.Maker(PR_SPACE_START);
        m.useGeneric(genericSpace);
        addPropertyMaker("space-start", m);
    }
View Full Code Here


        m.useGeneric(genericSpace);
        addPropertyMaker("space-start", m);
    }

    private void createRelativePosProperties() {
        PropertyMaker m;

        // relative-position
        m  = new EnumProperty.Maker(PR_RELATIVE_POSITION);
        m.setInherited(false);
        m.addEnum("static", getEnumProperty(EN_STATIC, "STATIC"));
        m.addEnum("relative", getEnumProperty(EN_RELATIVE, "RELATIVE"));
        m.setDefault("static");
        m.addShorthand(s_generics[PR_POSITION]);
        addPropertyMaker("relative-position", m);
    }
View Full Code Here

        m.addShorthand(s_generics[PR_POSITION]);
        addPropertyMaker("relative-position", m);
    }

    private void createAreaAlignmentProperties() {
        PropertyMaker m;

        // alignment-adjust
        m  = new LengthProperty.Maker(PR_ALIGNMENT_ADJUST);
        m.setInherited(false);
        m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
        m.addEnum("before-edge", getEnumProperty(EN_BEFORE_EDGE, "BEFORE_EDGE"));
        m.addEnum("text-before-edge", getEnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE"));
        m.addEnum("middle", getEnumProperty(EN_MIDDLE, "MIDDLE"));
        m.addEnum("central", getEnumProperty(EN_CENTRAL, "CENTRAL"));
        m.addEnum("after-edge", getEnumProperty(EN_AFTER_EDGE, "AFTER_EDGE"));
        m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE"));
        m.addEnum("ideographic", getEnumProperty(EN_IDEOGRAPHIC, "IDEOGRAPHIC"));
        m.addEnum("alphabetic", getEnumProperty(EN_ALPHABETIC, "ALPHABETIC"));
        m.addEnum("hanging", getEnumProperty(EN_HANGING, "HANGING"));
        m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
        m.setDefault("auto");
        m.setPercentBase(LengthBase.ALIGNMENT_ADJUST);
        m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);
        addPropertyMaker("alignment-adjust", m);

        // alignment-baseline
        m  = new EnumProperty.Maker(PR_ALIGNMENT_BASELINE);
        m.setInherited(false);
        m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
        m.addEnum("before-edge", getEnumProperty(EN_BEFORE_EDGE, "BEFORE_EDGE"));
        m.addEnum("text-before-edge", getEnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE"));
        m.addEnum("middle", getEnumProperty(EN_MIDDLE, "MIDDLE"));
        m.addEnum("central", getEnumProperty(EN_CENTRAL, "CENTRAL"));
        m.addEnum("after-edge", getEnumProperty(EN_AFTER_EDGE, "AFTER_EDGE"));
        m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE"));
        m.addEnum("ideographic", getEnumProperty(EN_IDEOGRAPHIC, "IDEOGRAPHIC"));
        m.addEnum("alphabetic", getEnumProperty(EN_ALPHABETIC, "ALPHABETIC"));
        m.addEnum("hanging", getEnumProperty(EN_HANGING, "HANGING"));
        m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
        m.setDefault("auto");
        m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);
        addPropertyMaker("alignment-baseline", m);

        // baseline-shift
        m  = new LengthProperty.Maker(PR_BASELINE_SHIFT);
        m.setInherited(false);
        m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
        m.addEnum("sub", getEnumProperty(EN_SUB, "SUB"));
        m.addEnum("super", getEnumProperty(EN_SUPER, "SUPER"));
        m.setDefault("baseline");
        m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);
        m.setPercentBase(LengthBase.CUSTOM_BASE);
        addPropertyMaker("baseline-shift", m);

        // display-align
        m  = new EnumProperty.Maker(PR_DISPLAY_ALIGN);
        m.setInherited(true);
        m.addEnum("before", getEnumProperty(EN_BEFORE, "BEFORE"));
        m.addEnum("after", getEnumProperty(EN_AFTER, "AFTER"));
        m.addEnum("center", getEnumProperty(EN_CENTER, "CENTER"));
        m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
/*LF*/  m.addEnum("distribute", getEnumProperty(EN_X_DISTRIBUTE, "DISTRIBUTE"));
/*LF*/  m.addEnum("fill", getEnumProperty(EN_X_FILL, "FILL"));
        m.setDefault("auto");
        addPropertyMaker("display-align", m);

        // dominant-baseline
        m  = new EnumProperty.Maker(PR_DOMINANT_BASELINE);
        m.setInherited(false);
        m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        m.addEnum("use-script", getEnumProperty(EN_USE_SCRIPT, "USE_SCRIPT"));
        m.addEnum("no-change", getEnumProperty(EN_NO_CHANGE, "NO_CHANGE"));
        m.addEnum("reset-size", getEnumProperty(EN_RESET_SIZE, "RESET_SIZE"));
        m.addEnum("ideographic", getEnumProperty(EN_IDEOGRAPHIC, "IDEOGRAPHIC"));
        m.addEnum("alphabetic", getEnumProperty(EN_ALPHABETIC, "ALPHABETIC"));
        m.addEnum("hanging", getEnumProperty(EN_HANGING, "HANGING"));
        m.addEnum("mathematical", getEnumProperty(EN_MATHEMATICAL, "MATHEMATICAL"));
        m.addEnum("central", getEnumProperty(EN_CENTRAL, "CENTRAL"));
        m.addEnum("middle", getEnumProperty(EN_MIDDLE, "MIDDLE"));
        m.addEnum("text-after-edge", getEnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE"));
        m.addEnum("text-before-edge", getEnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE"));
        m.setDefault("auto");
        m.addShorthand(s_generics[PR_VERTICAL_ALIGN]);
        addPropertyMaker("dominant-baseline", m);

        // relative-align
        m  = new EnumProperty.Maker(PR_RELATIVE_ALIGN);
        m.setInherited(true);
        m.addEnum("before", getEnumProperty(EN_BEFORE, "BEFORE"));
        m.addEnum("baseline", getEnumProperty(EN_BASELINE, "BASELINE"));
        m.setDefault("before");
        addPropertyMaker("relative-align", m);
    }
View Full Code Here

        m.setDefault("before");
        addPropertyMaker("relative-align", m);
    }

    private void createAreaDimensionProperties() {
        PropertyMaker m;
        LengthProperty.Maker l;
        DimensionPropertyMaker pdim;

        // block-progression-dimension
        m = new LengthRangeProperty.Maker(PR_BLOCK_PROGRESSION_DIMENSION);
        m.setInherited(false);
        m.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);

        l = new LengthProperty.Maker(CP_MINIMUM);
        l.setDefault("auto");
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
        l.setByShorthand(true);
        m.addSubpropMaker(l);

        l = new LengthProperty.Maker(CP_OPTIMUM);
        l.setDefault("auto");
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
        l.setByShorthand(true);
        m.addSubpropMaker(l);

        l = new LengthProperty.Maker(CP_MAXIMUM);
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.setDefault("auto");
        l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
        l.setByShorthand(true);
        m.addSubpropMaker(l);

        pdim = new DimensionPropertyMaker(m);
        pdim.setCorresponding(PR_HEIGHT, PR_HEIGHT, PR_WIDTH);
        pdim.setExtraCorresponding(new int[][] {
             {PR_MIN_HEIGHT, PR_MIN_HEIGHT, PR_MIN_WIDTH, },
             {PR_MAX_HEIGHT, PR_MAX_HEIGHT, PR_MAX_WIDTH, }
        });
        pdim.setRelative(true);
        m.setCorresponding(pdim);
        addPropertyMaker("block-progression-dimension", m);

        // content-height
        l  = new LengthProperty.Maker(PR_CONTENT_HEIGHT);
        l.setInherited(false);
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.addEnum("scale-to-fit", getEnumProperty(EN_SCALE_TO_FIT, "SCALE_TO_FIT"));
        l.addEnum("scale-down-to-fit", getEnumProperty(EN_SCALE_DOWN_TO_FIT, "SCALE_DOWN_TO_FIT"));
        l.addEnum("scale-up-to-fit", getEnumProperty(EN_SCALE_UP_TO_FIT, "SCALE_UP_TO_FIT"));
        l.setDefault("auto");
        l.setPercentBase(LengthBase.IMAGE_INTRINSIC_HEIGHT);
        addPropertyMaker("content-height", l);

        // content-width
        l  = new LengthProperty.Maker(PR_CONTENT_WIDTH);
        l.setInherited(false);
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.addEnum("scale-to-fit", getEnumProperty(EN_SCALE_TO_FIT, "SCALE_TO_FIT"));
        l.addEnum("scale-down-to-fit", getEnumProperty(EN_SCALE_DOWN_TO_FIT, "SCALE_DOWN_TO_FIT"));
        l.addEnum("scale-up-to-fit", getEnumProperty(EN_SCALE_UP_TO_FIT, "SCALE_UP_TO_FIT"));
        l.setDefault("auto");
        l.setPercentBase(LengthBase.IMAGE_INTRINSIC_WIDTH);
        addPropertyMaker("content-width", l);

        // height
        l  = new LengthProperty.Maker(PR_HEIGHT);
        l.setInherited(false);
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
        l.setDefault("auto");
        addPropertyMaker("height", l);

        // inline-progression-dimension
        m = new LengthRangeProperty.Maker(PR_INLINE_PROGRESSION_DIMENSION);
        m.setInherited(false);
        m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);

        l = new LengthProperty.Maker(CP_MINIMUM);
        l.setDefault("auto");
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
        l.setByShorthand(true);
        m.addSubpropMaker(l);

        l = new LengthProperty.Maker(CP_OPTIMUM);
        l.setDefault("auto");
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
        l.setByShorthand(true);
        m.addSubpropMaker(l);

        l = new LengthProperty.Maker(CP_MAXIMUM);
        l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        l.setDefault("auto");
        l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
        l.setByShorthand(true);
        m.addSubpropMaker(l);

        pdim = new DimensionPropertyMaker(m);
        pdim.setRelative(true);
        pdim.setCorresponding(PR_WIDTH, PR_WIDTH, PR_HEIGHT);
        pdim.setExtraCorresponding(new int[][] {
            {PR_MIN_WIDTH, PR_MIN_WIDTH, PR_MIN_HEIGHT, },
            {PR_MAX_WIDTH, PR_MAX_WIDTH, PR_MAX_HEIGHT, }
        });
        m.setCorresponding(pdim);
        addPropertyMaker("inline-progression-dimension", m);

        // max-height
        m  = new ToBeImplementedProperty.Maker(PR_MAX_HEIGHT);
        m.setInherited(false);
        m.setDefault("0pt");
        addPropertyMaker("max-height", m);

        // max-width
        m  = new ToBeImplementedProperty.Maker(PR_MAX_WIDTH);
        m.setInherited(false);
        m.setDefault("none");
        addPropertyMaker("max-width", m);

        // min-height
        m  = new ToBeImplementedProperty.Maker(PR_MIN_HEIGHT);
        m.setInherited(false);
        m.setDefault("0pt");
        addPropertyMaker("min-height", m);

        // min-width
        m  = new ToBeImplementedProperty.Maker(PR_MIN_WIDTH);
        m.setInherited(false);
        m.setDefault("");
        addPropertyMaker("min-width", m);

        // scaling
        m  = new EnumProperty.Maker(PR_SCALING);
        m.setInherited(true);
        m.addEnum("uniform", getEnumProperty(EN_UNIFORM, "UNIFORM"));
        m.addEnum("non-uniform", getEnumProperty(EN_NON_UNIFORM, "NON_UNIFORM"));
        m.setDefault("uniform");
        addPropertyMaker("scaling", m);

        // scaling-method
        m  = new EnumProperty.Maker(PR_SCALING_METHOD);
        m.setInherited(false);
        m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        m.addEnum("integer-pixels", getEnumProperty(EN_INTEGER_PIXELS, "INTEGER_PIXELS"));
        m.addEnum("resample-any-method", getEnumProperty(EN_RESAMPLE_ANY_METHOD, "RESAMPLE_ANY_METHOD"));
        m.setDefault("auto");
        addPropertyMaker("scaling-method", m);

        // width
        l  = new LengthProperty.Maker(PR_WIDTH);
        l.setInherited(false);
View Full Code Here

        l.setDefault("0pt");
        addPropertyMaker("fox:block-progression-unit", l);
    }

    private void createBlockAndLineProperties() {
        PropertyMaker m;

        // hyphenation-keep
        m  = new EnumProperty.Maker(PR_HYPHENATION_KEEP);
        m.setInherited(true);
        m.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
        m.addEnum("column", getEnumProperty(EN_COLUMN, "COLUMN"));
        m.addEnum("page", getEnumProperty(EN_PAGE, "PAGE"));
        m.setDefault("auto");
        addPropertyMaker("hyphenation-keep", m);

        // hyphenation-ladder-count
        m  = new NumberProperty.Maker(PR_HYPHENATION_LADDER_COUNT);
        m.setInherited(true);
        m.addEnum("no-limit", getEnumProperty(EN_NO_LIMIT, "NO_LIMIT"));
        m.setDefault("no-limit");
        addPropertyMaker("hyphenation-ladder-count", m);

        // last-line-end-indent
        m  = new LengthProperty.Maker(PR_LAST_LINE_END_INDENT);
        m.setInherited(true);
        m.setDefault("0pt");
        m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
        addPropertyMaker("last-line-end-indent", m);

        // line-height
        m  = new LineHeightPropertyMaker(PR_LINE_HEIGHT);
        m.useGeneric(genericSpace);
        m.setInherited(true);
        m.addKeyword("normal", "1.2");
        m.setPercentBase(LengthBase.FONTSIZE);
        m.setDefault("normal", true);
        m.addShorthand(s_generics[PR_FONT]);
        addPropertyMaker("line-height", m);

        // line-height-shift-adjustment
        m  = new EnumProperty.Maker(PR_LINE_HEIGHT_SHIFT_ADJUSTMENT);
        m.setInherited(true);
        m.addEnum("consider-shifts", getEnumProperty(EN_CONSIDER_SHIFTS, "CONSIDER_SHIFTS"));
        m.addEnum("disregard-shifts", getEnumProperty(EN_DISREGARD_SHIFTS, "DISREGARD_SHIFTS"));
        m.setDefault("consider-shifts");
        addPropertyMaker("line-height-shift-adjustment", m);

        // line-stacking-strategy
        m  = new EnumProperty.Maker(PR_LINE_STACKING_STRATEGY);
        m.setInherited(true);
        m.addEnum("line-height", getEnumProperty(EN_LINE_HEIGHT, "LINE_HEIGHT"));
        m.addEnum("font-height", getEnumProperty(EN_FONT_HEIGHT, "FONT_HEIGHT"));
        m.addEnum("max-height", getEnumProperty(EN_MAX_HEIGHT, "MAX_HEIGHT"));
        m.setDefault("max-height");
        addPropertyMaker("line-stacking-strategy", m);

        // linefeed-treatment
        m  = new EnumProperty.Maker(PR_LINEFEED_TREATMENT);
        m.setInherited(true);
        m.addEnum("ignore", getEnumProperty(EN_IGNORE, "IGNORE"));
        m.addEnum("preserve", getEnumProperty(EN_PRESERVE, "PRESERVE"));
        m.addEnum("treat-as-space", getEnumProperty(EN_TREAT_AS_SPACE, "TREAT_AS_SPACE"));
        m.addEnum("treat-as-zero-width-space", getEnumProperty(EN_TREAT_AS_ZERO_WIDTH_SPACE, "TREAT_AS_ZERO_WIDTH_SPACE"));
        m.setDefault("treat-as-space");
        m.addShorthand(s_generics[PR_WHITE_SPACE]);
        addPropertyMaker("linefeed-treatment", m);

        // white-space-treatment
        m  = new EnumProperty.Maker(PR_WHITE_SPACE_TREATMENT);
        m.setInherited(true);
        m.addEnum("ignore", getEnumProperty(EN_IGNORE, "IGNORE"));
        m.addEnum("preserve", getEnumProperty(EN_PRESERVE, "PRESERVE"));
        m.addEnum("ignore-if-before-linefeed", getEnumProperty(EN_IGNORE_IF_BEFORE_LINEFEED, "IGNORE_IF_BEFORE_LINEFEED"));
        m.addEnum("ignore-if-after-linefeed", getEnumProperty(EN_IGNORE_IF_AFTER_LINEFEED, "IGNORE_IF_AFTER_LINEFEED"));
        m.addEnum("ignore-if-surrounding-linefeed", getEnumProperty(EN_IGNORE_IF_SURROUNDING_LINEFEED, "IGNORE_IF_SURROUNDING_LINEFEED"));
        m.setDefault("ignore-if-surrounding-linefeed");
        m.addShorthand(s_generics[PR_WHITE_SPACE]);
        addPropertyMaker("white-space-treatment", m);

        // text-align TODO: make it a StringProperty with enums.
        m  = new EnumProperty.Maker(PR_TEXT_ALIGN);
        m.setInherited(true);
        // Note: both 'end', 'right' and 'outside' are mapped to END
        //       both 'start', 'left' and 'inside' are mapped to START
        m.addEnum("center", getEnumProperty(EN_CENTER, "CENTER"));
        m.addEnum("end", getEnumProperty(EN_END, "END"));
        m.addEnum("right", getEnumProperty(EN_END, "END"));
        m.addEnum("start", getEnumProperty(EN_START, "START"));
        m.addEnum("left", getEnumProperty(EN_START, "START"));
        m.addEnum("justify", getEnumProperty(EN_JUSTIFY, "JUSTIFY"));
        m.addEnum("inside", getEnumProperty(EN_START, "START"));
        m.addEnum("outside", getEnumProperty(EN_END, "END"));
        m.setDefault("start");
        addPropertyMaker("text-align", m);

        // text-align-last
        m  = new EnumProperty.Maker(PR_TEXT_ALIGN_LAST) {
            public Property get(int subpropId, PropertyList propertyList,
                    boolean bTryInherit, boolean bTryDefault) throws PropertyException {
                Property p = super.get(subpropId, propertyList, bTryInherit, bTryDefault);
                if (p != null && p.getEnum() == EN_RELATIVE) {
                    //The default may have been returned, so check inherited value
                    p = propertyList.getNearestSpecified(PR_TEXT_ALIGN_LAST);
                    if (p.getEnum() == EN_RELATIVE) {
                        return calcRelative(propertyList);
                    }
                }
                return p;
            }

            private Property calcRelative(PropertyList propertyList) throws PropertyException {
                Property corresponding = propertyList.get(PR_TEXT_ALIGN);
                if (corresponding == null) {
                    return null;
                }
                int correspondingValue = corresponding.getEnum();
                if (correspondingValue == EN_JUSTIFY) {
                    return getEnumProperty(EN_START, "START");
                } else if (correspondingValue == EN_END) {
                    return getEnumProperty(EN_END, "END");
                } else if (correspondingValue == EN_START) {
                    return getEnumProperty(EN_START, "START");
                } else if (correspondingValue == EN_CENTER) {
                    return getEnumProperty(EN_CENTER, "CENTER");
                } else {
                    return null;
                }
            }
        };
        m.setInherited(false); //Actually it's "true" but the special PropertyMaker compensates
        // Note: both 'end', 'right' and 'outside' are mapped to END
        //       both 'start', 'left' and 'inside' are mapped to START
        m.addEnum("relative", getEnumProperty(EN_RELATIVE, "RELATIVE"));
        m.addEnum("center", getEnumProperty(EN_CENTER, "CENTER"));
        m.addEnum("end", getEnumProperty(EN_END, "END"));
        m.addEnum("right", getEnumProperty(EN_END, "END"));
        m.addEnum("start", getEnumProperty(EN_START, "START"));
        m.addEnum("left", getEnumProperty(EN_START, "START"));
        m.addEnum("justify", getEnumProperty(EN_JUSTIFY, "JUSTIFY"));
        m.addEnum("inside", getEnumProperty(EN_START, "START"));
        m.addEnum("outside", getEnumProperty(EN_END, "END"));
        m.setDefault("relative", true);
        addPropertyMaker("text-align-last", m);

        // text-indent
        m  = new LengthProperty.Maker(PR_TEXT_INDENT);
        m.setInherited(true);
        m.setDefault("0pt");
        m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
        addPropertyMaker("text-indent", m);

        // white-space-collapse
        m  = new EnumProperty.Maker(PR_WHITE_SPACE_COLLAPSE);
        m.useGeneric(genericBoolean);
        m.setInherited(true);
        m.setDefault("true");
        m.addShorthand(s_generics[PR_WHITE_SPACE]);
        addPropertyMaker("white-space-collapse", m);

        // wrap-option
        m  = new EnumProperty.Maker(PR_WRAP_OPTION);
        m.setInherited(true);
        m.addEnum("wrap", getEnumProperty(EN_WRAP, "WRAP"));
        m.addEnum("no-wrap", getEnumProperty(EN_NO_WRAP, "NO_WRAP"));
        m.setDefault("wrap");
        m.addShorthand(s_generics[PR_WHITE_SPACE]);
        addPropertyMaker("wrap-option", m);
    }
View Full Code Here

     * @throws PropertyException ...
     */
    public Property get(int propId, boolean bTryInherit,
                         boolean bTryDefault) throws PropertyException {

        PropertyMaker propertyMaker = findMaker(propId & Constants.PROPERTY_MASK);
        if (propertyMaker != null) {
            return propertyMaker.get(propId & Constants.COMPOUND_MASK, this,
                                         bTryInherit, bTryDefault);
        }
        return null;
    }
View Full Code Here

            String subPropertyName = findSubPropertyName(attributeName);

            int propId = FOPropertyMapping.getPropertyId(basePropertyName);
            int subpropId = FOPropertyMapping.getSubPropertyId(subPropertyName);
   
            PropertyMaker propertyMaker = findMaker(propId);
            if (propertyMaker == null) {
                log.warn("No PropertyMaker registered for " + attributeName
                        + ". Ignoring property.");
                return;
            }

            try {
                Property prop = null;
                if (subPropertyName == null) { // base attribute only found
                    /* Do nothing if the base property has already been created.
                     * This is e.g. the case when a compound attribute was
                     * specified before the base attribute; in these cases
                     * the base attribute was already created in
                     * findBaseProperty()
                     */
                    if (getExplicit(propId) != null) {
                        return;
                    }
                    prop = propertyMaker.make(this, attributeValue, parentFO);
                } else { // e.g. "leader-length.maximum"
                    Property baseProperty =
                        findBaseProperty(attributes, parentFO, propId,
                                basePropertyName, propertyMaker);
                    prop = propertyMaker.make(baseProperty, subpropId,
                            this, attributeValue, parentFO);
                }
                if (prop != null) {
                    putExplicit(propId, prop);
                }
View Full Code Here

     * @param propId ID of property
     * @return new Property object
     * @throws PropertyException if there's a problem while processing the property
     */
    private Property getShorthand(int propId) throws PropertyException {
        PropertyMaker propertyMaker = findMaker(propId);
       
        if (propertyMaker != null) {
            return propertyMaker.getShorthand(this);
        } else {
            //log.error("no Maker for " + propertyName);
            return null;
        }
    }
View Full Code Here

     * @param propID ID of property
     * @return new Property object
     * @throws PropertyException if there's a problem while processing the property
     */
    private Property makeProperty(int propId) throws PropertyException {
        PropertyMaker propertyMaker = findMaker(propId);
        if (propertyMaker != null) {
            return propertyMaker.make(this);
        } else {
            //log.error("property " + propertyName
            //                       + " ignored");
        }
        return null;
View Full Code Here

     * @return isInherited value from the requested Property.Maker
     */
    private boolean isInherited(int propId) {
        if (inheritableProperty == null) {
            inheritableProperty = new boolean[Constants.PROPERTY_COUNT + 1];
            PropertyMaker maker = null;
            for (int prop = 1; prop <= Constants.PROPERTY_COUNT; prop++) {
                maker = findMaker(prop);
                inheritableProperty[prop] = (maker != null && maker.isInherited());
            }   
        }

        return inheritableProperty[propId];
    }   
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.properties.PropertyMaker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.