Package com.volantis.mcs.dom2theme.impl.generator.rule.builder

Examples of com.volantis.mcs.dom2theme.impl.generator.rule.builder.SimpleSelectorSequenceBuilder


        // translate output selectors to theme selectors
        final List actualSelectorList = new ArrayList();
        actualOutputSelectorList.iterate(new TypeSelectorSequenceIteratee() {
            public void next(TypeSelectorSequence sequence) {
                final SimpleSelectorSequenceBuilder builder =
                        new SimpleSelectorSequenceBuilder(
                                StyleSheetFactory.getDefaultInstance());
                if (sequence.getType() != null) {
                    builder.setTypeSelector(sequence.getType());
                }
                builder.addPseudoSelectors(sequence.getPath());
                actualSelectorList.add(builder.getSequence());
            }
        });


        // Parse the expected selectors (to canonicalise them).
View Full Code Here


        selectorSequenceMock.expects.addSelector(pseudoElementSelectorMock);
        // ==================================================================
        // Do the test.
        // ==================================================================

        SimpleSelectorSequenceBuilder builder =
                new SimpleSelectorSequenceBuilder(styleSheetFactoryMock);
        builder.setTypeSelector("type");
        builder.addClassSelector("class");
        builder.addPseudoSelectors(pseudoStylePathMock);
        SelectorSequence sequence = builder.getSequence();

        assertEquals("", selectorSequenceMock, sequence);

    }
View Full Code Here

                    // Create a rule using a type selector for the common
                    // properties.
                    RuleBuilder ruleBuilder =
                            ruleBuilderFactory.createRuleBuilder();
                    SimpleSelectorSequenceBuilder sequenceBuilder =
                            ruleBuilderFactory.createSequenceBuilder();
                    if (selectorSequence.getType() != null) {
                        sequenceBuilder.setTypeSelector(
                                selectorSequence.getType());
                    }
                    sequenceBuilder.addPseudoSelectors(
                            selectorSequence.getPath());
                    ruleBuilder.addSequence(sequenceBuilder);
                    ruleBuilder.setProperties(commonProperties);
                    Rule rule = ruleBuilder.getRule();
View Full Code Here

    // Javadoc inherited.
    public void next(PseudoStylePath pseudoPath) {

        // ... creating a rule specific to each one.
        RuleBuilder ruleBuilder = ruleBuilderFactory.createRuleBuilder();
        SimpleSelectorSequenceBuilder sequenceBuilder =
                ruleBuilderFactory.createSequenceBuilder();
        sequenceBuilder.addClassSelector(className);
        sequenceBuilder.addPseudoSelectors(pseudoPath);
        ruleBuilder.addSequence(sequenceBuilder);
        ruleBuilder.setProperties(styles.getPathProperties(pseudoPath));
        Rule rule = ruleBuilder.getRule();
        styleSheet.addRule(rule);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dom2theme.impl.generator.rule.builder.SimpleSelectorSequenceBuilder

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.