Examples of IterationAction


Examples of com.volantis.shared.iteration.IterationAction

     * @param pseudoStyleEntityIteratee the object called for each pseudo style
     *                                  entity in the path.
     */
    public void iterate(PseudoStyleEntityIteratee pseudoStyleEntityIteratee) {

        IterationAction action = IterationAction.CONTINUE;

        for (int i = 0; action == IterationAction.CONTINUE
                && i < pseudoElements.length; i++) {
            PseudoStyleEntity pse = pseudoElements[i];
            action = pseudoStyleEntityIteratee.next(pse);
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

        return subset;
    }
   
    public IterationAction next(final MutableStyleProperties properties) {

        IterationAction action = IterationAction.CONTINUE;
        this.properties = properties;
        if (properties != null) {
            if (subset == null) {
                // this is the first properties encountered.
                // so initialise the subset by optimistically moving all of
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

        if (iteratee == null) {
            throw new IllegalArgumentException("iteratee may not be null");
        }

        IterationAction action = IterationAction.CONTINUE;
        Iterator elements = elementList.iterator();
        while (action == IterationAction.CONTINUE && elements.hasNext()) {
            OutputStyledElement ose = (OutputStyledElement) elements.next();
            action = iteratee.next(ose);
        }
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

    public IterationAction next(OutputStyledElement element) {

        // Only the type selector affects matching, the pseudo classes and
        // pseudo elements select the set of properties to compare.

        IterationAction action = IterationAction.CONTINUE;

        // If the type selector matches ...
        String type = selectorSequence.getType();
        if (type == null || type.equals(element.getName())) {
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

    // Javadoc inherited.
    public IterationAction iterate(StylerIteratee iteratee) {
        for (Iterator iterator = list.iterator(); iterator.hasNext();) {
            Styler styler = (Styler) iterator.next();
            IterationAction action = iteratee.next(styler);
            if (action == IterationAction.BREAK) {
                return action;
            }
        }
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

    // Javadoc inherited.
    public IterationAction iterateIndexed(StylerIteratee iteratee, BitSet indexRef) {
        for (Iterator iterator = indexedList(indexRef).iterator();
             iterator.hasNext();) {
            Styler styler = (Styler) iterator.next();
            IterationAction action = iteratee.next(styler);
            if (action == IterationAction.BREAK) {
                return action;
            }
        }
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

    }

    public IterationAction next(final MutableStyleProperties properties) {

        this.properties = properties;
        IterationAction action = commonProperties.iteratePropertyValues(this);
        if (action == IterationAction.CONTINUE) {
            action = commonProperties.iterateShorthandValues(this);
        }
        return action;
    }
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

            node.accept(this);
        }

        // Check the state to see whether it will prevent the iteration from
        // continuing.
        IterationAction action;
        if (state == RecursionState.CONTINUE) {
            // Keep iterating.
            action = IterationAction.CONTINUE;
        } else if (state == RecursionState.SKIPPING_SIBLINGS) {
            // Break out of this iteration but continue afterwards.
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

    public void forEachChild(NodeIteratee nodeIteratee) {
        NodeImpl nextNode;
        for (NodeImpl node = head; node != null; node = nextNode) {
            nextNode = node.next;
            if (node != null) {
                IterationAction action = nodeIteratee.next(node);
                if (action == IterationAction.BREAK) {
                    break;
                } else if (action != IterationAction.CONTINUE) {
                    throw new IllegalStateException(
                            "Unknown iteration action: " + action);
View Full Code Here

Examples of com.volantis.shared.iteration.IterationAction

            Node node = first;
            while (node != end) {
                // Get the next node before calling the iteratee just in case
                // it does anything to the current node, i.e. removes it.
                Node next = node.getNext();
                IterationAction action = nodeIteratee.next(node);
                if (action == IterationAction.BREAK) {
                    break;
                } else if (action != IterationAction.CONTINUE) {
                    throw new IllegalStateException(
                            "Unknown iteration action: " + action);
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.