Examples of PaneRendering


Examples of com.volantis.mcs.protocols.PaneRendering

            throws Exception {

        TestDOMOutputBuffer dom = new TestDOMOutputBuffer();
        dom.openStyledElement(elementName, attributes);

        PaneRendering actual = protocol.checkPaneRendering(dom, attributes);
        assertEquals("Result shouild match\n" +
                     "EXPECTED: " + expected + "\n" +
                     "ACTUAL  : " + actual + "\n", expected, actual);

    }
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

        Element element = dom.openStyledElement("td", attributes);

        attributes.setPane(pane);
       
        // No width set, return DO_NOTHING.
        PaneRendering result;
        result = protocol.checkPaneCellAttributes(element, attributes);
        assertEquals("Expected ",
                     PaneRendering.DO_NOTHING,
                     result);
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

     * @param attributes the pane attributes
     * @return the rendering style
     */
    private PaneRendering determinePaneRendering(DOMOutputBuffer dom,
                                                   PaneAttributes attributes) {
        PaneRendering rendering = PaneRendering.DO_NOTHING;

        // Check to see whether the enclosing element is a "td" because if
        // it is we could add the pane attributes to it (assuming that they
        // do not clash with existing attributes) instead of creating a div
        // to surround the pane's content
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

        // an enclosing table cell can be used instead
        if (supportsInlineStyles || supportsExternalStyleSheets) {
            PaneInstance paneInstance = (PaneInstance)
                    context.getDeviceLayoutContext().
                    getCurrentFormatInstance(attributes.getPane());
            PaneRendering rendering;

            rendering = determinePaneRendering(dom, attributes);

            // Record the rendering used
            // in the PaneInstance for use in closePane.
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

            // in the PaneInstance for use in closePane.
            PaneInstance paneInstance = (PaneInstance)
                    context.getDeviceLayoutContext().
                    getCurrentFormatInstance(attributes.getPane());

            PaneRendering rendering = paneInstance.getRendering();
            if (rendering == PaneRendering.CREATE_ENCLOSING_ELEMENT) {
                dom.closeElement("div");
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

        Styles styles = attributes.getStyles();
        String value;

        // Call the super class method first.
        PaneRendering rendering = super.checkPaneCellAttributes(
                element, attributes);

        if (rendering == PaneRendering.USE_TABLE) {
            return rendering;
        }
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

        // table.

        // If the enclosing element is not a "td" then if any of the attributes
        // have been set we need to generate a table.

        PaneRendering rendering = checkPaneCellAttributes(element, attributes);
        if (logger.isDebugEnabled()) {
            String name = attributes.getPane().getName();
            if (rendering == PaneRendering.USE_TABLE) {
                logger.debug("Pane " + name + " needs to be rendered as a"
                             + " table as it has attributes which need"
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

    // Javadoc inherited from super class.
    protected void openPane(DOMOutputBuffer dom,
                            PaneAttributes attributes) {

        PaneRendering rendering = checkPaneRendering(dom, attributes);

        // Store it away in the PaneInstance for later use.
        PaneInstance paneInstance = (PaneInstance)
                context.getDeviceLayoutContext().getCurrentFormatInstance(
                        attributes.getPane());
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

                             PaneAttributes attributes) {
        // Get the rendering from the PaneContext.
        PaneInstance paneInstance = (PaneInstance)
                context.getDeviceLayoutContext().getCurrentFormatInstance(
                        attributes.getPane());
        PaneRendering rendering = paneInstance.getRendering();

        if (rendering == PaneRendering.USE_TABLE) {
            closePaneTable(dom, attributes);
        } else if (rendering == PaneRendering.USE_ENCLOSING_TABLE_CELL) {
        } else if (rendering == PaneRendering.CREATE_ENCLOSING_ELEMENT) {
View Full Code Here

Examples of com.volantis.mcs.protocols.PaneRendering

            PaneAttributes attributes) {

        Styles styles = attributes.getStyles();

        // Assume that we don't need to do anything to render this pane.
        PaneRendering rendering = PaneRendering.DO_NOTHING;
        boolean width = widthHandler.isSignificant(styles);
        if (width) {
            if (logger.isDebugEnabled()) {
                logger.debug("Width set to " + width);
            }
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.