Package com.volantis.styling

Examples of com.volantis.styling.PseudoStyleEntityVisitor


        implements MethodAction {

    // Javadoc inherited.
    public Object perform(MethodActionEvent event) throws Throwable {

        PseudoStyleEntityVisitor visitor = (PseudoStyleEntityVisitor)
                event.getArgument(PseudoStyleEntityVisitor.class);

        accept(visitor);

        return null;
View Full Code Here


     * @param pseudoPath the sequence of pseudo style entities that we should
     *      add selectors for.
     */
    public void addPseudoSelectors(PseudoStylePath pseudoPath) {

        pseudoPath.accept(new PseudoStyleEntityVisitor() {
            public void visit(StatefulPseudoClassSet pseudoClassSet) {
                addPseudoClassSelector(pseudoClassSet);
            }

            public void visit(PseudoElement pseudoElement) {
View Full Code Here

                        combined.setType(type);
                    }
                    // Iterate over all the entities qualifying the properties,
                    // adding them separately and to a combined sequence as
                    // necessary.
                    pseudoPath.accept(new PseudoStyleEntityVisitor() {
                        public void visit(StatefulPseudoClassSet pseudoClassSet) {
                            // If we haven't seen this pseudo class yet...
                            if (!pseudoClassSets.contains(pseudoClassSet)) {
                                pseudoClassSets.add(pseudoClassSet);
                                // ... then create sequence for it and add to list.
                                TypeSelectorSequence sequence =
                                        new TypeSelectorSequence();
                                sequence.addPseudoClassSet(pseudoClassSet);
                                selectorList.add(sequence);
                            }
                            // Add pseudo class selector to combined selector.
                            combined.addPseudoClassSet(pseudoClassSet);
                        }

                        public void visit(PseudoElement pseudoElement) {
                            // If we haven't seen this pseudo element yet...
                            if (!pseudoElementSet.contains(pseudoElement)) {
                                pseudoElementSet.add(pseudoElement);
                                // ... then create sequence for it and add to list.
                                TypeSelectorSequence sequence =
                                        new TypeSelectorSequence();
                                sequence.addPseudoElement(pseudoElement);
                                selectorList.add(sequence);
                            }
                            // Add pseudo class to combined selector.
                            combined.addPseudoElement(pseudoElement);
                        }
                    });

                    // If the combined sequence isn't simple and we haven't seen
                    // this combined sequence yet...
                    if (combined.isComposite() &&
                            !combinedSet.contains(combined)) {
                        combinedSet.add(combined);
                        // Then add it to the list.
                        final TypeSelectorSequence sequence =
                                new TypeSelectorSequence();
                        if (combined.getType() != null) {
                            sequence.setType(combined.getType());
                        }
                        pseudoPath.accept(new PseudoStyleEntityVisitor() {
                            public void visit(StatefulPseudoClassSet pseudoClassSet) {
                                sequence.addPseudoClassSet(pseudoClassSet);
                            }

                            public void visit(PseudoElement pseudoElement) {
View Full Code Here

TOP

Related Classes of com.volantis.styling.PseudoStyleEntityVisitor

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.