Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.MutableShorthandSet


public class PaddingRendererTestCase {

    public static Test suite() {


        MutableShorthandSet supportedShorthands = new MutableShorthandSet();
        supportedShorthands.add(StyleShorthands.PADDING);

        final TestPropertyClearerChecker checker =
                new TestPropertyClearerChecker();

        ShorthandOptimizer allShorthands =
                new EdgeShorthandOptimizer(StyleShorthands.PADDING,
                        checker, supportedShorthands);

        ShorthandOptimizer noShorthands =
                new EdgeShorthandOptimizer(StyleShorthands.PADDING,
                        checker, new MutableShorthandSet());

        ShorthandRendererTestSuiteBuilder builder =
                new ShorthandRendererTestSuiteBuilder(
                        null, new ShorthandPropertyRenderer(StyleShorthands.PADDING),
                        allShorthands, noShorthands, checker);
View Full Code Here


        EDGE_NAMES[PropertyGroups.LEFT] = "left";
    }

    public static Test suite() {

        final MutableShorthandSet allShorthands = new MutableShorthandSet();

        allShorthands.add(StyleShorthands.BORDER);
        allShorthands.add(StyleShorthands.BORDER_BOTTOM);
        allShorthands.add(StyleShorthands.BORDER_COLOR);
        allShorthands.add(StyleShorthands.BORDER_LEFT);
        allShorthands.add(StyleShorthands.BORDER_RIGHT);
        allShorthands.add(StyleShorthands.BORDER_STYLE);
        allShorthands.add(StyleShorthands.BORDER_TOP);
        allShorthands.add(StyleShorthands.BORDER_WIDTH);

        final MutableShorthandSet noShorthands = new MutableShorthandSet();

        TestPropertyClearerChecker checker = new TestPropertyClearerChecker();

        PropertiesNormalizer normalizer = new BorderNormalizer(ALL_PROPERTIES);
View Full Code Here

                new StringReader(deviceCSS), null);

        PropertyDetailsSet detailsSet =
                PropertyDetailsSetHelper.getDetailsSet(indexedProperties);

        ShorthandSet supportedShorthands = new MutableShorthandSet();

        InputPropertiesOptimizer propertiesOptimizer =
                new PropertiesOptimizer(detailsSet,
                        contextMock, supportedShorthands);
View Full Code Here

        valuefactory = StyleValueFactory.getDefaultInstance();

        helper = new OptimizerTestHelper();

        MutableShorthandSet supportedShorthands = new MutableShorthandSet();
        supportedShorthands.add(StyleShorthands.MARGIN);
        optimizer = new EdgeShorthandOptimizer(StyleShorthands.MARGIN,
                new TestPropertyClearerChecker(),
                supportedShorthands);

View Full Code Here

        });

        PropertyDetailsSet detailsSet =
                PropertyDetailsSetHelper.getDetailsSet(standardProperties);

        ShorthandSet supportedShorthands = new MutableShorthandSet();

        ExtractorConfigurationBuilder extractorBuilder =
                extractorFactory.createConfigurationBuilder();
        extractorBuilder.setDetailsSet(detailsSet);
        extractorBuilder.setSupportedShorthands(supportedShorthands);
View Full Code Here

        ExtractorConfigurationBuilder configurationBuilder =
                factory.createConfigurationBuilder();

        // Populate the set of supported shorthands.
        MutableShorthandSet supportedShorthands = new MutableShorthandSet();

        Iterator i = StyleShorthands.getDefinitions().iterator();
        while (i.hasNext()) {
            StyleShorthand shorthand = (StyleShorthand) i.next();
            if (cssVersion.supportsShorthand(shorthand)) {
                supportedShorthands.add(shorthand);
            }
        }
       
        String internalShorthand = BorderRadiusHelper.supportShorthand(cssVersion);       
        if(internalShorthand != null) {
            supportedShorthands.add(StyleShorthands.getDefinitions().getShorthand("mcs-border-radius"));           
        }

        configurationBuilder.setSupportedShorthands(supportedShorthands);

        PropertyDetailsSet detailsSet = detailsSetBuilder.getDetailsSet();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.themes.MutableShorthandSet

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.