Package com.volantis.mcs.dom2theme.impl.optimizer

Examples of com.volantis.mcs.dom2theme.impl.optimizer.ShorthandAnalyzer.analyze()


     */
    protected void analyze(ShorthandAnalyzer[] analyzers) {

        for (int i = 0; i < analyzers.length; i++) {
            ShorthandAnalyzer analyzer = analyzers[i];
            analyzer.analyze(target, inputValues, deviceValues);

            Priority priority = analyzer.getShorthandPriority();
            if (priority.isGreaterThan(shorthandPriority)) {
                shorthandPriority = priority;
            }
View Full Code Here


        MutableStyleProperties outputValues =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        ShorthandAnalyzer analyzer = new BasicShorthandAnalyzer(
                StyleShorthands.BORDER_LEFT, checkerMock, shorthandSetMock);
        analyzer.analyze(TargetEntity.ELEMENT, inputValues, deviceValuesMock);
        analyzer.updateShorthand(outputValues);

        assertTrue("Should be able to use shorthand",
                analyzer.canUseShorthand());
View Full Code Here

        MutableStyleProperties outputValues =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        ShorthandAnalyzer analyzer = new BasicShorthandAnalyzer(
                StyleShorthands.BORDER_LEFT, checkerMock, shorthandSetMock);
        analyzer.analyze(TargetEntity.ELEMENT, inputValues, deviceValuesMock);

        assertTrue("Should be able to use shorthand",
                analyzer.canUseShorthand());

        analyzer.updateShorthand(outputValues);
View Full Code Here

        final StyleValue defaultStyleValue =
            StyleValueFactory.getDefaultInstance().getColorByRGB(null, 100);
        analyzer = new EdgeCharacteristicAnalyzer(
                StyleShorthands.BORDER_COLOR, checkerMock, defaultStyleValue,
                shorthandSetMock);
        analyzer.analyze(TargetEntity.ELEMENT, inputValues, deviceValuesMock);
       
        // verify test
        // 2 is because of ':' and ';' in getShorthandCost()
        assertEquals(StyleShorthands.BORDER_COLOR.getName().length() +
                defaultStyleValue.getStandardCost() + 2,
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.