Package org.axsl.fo

Examples of org.axsl.fo.Fo


     * Returns the hyphenation-character trait for this area.
     * @return The hyphenation-character trait for this area.
     */
    public int traitHyphenationCharacter() {
        /* TODO: Clean this method up after we clean up the construction. */
        final Fo generatedBy = this.traitGeneratedBy();
        if (generatedBy instanceof CharacterSequence) {
            final CharacterSequence character = (CharacterSequence) generatedBy;
            return character.traitHyphenationCharacter(this);
        } else {
            final NormalBlockArea blockArea = this.ancestorNormalBlockArea();
View Full Code Here


     * is one.
     * @return The "generated-by" Character, or null if this area was not
     * generated by an fo:character.
     */
    private CharacterSequence generatedByCharacter() {
        final Fo generatedBy = this.traitGeneratedBy();
        if (generatedBy instanceof CharacterSequence) {
            return (CharacterSequence) generatedBy;
        }
        return null;
    }
View Full Code Here

     * @param id The id whose first normal area is sought.
     * @return The first normal area returned by the FObj instance whose "id"
     * trait matches the "id" parameter, or null if none is found.
     */
    public Area firstNormalAreaReturned(final String id) {
        final Fo fobj = retrieveId(id);
        final FOLinkage linkage = linkage(fobj, null);
        if (linkage instanceof FOLinkageNormal) {
            final FOLinkageNormal normalLinkage = (FOLinkageNormal) linkage;
            return normalLinkage.firstNormalAreaReturned();
        }
View Full Code Here

     * Returns the linkage for a given marker.
     * @param marker The marker for which the linkage is needed.
     * @return The linkage.
     */
    private FOLinkageNormal markerParentLinkage(final Marker marker) {
        final Fo parent = marker.getParent();
        final FOLinkage proxy = linkage(parent, null);
        if (proxy instanceof FOLinkageNormal) {
            return (FOLinkageNormal) proxy;
        }
        /* This would mean nested markers. Should never happen. */
 
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public Status layout(final AreaNode areaNode,
            final GraftingPoint graftingPoint) throws AreaTreeException {
        final Fo foNode = getFONode();
        if (getProgress() == FONodePL.START) {
            setProgress(0);
        }

        Status status = Status.OK;
        AncestralNormalInlineArea inlineArea = null;
        for (int i = getProgress(); i < foNode.getChildCount(); i++) {
            final Fo fo = foNode.getChildAt(i);
            final FONodePL layoutProxy = getLayoutProxy(fo);
            if (fo.isBlockLevelFo()) {
                /* Remove the inline factory so that we know that we need to
                 * create a new one if there is any subsequent inline
                 * content.*/
                inlineArea = null;
                /* Since this is block content, it cannot be laid out in a
View Full Code Here

     */
    private int computePdFromChildren() {
        int labelPd = 0;
        int bodyPd = 0;
        for (AbstractListItemContent child : this.children) {
            final Fo fo = child.traitGeneratedBy().ancestorListRelatedObject(
                    this);
            if (fo == null) {
                throw new IllegalStateException("Child of list-item-area must "
                        + "be generated by objects having list-related "
                        + "ancestors.");
View Full Code Here

        }
        final FootnoteRefArea referenceArea = (FootnoteRefArea) areaNode;

        final int numChildren = this.node.getChildCount();
        for (int i = getProgress(); i < numChildren; i++) {
            final Fo fo = this.node.getChildAt(i);
            final FONodePL foNodePL = getLayoutProxy(fo);
            final Status status = foNodePL.layout(referenceArea,
                    graftingPoint);
            if (status.isIncomplete()) {
                resetProgress();
View Full Code Here

     * Returns the layout manager for a given block area.
     * @param blockArea The block area for which the layout manager is needed.
     * @return The layout manager.
     */
    public BlockPL getBlockPL(final NormalBlockArea blockArea) {
        final Fo block = blockArea.traitGeneratedBy();
        return (BlockPL) this.getLayoutProxy(block);
    }
View Full Code Here

     * For other areas, it is the color of the Fo that generated the nearest
     * ancestor Area which was generated by an Fo with color.
     * @return The color of this Area.
     */
    public Color getColor() {
        final Fo generatedBy = this.traitGeneratedBy();
        if (generatedBy instanceof ColorPa) {
            final ColorPa coloredFo = (ColorPa) generatedBy;
            return coloredFo.traitColor(this);
        }
        return this.getParent().getColor();
View Full Code Here

        if (getProgress() == FONodePL.START) {
            setProgress(0);
        }
        final int numChildren = this.node.getChildCount();
        for (int i = getProgress(); i < numChildren; i++) {
            final Fo fo = this.node.getChildAt(i);

            final Status status = getLayoutProxy(fo).layout(container,
                    graftingPoint);
            if (status.isIncomplete()) {
                setProgress(i);
View Full Code Here

TOP

Related Classes of org.axsl.fo.Fo

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.