Examples of DeviceLayoutContext


Examples of com.volantis.mcs.protocols.DeviceLayoutContext

        addCardEvents(dom, attributes);

        // Store emulated emphasis tag markup in wml.card.beforebody
        // This ensure that native markup for onevent and timer elements
        // appears first.
        DeviceLayoutContext dlc = context.getDeviceLayoutContext();
        dom = (DOMOutputBuffer)dlc.getOutputBuffer(
            NativeMarkupAttributes.WML_CARD_BEFOREBODY, true);

        // NOTE: stylistic markup emulation handled in openLayout instead.
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

         * another page.
         *
         * writeLayout() calls the DeviceLayoutRenderer which calls this method.
         *
         */
        DeviceLayoutContext dlc = context.getDeviceLayoutContext();
        dom.addOutputBuffer((DOMOutputBuffer)dlc.getOutputBuffer(
            NativeMarkupAttributes.WML_CARD_ONEVENT, false));
        dom.addOutputBuffer((DOMOutputBuffer)dlc.getOutputBuffer(
            NativeMarkupAttributes.WML_CARD_TIMER, false));
        dom.addOutputBuffer((DOMOutputBuffer)dlc.getOutputBuffer(
            NativeMarkupAttributes.WML_CARD_BEFOREBODY, false));

        // NOTE: This handles opening the stylistic emulation markup for
        // both normal and inclusion canvases. We need to do it here to
        // respect the semantics for output defined by the native markup
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

        if (attributes.isOverlay ()) {
            if(logger.isDebugEnabled()){
                logger.debug ("Generating overlay inclusion in its own card");
            }
            // Get the current device layout context.
            DeviceLayoutContext deviceLayoutContext =
                    context.getDeviceLayoutContext();
            deviceLayoutContext.setOverlay(true);

            openCard(dom, attributes);
        }

        // NOTE: stylistic markup emulation handled in openLayout instead.
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

     * written.
     */
    public void beginNestedInclusion() {

        // Get the current device layout context.
        DeviceLayoutContext deviceLayoutContext
            = context.getDeviceLayoutContext();

        // If this inclusion is an overlay then it is a separate card.
        if (deviceLayoutContext.isOverlay()) {
            if (logger.isDebugEnabled()) {
                logger.debug("Generating overlay inclusion in its own card");
            }


            DOMOutputBuffer dom;
            if (deviceLayoutContext.isInRegion()) {
                if (cardsInRegions == null) {
                    cardsInRegions = getExtraBuffer(CARDS_IN_REGIONS,
                                                    true);
                }
                dom = cardsInRegions;
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

     * region in the including page.
     */
    public void endNestedInclusion() {

        // Get the current device layout context.
        DeviceLayoutContext deviceLayoutContext
            = context.getDeviceLayoutContext();

        // If this inclusion is an overlay then it is a separate card.
        if (deviceLayoutContext.isOverlay()) {
            if (logger.isDebugEnabled()) {
                logger.debug("Generating overlay inclusion in its own card");


                // If the card is not in a region then we have to add it into
                // a separate buffer

            }
            DOMOutputBuffer dom;
            if (deviceLayoutContext.isInRegion()) {
                dom = cardsInRegions;
            } else {
                dom = cardsNotInRegions;
            }
            context.popOutputBuffer(dom);
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

        } else if (NativeMarkupAttributes.WML_CARD_TIMER.equals(target)) {
            if (logger.isDebugEnabled()) {
                logger.debug("native markup goes in wml.card.timer");
            }

            DeviceLayoutContext dlc = context.getDeviceLayoutContext();
            buffer = dlc.getOutputBuffer(
                NativeMarkupAttributes.WML_CARD_TIMER,
                true);
        } else if (NativeMarkupAttributes.WML_CARD_ONEVENT.equals(target)) {
            if (logger.isDebugEnabled()) {
                logger.debug("native markup goes in wml.card.onevent");
            }

            DeviceLayoutContext dlc = context.getDeviceLayoutContext();
            buffer = dlc.getOutputBuffer(
                NativeMarkupAttributes.WML_CARD_ONEVENT, true);
        } else if (NativeMarkupAttributes.WML_CARD_BEFOREBODY.equals(target)) {
            if (logger.isDebugEnabled()) {
                logger.debug("native markup goes in wml.card.beforebody");
            }

            DeviceLayoutContext dlc = context.getDeviceLayoutContext();
            buffer = dlc.getOutputBuffer(
                NativeMarkupAttributes.WML_CARD_BEFOREBODY, true);
        } else {
            buffer = super.getNativeMarkupOutputBuffer(attributes);
        }
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

        MarinerPageContext pageContext =
                ContextInternals.getMarinerPageContext(
                        context.getInitialRequestContext());

        // Get the specified container - may be null.
        DeviceLayoutContext layoutContext =
                getSpecifiedLayout(layout, pageContext);

        // If a layout was specified, then ensure it is allowed in this context.
        RegionInstance containingRegion = null;
        if (layoutContext != null) {
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

     * was specified.
     */
    private DeviceLayoutContext getSpecifiedLayout(
            StyleValue layout, MarinerPageContext pageContext) {

        DeviceLayoutContext layoutContext = null;

        // Process an mcs-layout style first.
        if (layout instanceof StyleString) {
            StyleString layoutString = (StyleString) layout;

View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

                // if no new layout is specified and the container name is the
                // same as the name of the current container then we can use the
                // current container
                specifiedCurrentContainer = true;
            } else {
                DeviceLayoutContext layoutContext = specifiedLayout;
                if (layoutContext == null) {
                    // If none was specified, then try and find the format in
                    // the current layout.
                    layoutContext = pageContext.getDeviceLayoutContext();
                }
                Format format = layoutContext.getFormat(containerName,
                        FormatNamespace.CONTAINER);

                if (format != null) {
                    int dimensions = format.getDimensions();
                    NDimensionalIndex index;
                    if (dimensions > 0) {
                        int[] indeces = new int[dimensions];
                        index = new NDimensionalIndex(indeces);
                    } else {
                        index = NDimensionalIndex.ZERO_DIMENSIONS;
                    }

                    instance = (ContainerInstance) layoutContext.
                            getFormatInstance(format, index);
                }
            }
        } else if (container instanceof StyleKeyword) {
            if (container == MCSContainerKeywords.CURRENT) {
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutContext

        } catch (RepositoryException e) {
            // An appropriate device layout could not be found so fail.
            throw new XDIMEException(e);
        }

        DeviceLayoutContext deviceLayoutContext =
                new DeviceLayoutContext();

        DeviceLayoutContext idlc
                = pageContext.getDeviceLayoutContext();
        deviceLayoutContext.setIncludingDeviceLayoutContext(idlc);
        deviceLayoutContext.setInRegion(true);

        deviceLayoutContext.setMarinerPageContext(pageContext);
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.