Package org.foray.common

Examples of org.foray.common.OrderedTreeNode


         * absorb a relatively larger share of the change in word-space.
         */
        int totalDenominator = 0;
        final Iterator<OrderedTreeNode> iterator = this.postOrderDescendantIterator();
        while (iterator.hasNext()) {
            final OrderedTreeNode descendant = iterator.next();
            if (descendant instanceof TextArea) {
                final TextArea text = (TextArea) descendant;
                final int denominator = text.countSpaces()
                        * text.traitFontSize();
                totalDenominator += denominator;
            }
        }
        if (totalDenominator == 0) {
            return;
        }
        final Iterator<OrderedTreeNode> iterator2 = this.postOrderDescendantIterator();
        while (iterator2.hasNext()) {
            final OrderedTreeNode descendant = iterator2.next();
            if (descendant instanceof TextArea) {
                final TextArea text = (TextArea) descendant;
                final int numSpaces = text.countSpaces();
                if (numSpaces == 0) {
                    continue;
View Full Code Here


                && ! (nextSibling instanceof LineArea)) {
            return true;
        }

        /* "... any lines in the block ending in U+000A." */
        final OrderedTreeNode lastLeaf = this.getLastLeaf();
        if (lastLeaf instanceof TextArea) {
            final TextArea textArea = (TextArea) lastLeaf;
            if (textArea.endsWithLinefeed()) {
                return true;
            }
View Full Code Here

     * Indicates whether this area is the first leaf area on the ancestor line.
     * @return True iff this area is the first leaf area on the ancestory line.
     */
    public boolean isFirstLeafOnLine() {
        final LineArea ancestorLine = this.ancestorLineArea();
        final OrderedTreeNode firstLeaf = ancestorLine.getFirstLeaf();
        return this == firstLeaf;
    }
View Full Code Here

     * Indicates whether this area is the first leaf area on the ancestor line.
     * @return True iff this area is the first leaf area on the ancestory line.
     */
    public boolean isLastLeafOnLine() {
        final LineArea ancestorLine = this.ancestorLineArea();
        final OrderedTreeNode lastLeaf = ancestorLine.getLastLeaf();
        return this == lastLeaf;
    }
View Full Code Here

TOP

Related Classes of org.foray.common.OrderedTreeNode

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.