Package org.axsl.area

Examples of org.axsl.area.LineContentFactory


                final BlockContentFactory blockContentFactory =
                        areaNode.ancestorBlockContentFactory();
                status = layoutProxy.layout(blockContentFactory, graftingPoint);
            } else {
                if (inlineArea == null) {
                    final LineContentFactory lineContentFactory = getLineContentFactory(areaNode);
                    if (lineContentFactory == null) {
                        /* Not enough room on the page for this. */
                        return Status.AREA_FULL_NONE;
                    }
                    inlineArea = makeNormalInlineArea(lineContentFactory, graftingPoint);
View Full Code Here


     * if there is no room on the page for a line to contain it.
     * @throws AreaTreeException If {@code areaNode} cannot contain line content.
     */
    private LineContentFactory getLineContentFactory(final AreaNode areaNode)
            throws AreaTreeException {
        LineContentFactory factory = null;
        if (areaNode instanceof NormalBlockArea) {
            final LineArea lineArea = activeLineArea(areaNode.nearestArea());
            if (lineArea == null) {
                return null;
            } else {
View Full Code Here

        if (textToUse instanceof org.axsl.fo.FoLineText) {
            final FoLineText foLineText = (FoLineText) textToUse;
            graftingPoint = foLineText.getGraftingPoint();
            textToUse = foLineText.getWrapped();
        }
        LineContentFactory factory = lineArea;
        if (this.areaStack.size() > 0) {
            factory = this.areaStack.peek();
        }
        if (textToUse instanceof CharacterSequence) {
            final CharacterSequence foText = (CharacterSequence) textToUse;
            factory.makeGlyphAreaSequence(foText, startOffset, sizeInChars,
                    sizeInline,
                    hasDiscretionaryHyphen, hasFauxSmallCaps, isLastItemOnLine,
                    graftingPoint);
        } else {
            throw new TextException("Returned LineText is an unknown type.");
View Full Code Here

            final FoLineNonText foLineNonText = (FoLineNonText) nonTextToUse;
            graftingPoint = foLineNonText.getGraftingPoint();
            nonTextToUse = foLineNonText.getWrapped();
        }

        LineContentFactory factory = lineArea;
        if (this.areaStack.size() > 0) {
            factory = this.areaStack.peek();
        }
        if (nonTextToUse instanceof InstreamForeignObject) {
            final InstreamForeignObject ifo = (InstreamForeignObject)
                    nonTextToUse;
            factory.makeForeignObjectArea(ifo, sizeInline, graftingPoint);
        } else if (nonTextToUse instanceof ExternalGraphic) {
            final ExternalGraphic graphic = (ExternalGraphic) nonTextToUse;
            factory.makeExternalGraphicArea(graphic, sizeInline,
                    graftingPoint);
        } else if (nonTextToUse instanceof Leader) {
            final Leader leader = (Leader) nonTextToUse;
            try {
                factory.makeLeaderArea(leader, sizeInline, graftingPoint);
            } catch (final AreaTreeException e) {
                throw new TextException(e);
            }
        } else if (nonTextToUse instanceof PageNumberCitation) {
            final PageNumberCitation citation = (PageNumberCitation)
                    nonTextToUse;
            factory.makePageNumberCitationArea(citation, sizeInline,
                    graftingPoint);
        } else if (nonTextToUse instanceof PageNumber) {
            final PageNumber pageNumber = (PageNumber) nonTextToUse;
            factory.makePageNumberArea(pageNumber, sizeInline, graftingPoint);
        }
    }
View Full Code Here

TOP

Related Classes of org.axsl.area.LineContentFactory

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.