Examples of OrderedTreeNode


Examples of org.foray.common.OrderedTreeNode

    protected String getText(final AreaNode node) {
        final StringBuilder builder = new StringBuilder();
        final Iterator<OrderedTreeNode> iterator =
                node.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode otn = iterator.next();
            if (otn instanceof TextArea) {
                final TextArea textArea = (TextArea) otn;
                final CharSequence text = textArea.getRawText();
                builder.append(text);
            }
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

    /**
     * {@inheritDoc}
     */
    public void addChild(final FObj child) throws FoTreeException {
        final OrderedTreeNode lastChild = this.getLastChild();
        if (child instanceof LayoutMasterSet) {
            if (lastChild != null) {
                child.throwExceptionInvalidLocation();
            }
        } else if (child instanceof Declarations) {
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

            this.nextPageSequence = null;
            while (this.nextPageSequence == null) {
                if (! this.descendantIterator.hasNext()) {
                    return;
                }
                final OrderedTreeNode node = this.descendantIterator.next();
                if (node instanceof PageSequence) {
                    this.nextPageSequence = (PageSequence) node;
                }
            }
        }
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

        this.optimized = true;
        /* Resolve the page-number-citations. */
        final Iterator<OrderedTreeNode> iterator =
                this.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode o = iterator.next();
            if (o instanceof PageNumberCitationArea) {
                final PageNumberCitationArea pia = (PageNumberCitationArea) o;
                pia.getText();
            }
        }
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

            return;
        }
        final Iterator<OrderedTreeNode> iterator =
                this.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode object = iterator.next();
            if (object instanceof LeaderArea) {
                final LeaderArea leader = (LeaderArea) object;
                boolean prorating = false;
                if (Math.abs(leaderSpaceAvailable) >= Math.abs(unusedSpace)) {
                    prorating = true;
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

        // First, compute how much capacity the leaders have.
        int leaderSpaceAvailable = 0;
        final Iterator<OrderedTreeNode> iterator =
                this.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode object = iterator.next();
            if (object instanceof LeaderArea) {
                final LeaderArea leader = (LeaderArea) object;
                if (unusedSpace > 0) {
                    leaderSpaceAvailable += leader.traitLeaderLengthMax()
                            - leader.getProgressionDimension();
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

        if (wordSpacingCapacity == 0) {
            return;
        }
        final Iterator<OrderedTreeNode> iterator = this.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode descendant = iterator.next();
            if (descendant instanceof TextArea) {
                final TextArea text = (TextArea) descendant;
                boolean prorating = false;
                if (Math.abs(wordSpacingCapacity) >= Math.abs(unusedSpace)) {
                    prorating = true;
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

     */
    private int computeWordSpacingCapacity(final int unusedSpace) {
        int wordSpacingCapacity = 0;
        final Iterator<OrderedTreeNode> iterator = this.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode descendant = iterator.next();
            if (descendant instanceof TextArea) {
                final TextArea text = (TextArea) descendant;
                if (unusedSpace > 0) {
                    wordSpacingCapacity += text.maxWordSpacingCapacity()
                            - text.wordSpacingUsed();
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

        if (letterSpacingCapacity == 0) {
            return;
        }
        final Iterator<OrderedTreeNode> iterator = this.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode descendant = iterator.next();
            if (descendant instanceof TextArea) {
                final TextArea text = (TextArea) descendant;
                boolean prorating = false;
                if (Math.abs(letterSpacingCapacity) >= Math.abs(unusedSpace)) {
                    prorating = true;
View Full Code Here

Examples of org.foray.common.OrderedTreeNode

     */
    private int computeLetterSpacingCapacity(final int unusedSpace) {
        int letterSpacingCapacity = 0;
        final Iterator<OrderedTreeNode> iterator = this.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode descendant = iterator.next();
            if (descendant instanceof TextArea) {
                final TextArea text = (TextArea) descendant;
                if (unusedSpace > 0) {
                    letterSpacingCapacity += text.maxLetterSpacingCapacity()
                            - text.letterSpacingUsed();
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.