Package com.volantis.styling

Examples of com.volantis.styling.StylingFactory


                    styleSheetRenderer);

            final StyleValuesMock parentValuesMock =
                    new StyleValuesMock("parentValuesMock", expectations);

            StylingFactory stylingFactory = StylingFactory.getDefaultInstance();

            final MutableStyleProperties inputProperties =
                    parser.parseDeclarations(inputCSS);
            final MutablePropertyValues inputValues = stylingFactory.createPropertyValues(
                    StylePropertyDetails.getDefinitions());
            inputProperties.iteratePropertyValues(new PropertyValueIteratee() {
                public IterationAction next(PropertyValue propertyValue) {
                    inputValues.setComputedValue(propertyValue.getProperty(),
                            propertyValue.getValue());
View Full Code Here


                return createPropertiesFromValues(inputValues);
            }
        });

        StylingFactory stylingFactory = StylingFactory.getDefaultInstance();
        parentValues = stylingFactory.createPropertyValues();
    }
View Full Code Here

        return luserProps;
    }

    public void testMergeWinnerAndLoser() {

        StylingFactory stylingFactory = StylingFactory.getDefaultInstance();
        Styles expectedResult = stylingFactory.createStyles(null);
        factoryMock.expects.createStyles(null)
                .returns(expectedResult);

        Styles winner = StylesBuilder.getCompleteStyles(
                "background-color: green; font-size: medium");
View Full Code Here

        CSSParser parser =
                CSSParserFactory.getDefaultInstance().createStrictParser();
        StyleSheet styleSheet = parser.parseStyleSheet(new StringReader(css),
                null);

        StylingFactory factory = StylingFactory.getDefaultInstance();

        CompilerConfiguration configuration = factory.createCompilerConfiguration();
        configuration.setSource(StyleSheetSource.THEME);

        StyleSheetCompiler compiler = factory.createStyleSheetCompiler(configuration);
        CompiledStyleSheet sheet = compiler.compileStyleSheet(styleSheet);

        StylingEngine engine = factory.createStylingEngine();
        engine.pushStyleSheet(sheet);
        return engine;
    }
View Full Code Here

        protocol.emulateHorizontalTag = true;
        assertTrue("Emulation should be on", protocol.emulateHorizontalTag);

        pageContext.setDevicePolicyValue("charactersx", "10");
        HorizontalRuleAttributes attrs = new HorizontalRuleAttributes();
        final StylingFactory factory = StylingFactory.getDefaultInstance();
        attrs.setStyles(factory.createStyles(factory.createPropertyValues(
                StylePropertyDetails.getDefinitions())));
        protocol.doHorizontalRule(buffer, attrs);
        document.addNode(buffer.getRoot());
        StyledDOMTester tester = new StyledDOMTester();
        String output = tester.render(document);
View Full Code Here

        CSSParserFactory factory = CSSParserFactory.getDefaultInstance();
        CSSParser parser = factory.createStrictParser();
        StyleSheet styleSheet = parser.parseStyleSheet(reader, null);

        StylingFactory stylingFactory = StylingFactory.getDefaultInstance();
        CompilerConfiguration configuration =
                stylingFactory.createCompilerConfiguration();
        configuration.setSource(StyleSheetSource.THEME);
        configuration.addFunctionResolver(functionResolverMock);
        StyleSheetCompiler compiler =
                stylingFactory.createStyleSheetCompiler(configuration);

        CompiledStyleSheet compiledStyleSheet =
                compiler.compileStyleSheet(styleSheet);

        StylingEngine engine = stylingFactory.createStylingEngine();

        engine.pushStyleSheet(compiledStyleSheet);
        return engine;
    }
View Full Code Here

        FraglinkAttributes attrs = new FraglinkAttributes();
        attrs.setHref(href);
        final DOMOutputBuffer outputBuffer = new DOMOutputBuffer();
        outputBuffer.writeText(text);
        attrs.setLinkText(outputBuffer);
        final StylingFactory factory = StylingFactory.getDefaultInstance();
        attrs.setStyles(factory.createStyles(factory.createPropertyValues(
                StylePropertyDetails.getDefinitions())));
        renderer.doFragmentLink(buffer, attrs);

        StyledDOMTester tester = new StyledDOMTester();
View Full Code Here

        atts.setTitle("TestTitle");
        atts.addItem(createMenuItem("http://foo.com", "foo", "fooTitle"));
        atts.addItem(createMenuItem(
                "http://foobar.com", "foobar", "foobarTitle"));
        atts.setPane(new Pane(new CanvasLayout()));
        final StylingFactory factory = StylingFactory.getDefaultInstance();
        atts.setStyles(factory.createStyles(factory.createPropertyValues(
                StylePropertyDetails.getDefinitions())));
        MenuItemGroupAttributes group = createMenuGroup();
        group.addItem(createMenuItem("http://bar.com", "bar", "barTitle"));
        group.addItem(createMenuItem("http://fred.com", "fred", "fredTitle"));
        atts.addGroup(group);
View Full Code Here

        protocol.initialise();
        protocol.initialiseCanvas();
        protocol.initialisePageHead();
        protocol.setWriteHead(false);

        StylingFactory stylingFactory = StylingFactory.getDefaultInstance();
        CompilerConfiguration configuration =
                stylingFactory.createCompilerConfiguration();
        configuration.setSource(StyleSheetSource.THEME);
        configuration.addFunctionResolver(StylingFunctions.getResolver());
        StyleSheetCompiler compiler = stylingFactory.createStyleSheetCompiler(
                configuration);
        CompiledStyleSheet compiledStyleSheet = compiler.compileStyleSheet(null);

        DeviceLayoutContext deviceLayoutContext =
                new TestDeviceLayoutContext(pageContext);
View Full Code Here

    }

    public DocumentStyler(String namespace) {
        this.namespace = namespace;

        StylingFactory factory = StylingFactory.getDefaultInstance();

        StyleSheetCompilerFactory inlineCompilerFactory =
                new InlineStyleSheetCompilerFactory(null);

        stylingEngine = factory.createStylingEngine(inlineCompilerFactory);
    }
View Full Code Here

TOP

Related Classes of com.volantis.styling.StylingFactory

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.