Package com.volantis.mcs.runtime.layouts

Examples of com.volantis.mcs.runtime.layouts.RuntimeDeviceLayout


        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "fixed");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "1");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "fixed");
       
        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);

        pageContext = new TestMarinerPageContext();
        pageContext.pushRequestContext(requestContext);
        pageContext.setProtocol(protocol);
View Full Code Here


        context.setCurrentFragment(fragment);
        assertSame(dp, context.getPane("dissectingPane"));
    }

    private void activateAndSetDeviceLayout() {
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);
        DeviceLayoutContext dlc = new DeviceLayoutContext();
        dlc.setDeviceLayout(runtimeDeviceLayout);
        context.pushDeviceLayoutContext(dlc);
    }
View Full Code Here

     */
    protected void setupImpl() {
        layout = createDeviceLayout();

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(layout);

        durationBuffer = new StringBuffer();

        pageContext = new TestMarinerPageContext();
View Full Code Here

        CompiledStyleSheet compiledStyleSheet = compiler.compileStyleSheet(null);

        DeviceLayoutContext deviceLayoutContext =
                new TestDeviceLayoutContext(pageContext);
        deviceLayoutContext.setMarinerPageContext(pageContext);
        RuntimeDeviceLayout runtimeDeviceLayout = new RuntimeLayoutAdapter(
                "layoutName", new CanvasLayout(), compiledStyleSheet, null);
        deviceLayoutContext.setDeviceLayout(runtimeDeviceLayout);
        deviceLayoutContext.initialise ();

        pageContext.pushDeviceLayoutContext(deviceLayoutContext);
View Full Code Here

        // a form with a pane in it
        final CanvasLayout canvasLayout =
                new CanvasLayout();
        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);
        pageContext.setDeviceLayout(runtimeDeviceLayout);

        final Form form = new Form(canvasLayout);
        form.setName("form");
View Full Code Here

        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "fixed");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "1");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "fixed");
       
        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);

        pageContext = new TestMarinerPageContext();
        pageContext.pushRequestContext(requestContext);
        pageContext.setProtocol(protocol);
View Full Code Here

        super.setUp();

        canvasLayout = new CanvasLayout();

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);

        dlContext = new MyDeviceLayoutContext();

        pageContext = new TestMarinerPageContext();
View Full Code Here

        Pane testPane = new Pane(layout);
        testPane.setName("pane");
        pageContext.addPaneMapping(testPane);

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(layout);

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

        pane = new TestPane(deviceLayout);
        pane.setName("beer");
        context.addPaneMapping(pane);

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(deviceLayout);

        context.setDeviceLayout(runtimeDeviceLayout);
        fContext = new TestPaneInstance();
        context.setFormatInstance(fContext);
View Full Code Here

                    = pageContext.getBooleanDevicePolicyValue("aggregation");

            if (!supportsAggregation) {

                MarinerURL requestURL = pageContext.getRequestURL(true);
                RuntimeDeviceLayout deviceLayout =
                        pageContext.getDeviceLayout();
                String defaultSegmentSrc = getDefaultSegmentSrc(deviceLayout,
                        pageContext);

                if (defaultSegmentSrc != null) {
                    // Resolve the defaultSegmentSrc relative to the current request URL
                    MarinerURL url =
                            new MarinerURL(requestURL, defaultSegmentSrc);

                    String destination = url.getExternalForm();

                    if (logger.isDebugEnabled()) {
                        logger.debug("MontageTag: device "
                                + pageContext.getDeviceName()
                                + "does not support aggregation."
                                + " Sending redirect to "
                                + destination);
                    }

                    pageContext.sendRedirect(url);

                    //  redirected = true;
                    return ABORT_PROCESSING;
                } else {
                    throw new PAPIException(exceptionLocalizer.format(
                            "default-segment-missing-no-aggregation",
                            new Object[]{pageContext.getDeviceName(),
                                    deviceLayout.getName()}));
                }
            }

            pageContext.endPhase1BeginPhase2();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.layouts.RuntimeDeviceLayout

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.