Package com.volantis.styling.engine

Examples of com.volantis.styling.engine.StylingEngine


            throw new PAPIException(EXCEPTION_LOCALIZER.format(
                    "element-not-allowed-inside-xdimecp", papiAttributes.getElementName()));
        }

        if (this.isStylingEnabled) {
            StylingEngine stylingEngine = pageContext.getStylingEngine();
            stylingEngine.startElement(XDIMESchemata.CDM_NAMESPACE,
                    papiAttributes.getElementName(),
                    (Attributes) papiAttributes.getGenericAttributes());

            setStyles(stylingEngine.getStyles());

            // annotate the MCSAttributes with the styles for this element
            MCSAttributes attributes = getMCSAttributes();
            if (attributes != null) {
                attributes.setStyles(stylingEngine.getStyles());
            }
        }

        return styleElementStart(context, papiAttributes);
    }
View Full Code Here


        // Get the page context from the request
        MarinerPageContext pageContext
                = ContextInternals.getMarinerPageContext(context);

        if (this.isStylingEnabled) {
            StylingEngine stylingEngine = pageContext.getStylingEngine();
            // Notify the styling engine that the element end has been reached
            stylingEngine.endElement(XDIMESchemata.CDM_NAMESPACE,
                    papiAttributes.getElementName());
        }

        return returnCode;
    }
View Full Code Here

        // Copy the base attributes.
        pattributes.setId(attributes.getId());
        pattributes.setTagName("xfoption");

        // get styles for the current element and set it on the MCSAttributes
        final StylingEngine stylingEngine = pageContext.getStylingEngine();
        pattributes.setStyles(stylingEngine.getStyles());

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        TextAssetReference object;
        // Process the caption as a mariner expression.
        object = resolver.resolveQuotedTextExpression(attributes.getCaption());
        pattributes.setCaption(object);

        // Process the prompt as a mariner expression.
        object = resolver.resolveQuotedTextExpression(attributes.getPrompt());
        pattributes.setPrompt(object);

        // Set the value attribute.
        pattributes.setValue(attributes.getValue());

        // Find the caption pane
        PaneInstance captionPaneInstance = getPaneInstance(
                pageContext, attributes.getCaptionPane());

        if ((captionPaneInstance != null) &&
                (captionPaneInstance.getFormat() != null)) {
            pattributes.setCaptionContainerInstance(captionPaneInstance);
        }

        // And the entry pane
        PaneInstance entryPaneInstance = getPaneInstance(
                pageContext, attributes.getEntryPane());

        if ((entryPaneInstance != null) &&
                (entryPaneInstance.getFormat() != null)) {
            pattributes.setEntryContainerInstance(entryPaneInstance);
        }

        // Set the styles for the caption
        final String captionClass = attributes.getCaptionClass();
        if (captionClass != null) {
            final String namespace = XDIMESchemata.CDM_NAMESPACE;
            final PAPIAttributes genericAttributes =
                    attributes.getGenericAttributes();
            genericAttributes.setAttributeValue(null, "class", captionClass);
            stylingEngine.startElement(namespace, "xfoption",
                    (Attributes) genericAttributes);
            pattributes.setCaptionStyles(stylingEngine.getStyles());
            stylingEngine.endElement(namespace, "xfoption");
        }

        // Set the selected attribute
        String selected = attributes.getSelected();
        if (selected != null) {
View Full Code Here

        // all it's content depends on, before the main processing for this
        // element begins. This must be done in order, least specific first.
        // NOTE: the parent HTML element is not being styled.
        // NOTE: this is done for both XDIME 2 and CP since CP supports inline
        // style sheets (only).
        final StylingEngine stylingEngine = pageContext.getStylingEngine();
        widgetResponseElement.getThemeStyleSheets().pushAll(stylingEngine);

        openCanvas(context, attributes);

        return super.doElementStart(context, attributes);
View Full Code Here

        // Remove the theme style sheets associated with this element.
        // This must be done in reverse order of addition.
        // Note that this is done for both XDIME 2 and CP since CP supports
        // inline style sheets (only).
        final StylingEngine stylingEngine = pageContext.getStylingEngine();
        widgetResponseElement.getThemeStyleSheets().popAll(stylingEngine);

        return result;
    }
View Full Code Here

        // all it's content depends on, before the main processing for this
        // element begins. This must be done in order, least specific first.
        // NOTE: the parent HTML element is not being styled.
        // NOTE: this is done for both XDIME 2 and CP since CP supports inline
        // style sheets (only).
        final StylingEngine stylingEngine = pageContext.getStylingEngine();
        htmlElement.getThemeStyleSheets().pushAll(stylingEngine);

        // If we are in XDIME 2 mode
        if (htmlElement.getXDIMEMode() == XDIMEMode.XDIME2) {
View Full Code Here

        // Remove the theme style sheets associated with this element.
        // This must be done in reverse order of addition.
        // Note that this is done for both XDIME 2 and CP since CP supports
        // inline style sheets (only).
        final StylingEngine stylingEngine = pageContext.getStylingEngine();
        htmlElement.getThemeStyleSheets().popAll(stylingEngine);

        return result;
    }
View Full Code Here

        final DOMProtocol protocol = createProtocol();

        requestContextMock.expects.
            getMarinerPageContext().returns(pageContextMock).any();

        final StylingEngine stylingEngine = getStylingEngine();

        final PaneInstanceMock paneInstance = getPaneInstance();

        pageContextMock.expects.enteringXDIMECPElement().any();
        pageContextMock.expects.insideXDIMECPElement().returns(false).any();
View Full Code Here

    protected void styleElementStart(XDIMEContextInternal context,
            XDIMEAttributes attributes) {

        if (styles == null) {
            StylingEngine stylingEngine = getStylingEngine(context);
            stylingStrategy.startElement(stylingEngine, getNamespace(),
                    getTagName(), (Attributes) attributes);
            styles = stylingStrategy.getStyles(stylingEngine);
            MCSAttributes protocolAttributes = getProtocolAttributes();
View Full Code Here

     */
    private MarinerPageContext getMarinerPageContext(
            MarinerRequestContext requestContext) {
        pageContext = new MarinerPageContextMock("pageContext", expectations);

        StylingEngine stylingEngine = getStylingEngine();

        final ContainerInstanceImplMock containerInstanceMock =
                new ContainerInstanceImplMock(
                        "containerInstanceMock", expectations,
                        NDimensionalIndex.ZERO_DIMENSIONS);
View Full Code Here

TOP

Related Classes of com.volantis.styling.engine.StylingEngine

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.