Package org.foray.fotree

Examples of org.foray.fotree.FObj


        final FoContext context = null;
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case INHERIT: {
                final FObj parent = fobj.getParent();
                if (parent == null) {
                    return getValueNoInstance();
                }
                return parent.traitExtent();
            }
            }
        }
        if (value().canEvalPercentage()) {
            final int base = computeBase(context, fobj);
View Full Code Here


    public Graphic getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case INHERIT: {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    return parent.traitBackgroundImage(context);
                }
            }
            case NONE: {
                return null;
            }
View Full Code Here

     */
    public FoValue getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            if (keyword == FoValue.INHERIT) {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    return getInheritedValue(context, parent);
                }
                return getValueNoInstance();
            }
View Full Code Here

            final FObjScaled fobjScaled) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case INHERIT: {
                final FObj parent = fobj.effectiveParent(context);
                if (parent == null) {
                    return getValueNoInstance();
                }
                return getInheritedValue(context, fobjScaled, parent);
            }
View Full Code Here

                    (AbstractContentDimension) fobj.ancestorProperty(
                            this.getPropertyType());
                if (inheritedProperty == null) {
                    return false;
                }
                final FObj parent = fobj.effectiveParent(context);
                if (parent == null) {
                    return false;
                }
                return inheritedProperty.dependsOnPd(parent, context);
            }
View Full Code Here

     *
     * @return The text that should appear in the refined FO tree.
     */
    public CharVector getRefinedText(final FoContext context) {
        /* TODO: This needs to come from effectiveParent, with context. */
        final FObj effectiveParent = this.getParent();
        if (this.filterStatus >= CharacterSequence4a.FILTER_REFINED_FO_TREE) {
            /* The stored text has already been filtered. Just return it. */
            return this.ca;
        }

        final CharVector charArray = getPreTextTransformText(context);
        // Now handle text-transform.
        final TextTransform textTransform = effectiveParent.traitTextTransform(
                context);
        if (textTransform != TextTransform.NONE) {
            for (int i = 0; i < charArray.length(); i++) {
                charArray.set(i, applyTextTransform(context, charArray, i,
                        textTransform));
View Full Code Here

     *
     * @return The text that should appear in the refined FO tree, except that
     * text-transform is not applied.
     */
    private CharVector getPreTextTransformText(final FoContext context) {
        final FObj effectiveParent = this.effectiveParent(context);
        if (this.filterStatus >= CharacterSequence4a.FILTER_PRE_TRANSFORM) {
            /* The stored text has already been filtered. Just return it. */
            return this.ca;
        }

        /* Must handle white-space-treatment first. */
        CharVector workArray = applyWhiteSpaceTreatment(this.ca,
                effectiveParent.traitWhiteSpaceTreatment(context));

        // Now handle linefeed-treatment.
        workArray = applyLinefeedTreatment(workArray,
                effectiveParent.traitLinefeedTreatment(context));

        /* Update this instance's text with the filtered value and update the
         * status. */
        this.ca = workArray;
        this.filterStatus = CharacterSequence4a.FILTER_PRE_TRANSFORM;
View Full Code Here

     * @param context An object that knows how to resolve FO Tree context
     * issues.
     * @return The text that should appear in the area tree.
     */
    public CharSequence getAreaTreeText(final FoContext context) {
        final FObj effectiveParent = this.getParent();
        if (this.filterStatus >= CharacterSequence4a.FILTER_AREA_TREE) {
            /* The stored text has already been filtered. Just return it. */
            return this.ca;
        }

        // Start with the refined FO Tree text
        CharVector returnArray = getRefinedText(context);
        // Apply white-space-collapse.
        final boolean whiteSpaceCollapse =
                effectiveParent.traitWhiteSpaceCollapse(context);
        returnArray = applyWhiteSpaceCollapse(returnArray, whiteSpaceCollapse);

        /* Set the instance text to the more refined value and update the
         * status. */
        this.ca = returnArray;
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public FontUse inlineSecondaryFont(final FoContext context, final char c) {
        final FObj effectiveParent = effectiveParent(context);
        return effectiveParent.getSecondaryFont(context, c);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public int inlineFontSize(final FoContext context) {
        final FObj effectiveParent = effectiveParent(context);
        return effectiveParent.traitFontSize(context);
    }
View Full Code Here

TOP

Related Classes of org.foray.fotree.FObj

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.