Package com.volantis.mcs.layouts

Examples of com.volantis.mcs.layouts.Pane


        // check to see that the XFFomElements Pane has been pushed onto
        // the Page Contexts pane stack
//        assertEquals("Pane Stack size should be 1",
//                     pageContext.getPaneStack().size(), 1);

        Pane currentPane = pageContext.getCurrentPane();
        assertSame("Current pane should be " + currentPane, currentPane, pane);


        // check to see that pageContext is using the corrent output buffer.
//        assertEquals("OutputBuffer stack size should be 1",
//                     pageContext.getBufferStack().size(), 1);

        assertSame("Current outputBuffer should be " + outputBuffer,
                   pageContext.getCurrentOutputBuffer(), outputBuffer);


        initialiseContexts();
        pageContext.pushElement(createDummyFormElement(pane));
        Pane namedPane = new Pane(canvasLayout);
        namedPane.setName("NamedPane");
        attributes.setPane(namedPane.getName());
        pageContext.addPaneMapping(namedPane);
        paneContext = new TestPaneInstance();
        paneContext.setFormat(namedPane);
        paneContext.setDeviceLayoutContext(deviceLayoutContext);
        pageContext.setFormatInstance(paneContext);
View Full Code Here


        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 =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);
View Full Code Here

        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.
        RuntimeDeviceLayout runtimeDeviceLayout =
View Full Code Here

     * @param defaultPane The default Pane for the Form element
     * @return the XFFormElement
     */
    public XFFormElementImpl createDummyFormElement(Pane defaultPane) {

        final Pane pane = defaultPane;

        final Form form = new Form((CanvasLayout) defaultPane.getLayout()) {
            public Pane getDefaultPane() {
                return pane;
            }
View Full Code Here

    PaneAttributes createPaneAttributes(String horizontal, String vertical) {
        String css = getCssAlign(horizontal, vertical);

        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getStyles(css));
        Pane pane = new Pane(null);
        attributes.setPane(pane);
        return attributes;
    }
View Full Code Here

    public void testWriteImageAttributePane() throws ProtocolException {
        privateSetUp();

        ImageAttributes ia = new ImageAttributes();
        ia.setStyles(StylesBuilder.getDeprecatedStyles());
        Pane outPane = new Pane(null);
        outPane.setName("MyPane");
        outPane.setDestinationArea(null);
        ia.setPane(outPane);
        ia.setAltText("AltText");
        ia.setSrc("http://www.images.com/test/test.jpg");
        ia.setLocalSrc(false);
        protocol.writeImage(ia);
View Full Code Here

    public void testWriteImageContextPane() throws ProtocolException {
        privateSetUp();

        ImageAttributes ia = new ImageAttributes();
        ia.setStyles(StylesBuilder.getDeprecatedStyles());
        Pane outPane = new Pane(null);
        outPane.setName("MyPane");

        outPane.setDestinationArea(null);
        pageContext.setCurrentPane(outPane);
        ia.setPane(null);
        ia.setAltText("AltText");
        ia.setSrc("http://www.images.com/test/test.jpg");
        ia.setLocalSrc(false);
View Full Code Here

        attributes.setStyles(StylesBuilder.getDeprecatedStyles());
        attributes.setLocalSrc(true);
        attributes.setSrc("myImage.jpg");
        attributes.setAltText("Alternate Text");

        Pane outPane = new Pane(null);
        outPane.setName("MyPane");
        outPane.setDestinationArea(null);
        attributes.setPane(outPane);

        protocol.doImage(buffer, attributes);

        // valid src and alt generates <img src="url" alt="text" />
View Full Code Here

        ImageAttributes attributes = new ImageAttributes();
        attributes.setLocalSrc(true);
        attributes.setSrc(null);
        attributes.setAltText(expected);

        Pane outPane = new Pane(null);
        outPane.setName("MyPane");
        outPane.setDestinationArea(null);
        attributes.setPane(outPane);

        protocol.doImage(buffer, attributes);

        // No src with alt text generates <span>text</span>
View Full Code Here

        ImageAttributes attributes = new ImageAttributes();
        attributes.setLocalSrc(true);
        attributes.setSrc(null);
        attributes.setAltText("    ");

        Pane outPane = new Pane(null);
        outPane.setName("MyPane");
        outPane.setDestinationArea(null);
        attributes.setPane(outPane);

        protocol.doImage(buffer, attributes);

        // No src and whitespace text generates no output
View Full Code Here

TOP

Related Classes of com.volantis.mcs.layouts.Pane

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.