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

Examples of com.volantis.mcs.dom2theme.impl.optimizer.ShorthandOptimizer.optimize()


        // A pseudo class must set all the properties that are set so in this
        // case it should use the shorthand.
        checker.prepare(parentValues, TargetEntity.PSEUDO_CLASS);

        optimizer.optimize(TargetEntity.PSEUDO_CLASS, inputValues, outputValues,
                deviceValuesMock);

        assertEquals("font:medium FooBar", outputValues.getStandardCSS());
    }
}
View Full Code Here


                PropertyStatus.REQUIRED);

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

        optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
                deviceValuesMock);

        assertEquals("background-attachment:scroll;background-image:none",
                outputValues.getStandardCSS());
    }
View Full Code Here

                PropertyStatus.REQUIRED);

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

        optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
                deviceValuesMock);

        assertEquals("background-color:red",
                outputValues.getStandardCSS());
    }
View Full Code Here

        ShorthandOptimizer optimizer = new FontOptimizer(checker,
                shorthandsMock);

        checker.prepare(rootStyleProperties, TargetEntity.ELEMENT);

        optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
                deviceValuesMock);

        assertEquals("font:caption;font-size:medium",
                outputValues.getStandardCSS());
    }
View Full Code Here

        ShorthandOptimizer optimizer = new FontOptimizer(checker,
                shorthandsMock);

        checker.prepare(rootStyleProperties, TargetEntity.ELEMENT);

        optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
                deviceValuesMock);

        assertEquals("font:medium/90% Foo", outputValues.getStandardCSS());
    }
View Full Code Here

        // When only the font-family property is needed for individual
        // properties then use that instead of the font shorthand.
        checker.prepare(parentValues, TargetEntity.ELEMENT);

        optimizer.optimize(TargetEntity.ELEMENT, inputValues, outputValues,
                deviceValuesMock);

        assertEquals("font-size:medium", outputValues.getStandardCSS());
    }
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.