Examples of PercentBase


Examples of org.apache.fop.datatypes.PercentBase

         * {@inheritDoc}
         * Returns a {@link org.apache.fop.datatypes.PercentBase} whose
         * <code>getDimension()</code> returns 1.
         */
        public PercentBase getPercentBase(PropertyList pl) {
            return new PercentBase() {
                /** {@inheritDoc} */
                public int getBaseLength(PercentBaseContext context) throws PropertyException {
                    return 0;
                }

View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

            double opval = op.absValue;
            return new Numeric(valType, opval * absValue, opval * pcValue,
                               opval * tcolValue, dim, pcBase);
        } else if (valType == op.valType &&!isMixedType()) {
            // Check same relbase and pcbase ???
            PercentBase npcBase = ((valType & PC_LENGTH) != 0) ? pcBase
                                  : op.pcBase;
            return new Numeric(valType, absValue * op.absValue,
                               pcValue * op.pcValue,
                               tcolValue * op.tcolValue, dim + op.dim,
                               npcBase);
View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

        } else if (op.dim == 0) {
            double opval = op.absValue;
            return new Numeric(valType, absValue / opval, pcValue / opval,
                               tcolValue / opval, dim, pcBase);
        } else if (valType == op.valType &&!isMixedType()) {
            PercentBase npcBase = ((valType & PC_LENGTH) != 0) ? pcBase
                                  : op.pcBase;
            return new Numeric(valType,
                               (valType == ABS_LENGTH ? absValue / op.absValue : 0.0),
                               (valType == PC_LENGTH ? pcValue / op.pcValue : 0.0),
                               (valType == TCOL_LENGTH ? tcolValue / op.tcolValue : 0.0),
View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

     * a percent specification.
     * Propagates to the Maker.
     * @return The PercentBase object or null if percentLengthOK()=false.
     */
    public PercentBase getPercentBase() throws PropertyException {
        PercentBase pcbase = getFunctionPercentBase();
        return (pcbase != null) ? pcbase : maker.getPercentBase(fo, plist);
    }
View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

             * Get the length base value object from the Maker. If null, then
             * this property can't have % values. Treat it as a real number.
             */
            double pcval = new Double(currentTokenValue.substring(0,
                        currentTokenValue.length() - 1)).doubleValue() / 100.0;
            PercentBase pcBase = this.propInfo.getPercentBase();
            if (pcBase != null) {
                if (pcBase.getDimension() == 0) {
                    prop = new NumberProperty(pcval * pcBase.getBaseValue());
                } else if (pcBase.getDimension() == 1) {
                    prop = new PercentLength(pcval, pcBase);
                } else {
                    throw new PropertyException("Illegal percent dimension value");
                }
            } else {
View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

        // Check of same dimension
        // Add together absolute and table units
        // What about percentages??? Treat as colUnits if they can't be
        // in same property!
        if (dim == op.dim) {
            PercentBase npcBase = ((valType & PC_LENGTH) != 0) ? pcBase
                                  : op.pcBase;
            // Subtract each type of value
            return new Numeric(valType | op.valType, absValue - op.absValue,
                               pcValue - op.pcValue,
                               tcolValue - op.tcolValue, dim, npcBase);
View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

        // Check of same dimension
        // Add together absolute and table units
        // What about percentages??? Treat as colUnits if they can't be
        // in same property!
        if (dim == op.dim) {
            PercentBase npcBase = ((valType & PC_LENGTH) != 0) ? pcBase
                                  : op.pcBase;
            // Add each type of value
            return new Numeric(valType | op.valType, absValue + op.absValue,
                               pcValue + op.pcValue,
                               tcolValue + op.tcolValue, dim, npcBase);
View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

             * Get the length base value object from the Maker. If null, then
             * this property can't have % values. Treat it as a real number.
             */
            double pcval = new Double(currentTokenValue.substring(0,
                        currentTokenValue.length() - 1)).doubleValue() / 100.0;
            PercentBase pcBase = this.propInfo.getPercentBase();
            if (pcBase != null) {
                if (pcBase.getDimension() == 0) {
                    prop = new NumberProperty(pcval * pcBase.getBaseValue());
                } else if (pcBase.getDimension() == 1) {
                    prop = new PercentLength(pcval, pcBase);
                } else {
                    throw new PropertyException("Illegal percent dimension value");
                }
            } else {
View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

             * Get the length base value object from the Maker. If null, then
             * this property can't have % values. Treat it as a real number.
             */
            double pcval = new Double(currentTokenValue.substring(0,
                        currentTokenValue.length() - 1)).doubleValue() / 100.0;
            PercentBase pcBase = this.propInfo.getPercentBase();
            if (pcBase != null) {
                if (pcBase.getDimension() == 0) {
                    prop = new NumberProperty(pcval * pcBase.getBaseValue());
                } else if (pcBase.getDimension() == 1) {
                    prop = new PercentLength(pcval, pcBase);
                } else {
                    throw new PropertyException("Illegal percent dimension value");
                }
            } else {
View Full Code Here

Examples of org.apache.fop.datatypes.PercentBase

     * a percent specification.
     * Propagates to the Maker.
     * @return The PercentBase object or null if percentLengthOK()=false.
     */
    public PercentBase getPercentBase() throws PropertyException {
        PercentBase pcbase = getFunctionPercentBase();
        return (pcbase != null) ? pcbase : maker.getPercentBase(fo, plist);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.