Examples of CanvasLayout


Examples of com.volantis.mcs.layouts.CanvasLayout

        protocol.setMarinerPageContext(pageContext);


        // Now can actually do the test.
        String paneName = "caption-pane";
        CanvasLayout canvasLayout =
                new CanvasLayout();
        TestPane pane = new TestPane(canvasLayout);
        pane.setName(paneName);

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

        pageContext.addPaneMapping(pane);
        pageContext.setDeviceLayout(runtimeDeviceLayout);
        TestPaneInstance fContext = new TestPaneInstance();
        pageContext.setFormatInstance(fContext);

        int result = element.checkPaneInstances(pageContext, null, null);
        assertEquals(result, PAPIConstants.SKIP_ELEMENT_BODY);

        String value = "{layout:getPaneInstance('" + paneName + "',0)}";
        result = element.checkPaneInstances(pageContext, value, null);
        assertEquals(result, PAPIConstants.PROCESS_ELEMENT_BODY);
        PaneInstance captionPaneInstance = (PaneInstance) PrivateAccessor.getField(
                element, "captionPaneInstance");

        PaneInstance entryPaneInstance = (PaneInstance) PrivateAccessor.getField(
                element, "entryPaneInstance");

        assertNotNull(entryPaneInstance);
        assertNotNull(captionPaneInstance);
        assertTrue("Panes should be exactly the same",
                   entryPaneInstance == captionPaneInstance);

        FormDescriptor descriptor = new FormDescriptor();
        XFFormElementImpl formElement = new XFFormElementImpl();
        Form form = new Form(new CanvasLayout());
        form.setName("form-name");
        FormInstance formInstance = new FormInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
        formInstance.setFormat(form);
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

        pageContext.setPolicyReferenceResolver(
                PolicyReferenceResolverTestHelper.getCommonExpectations(
                        expectations, mockFactory));

        // Create Form layout object
        CanvasLayout canvasLayout = new CanvasLayout();
        Form form = new Form(canvasLayout);
        form.setName("form");

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

    /**
     * Private setup.
     */
    private void privateSetUp() {
        canvasLayout = new CanvasLayout();
        pane = new Pane(canvasLayout);
        pane.setName(PANE_NAME);
        pane.setInstance(0);

        // Activate the device layout.
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

     */
    private void initialiseContexts(TestMarinerPageContext pageContext) {
        attributes = new com.volantis.mcs.papi.NativeMarkupAttributes();
        element = new NativeMarkupElementImpl();

        canvasLayout = new CanvasLayout();

        pane = new Pane(canvasLayout);
        pane.setName("TestPane");               
       
        paneInstance = new TestPaneInstance();
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

        // The test implementation avoids the need for an initialized volantis
        // bean, which is jolly handy in this case
        pageContext.setProtocol(protocol);

        // Set the Layout (needed for FormatReference and panes)
        CanvasLayout layout = new CanvasLayout();

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(layout);
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

        this.protocol = (XHTMLBasic_MIB2_0) protocol;
        this.testable = (XHTMLBasicTestable) testable;
    }
   
    private void privateSetUp() {
        canvasLayout = new CanvasLayout();
        pane = new Pane(canvasLayout);
        pane.setName(PANE_NAME);
        pane.setInstance(0);

        // Activate the device layout.
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

        ContextInternals.setMarinerPageContext(requestContext, pageContext);
        protocol.setMarinerPageContext(pageContext);

        // pane setup required by #exprElementStart
        Pane testPane =
                new Pane(new CanvasLayout());
        final String pane = "testPane";
        testPane.setName(pane);
        pageContext.addPaneMapping(testPane);

        PaneInstance paneInstance = new TestPaneInstance();
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

        MenuAttributes atts = new MenuAttributes();
        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"));
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

        pageContext = new TestMarinerPageContext();
        VolantisProtocolStub protocol = new VolantisProtocolStub();
        protocol.setOutputBufferFactory(bufferFactory);
        pageContext.setProtocol(protocol);

        canvasLayout = new CanvasLayout();
        pane = new Pane(canvasLayout);
        pane.setName("TestPane");

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout =
View Full Code Here

Examples of com.volantis.mcs.layouts.CanvasLayout

        this.protocol = (XHTMLBasic_Netfront3) protocol;
        this.testable = (XHTMLBasicTestable) testable;
    }
   
    private void privateSetUp() {
        canvasLayout = new CanvasLayout();
        pane = new Pane(canvasLayout);
        pane.setName(PANE_NAME);
        pane.setInstance(0);

        // Activate the device layout.
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.