Examples of PaneAttributes


Examples of com.volantis.mcs.protocols.PaneAttributes

        buffer.initialise();

        Pane pane = new Pane(canvasLayout);
        pane.setName(PANE_NAME);

        PaneAttributes paneAttributes = new PaneAttributes();
        paneAttributes.setStyles(StylesBuilder.getDeprecatedStyles());
        paneAttributes.setPane(pane);

        protocol.openPaneTable(buffer, paneAttributes);
        Element elem = buffer.getCurrentElement();

        System.out.println("Open Pane Table: " + DOMUtilities.toString(elem));
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

        DOMOutputBuffer buffer = new DOMOutputBuffer();
        buffer.initialise();

        Pane pane = new Pane(canvasLayout);
        pane.setName(PANE_NAME);
        PaneAttributes paneAttributes = new PaneAttributes();
        Styles paneStyles = StylesBuilder.getSparseStyles("padding: 10px");
        paneAttributes.setStyles(paneStyles);
        paneAttributes.setPane(pane);

        protocol.openPaneTable(buffer, paneAttributes);
        Element tableElement = (Element) buffer.getRoot().getHead();
        assertTrue("Root element should be a table", "table".equals(tableElement.getName()));
        String cellPadding = tableElement.getAttributeValue("cellpadding");
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

        buffer.initialise();

        Element el = null;

        Pane pane = null;
        PaneAttributes attributes = null;

        //=============================================================
        // Styles defined = No
        //=============================================================
        pane = new Pane(null);
        attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getDeprecatedStyles());
        attributes.setPane(pane);

        protocol.openPane(buffer, attributes);

        assertSame("The buffer current element should be the root element " +
                   "but was" + buffer.getCurrentElement(),
                   buffer.getRoot(),
                   buffer.getCurrentElement());

        //=============================================================
        // Styles defined = Yes
        //@todo XDIME-CP pass in Styles and check they're correctly propagated through
        //=============================================================
        pane = new Pane(null);

        attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getDeprecatedStyles());
//        attributes.setStyleClass("fred");
//        attributes.setBackgroundColour("#ff0000");
//        attributes.setBorderWidth("1");
//        attributes.setCellPadding("2");
//        attributes.setCellSpacing("3");
        attributes.setPane(pane);

        protocol.openPane(buffer, attributes);
        try {
            // A div will have been opened to render styles because:
            // 1. This protocol supports stylesheets.
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

        Pane pane = new Pane(null);
        pane.setName(PANE_NAME);

        dom.initialise();

        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getStyles(
                "background-color: #ff0000"));
        attributes.setPane(pane);

        context.setFormatInstance(new TestPaneInstance());
        protocol.setMarinerPageContext(context);
        protocol.openPane(dom, attributes);
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

        Pane pane = new Pane(null);
        pane.setName(PANE_NAME);

        dom.initialise();

        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getStyles(
                "background-color: #ff0000"));
        attributes.setPane(pane);

        context.setFormatInstance(new TestPaneInstance());
        protocol.setMarinerPageContext(context);
        Element parent = dom.openStyledElement("td", attributes);
        protocol.openPane(dom, attributes);
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

        pane.setName(PANE_NAME);
        Element parent = null;

        dom.initialise();

        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getStyles(
                "background-color: #ff0000"));
        attributes.setPane(pane);

        context.setFormatInstance(new TestPaneInstance());
        protocol.setMarinerPageContext(context);
        parent = dom.openStyledElement("td", attributes);
        parent.setAttribute("id", "parent");
        attributes.setId("child");
        protocol.openPane(dom, attributes);

        Element element = dom.getCurrentElement();
        assertEquals("Element name", "div", element.getName());
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

    public void notestOpenPaneDoNothing() throws Exception {
        privateSetUp();
        DOMOutputBuffer dom = new DOMOutputBuffer();
        Pane pane = new Pane(null);
        pane.setName(PANE_NAME);
        PaneAttributes attributes = new PaneAttributes();
        Element parent = null;
        Element element = null;

        dom.initialise();

        attributes.setPane(pane);
        pane.setBackgroundColour(null);
        pane.setBorderWidth(null);
        pane.setCellPadding(null);
        pane.setCellSpacing(null);
        pane.setHeight(null);
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

        return dom;
    }

    // javadoc inherited.
    public void testClosePane() throws Exception {
        PaneAttributes attributes = new PaneAttributes();
        DOMOutputBuffer dom = setupForPaneTests(PaneRendering.USE_TABLE,
                                                attributes);

        final Element expected;
        // @todo 2005060816 annotate child with style information if it's not inherited from the parent
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

    /**
     * Test closing a pane where a div has been used to surround the pane's
     * content.
     */
    public void testClosePaneUseDiv() throws Exception {
        PaneAttributes attributes = new PaneAttributes();
        DOMOutputBuffer dom = setupForPaneTests(
                PaneRendering.CREATE_ENCLOSING_ELEMENT, attributes);


        // This does not effect the outcome of the test.
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneAttributes

    /**
     * Test closing a pane where the surrounding td has been used as the
     * pane's content container.
     */
    public void testClosePaneUseCell() throws Exception {
        PaneAttributes attributes = new PaneAttributes();
        DOMOutputBuffer dom = setupForPaneTests(
                PaneRendering.USE_ENCLOSING_TABLE_CELL, attributes);

        final Element expected;
        expected = dom.openStyledElement("td", attributes);
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.