Package com.volantis.mcs.protocols

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


        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

    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

        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

    /**
     * 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

    /**
     * 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

     * pane's content.
     *
     * @throws Exception
     */
    public void testClosePaneDoNothing() throws Exception {
        PaneAttributes attributes = new PaneAttributes();
        DOMOutputBuffer dom = setupForPaneTests(
                PaneRendering.DO_NOTHING, attributes);

        final Element expected;
        expected = dom.openStyledElement("body", attributes);
View Full Code Here

                                       String expectedClass) {
    }

    // javadoc inherited.
    public void testUseEnclosingTableCell() throws Exception {
        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getDeprecatedStyles());

        doTestUseEnclosingTableCell(attributes, "<td/>");

        // Set some styles on the element.
        attributes.setStyles(StylesBuilder.getStyles("background-color: red"));
        doTestUseEnclosingTableCell(attributes, "<td bgcolor=\"red\"/>");
    }
View Full Code Here

    // javadoc inherited.
    public void testCreateEnclosingElement() throws Exception {
        // NOTE: This protocol doesn't support style classes and we should never
        // have a class attribute in real life situations. However, this is
        // explicitly set in the super class' method during this test.
        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getStyles("background-color: green"));

        // Set a valid style class on the pane attributes.
        // Also set a style class on the element itself.
        doTestCreateEnclosingElement(attributes,
                                     "<td>" +
View Full Code Here

    // javadoc inherited.
    public void testCreateEnclosingElement() throws Exception {
        // NOTE: This protocol doesn't support style classes and we should never
        // have a class attribute in real life situations. However, this is
        // explicitly set in the super class' method during this test.
        PaneAttributes attributes = new PaneAttributes();
        attributes.setStyles(StylesBuilder.getDeprecatedStyles());

        // Div not supported in HDML
        doTestCreateEnclosingElement(attributes,
                                     "<td/>");
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.PaneAttributes

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.