Package com.volantis.styling.properties

Examples of com.volantis.styling.properties.PropertyDetailsSet


    private ImmutableStylePropertySet backgroundProperties;

    protected void setUp() throws Exception {
        super.setUp();

        final PropertyDetailsSet backgroundDetails =
            PropertyDetailsSetHelper.getDetailsSet(
                Arrays.asList(PropertyGroups.BACKGROUND_PROPERTIES));
        backgroundProperties = backgroundDetails.getSupportedProperties();
    }
View Full Code Here


    private EncodingCollection expectedEncodings;

    protected void setUp() throws Exception {
        super.setUp();

        final PropertyDetailsSet backgroundDetails =
                PropertyDetailsSetHelper.getDetailsSet(
                        Arrays.asList(new StyleProperty[]{
                                MCS_INPUT_FORMAT
                        }));
        supportedProperties = backgroundDetails.getSupportedProperties();

        resolver = new MCSInputFormatResolver(
                supportedProperties, assetResolverMock);

        EncodingCollectionFactory factory =
View Full Code Here

        CSSCompiler compiler = StylingFactory.getDefaultInstance()
                .createDeviceCSSCompiler(DeviceOutlook.OPTIMISTIC);
        CompiledStyleSheet deviceStyleSheet = compiler.compile(
                new StringReader(deviceCSS), null);

        PropertyDetailsSet detailsSet =
                PropertyDetailsSetHelper.getDetailsSet(indexedProperties);

        ShorthandSet supportedShorthands = new MutableShorthandSet();

        InputPropertiesOptimizer propertiesOptimizer =
                new PropertiesOptimizer(detailsSet,
                        contextMock, supportedShorthands);

        ExtractorContext context = new ExtractorContext() {
            DefaultCSSVersion cssVersion = new DefaultCSSVersion("test"); {
                cssVersion.addPseudoSelectorId(new String[] {
                        PseudoClassTypeEnum.HOVER.getType()
                    });
                cssVersion.markImmutable();
            }

            public AssetResolver getAssetResolver() {
                return null;
            }

            public boolean generateTypeRules() {
                return true;
            }

            public CSSVersion getCSSVersion() {
                return cssVersion;
            }
        };

        StyledDOMOptimizer normalizer =
                new DefaultStyledDOMOptimizer(propertiesOptimizer,
                        detailsSet.getRootStyleValues(),
                        deviceStyleSheet,
                        context);

        OutputStyledElementList elementList = normalizer.optimize(actualXml);
        String actualStyledElements = renderStyledElements(elementList);
View Full Code Here

    private StyledDOMOptimizer createStyledDOMOptimizer(
            final ExtractorConfiguration configuration,
            ExtractorContext context) {

        PropertyDetailsSet detailsSet = configuration.getPropertyDetailsSet();
        ShorthandSet supportedShorthands =
                configuration.getSupportedShorthands();
        InputPropertiesOptimizer propertiesOptimizer
                = new PropertiesOptimizer(detailsSet, context,
                        supportedShorthands);

        return new DefaultStyledDOMOptimizer(propertiesOptimizer,
                detailsSet.getRootStyleValues(),
                configuration.getDeviceStyleSheet(),
                context);
    }
View Full Code Here

        final PropertyDetailsSetBuilder propertyDetailsSetBuilder =
            new PropertyDetailsSetBuilder();
        propertyDetailsSetBuilder.addBuilder(propertyDetailsBuilder);

        final PropertyDetailsSet detailsSet =
            propertyDetailsSetBuilder.getDetailsSet();

        final PropertyClearerCheckerImpl checker =
            new PropertyClearerCheckerImpl(detailsSet);
View Full Code Here

                }
                return IterationAction.CONTINUE;
            }
        });

        PropertyDetailsSet detailsSet =
                PropertyDetailsSetHelper.getDetailsSet(standardProperties);

        ShorthandSet supportedShorthands = new MutableShorthandSet();

        ExtractorConfigurationBuilder extractorBuilder =
View Full Code Here

            supportedShorthands.add(StyleShorthands.getDefinitions().getShorthand("mcs-border-radius"));           
        }

        configurationBuilder.setSupportedShorthands(supportedShorthands);

        PropertyDetailsSet detailsSet = detailsSetBuilder.getDetailsSet();

        String defaultCSS = device.getPolicyValue(
                DevicePolicyConstants.DEFAULT_CSS);
        if (defaultCSS == null) {
            defaultCSS = "";
View Full Code Here

TOP

Related Classes of com.volantis.styling.properties.PropertyDetailsSet

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.