Package com.volantis.mcs.protocols.layouts

Examples of com.volantis.mcs.protocols.layouts.PaneInstance


            throws LayoutException, RendererException {
        //Create a new pane
        Pane pane = (Pane) createPane();
        //Pretend to get the buffers for two different format instances
        int[] idx = { 2 };
        PaneInstance ctx2 = (PaneInstance) dlContext.getFormatInstance(pane,
                new NDimensionalIndex(idx));
        ctx2.getCurrentBuffer().writeText("non-empty");
        idx[0] = 5;
        PaneInstance ctx5 = (PaneInstance) dlContext.getFormatInstance(pane,
                new NDimensionalIndex(idx));
        ctx5.getCurrentBuffer().writeText("non-empty");
        temporal.setChildAt(pane, 0);
        //Render the format
        TemporalFormatIteratorInstance sfi =
                new TemporalFormatIteratorInstance(
                        NDimensionalIndex.ZERO_DIMENSIONS);
View Full Code Here


        // Set up the required contexts
        testable.setStyleSheetRenderer(CSSStyleSheetRenderer.getSingleton());
        pageContext.setDeviceName("PC-Win32-IE5.5");
        protocol.setMarinerPageContext(pageContext);
        PaneInstance paneInstance = new TestPaneInstance();
        paneInstance.setStyleClass("testStyle");
        pageContext.setFormatInstance(paneInstance);
        protocol.setMarinerPageContext(pageContext);

        TestDeviceLayoutContext deviceContext = new TestDeviceLayoutContext();
        deviceContext.setFormatInstance(pane, NDimensionalIndex.ZERO_DIMENSIONS,
View Full Code Here

        deviceContext.setDeviceLayout(runtimeDeviceLayout);
        context.pushDeviceLayoutContext(deviceContext);
        ContextInternals.setMarinerPageContext(requestContext, context);
        protocol.setMarinerPageContext(context);
        PaneInstance paneInstance = new TestPaneInstance();
        paneInstance.setStyleClass("fred");
        context.setFormatInstance(paneInstance);

        PageHead head = new PageHead();
        testable.setPageHead(head);
        testable.setStyleSheetRenderer(CSSStyleSheetRenderer.getSingleton());
View Full Code Here

        }

        // Javadoc inherited from super class.
        public boolean visit(Pane format, Object object) {

            initialiseFormatInstance(new PaneInstance(index), format);
            // Only visit the topmost format.
            return true;
        }
View Full Code Here

                            PaneAttributes attributes) {
        // If there is a style attribute for the pane and the device supports
        // style sheets then surround the output with a div element unless
        // 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.
            paneInstance.setRendering(rendering);

            if (rendering == PaneRendering.USE_ENCLOSING_TABLE_CELL) {
                Element parent = dom.getCurrentElement();

                addCoreAttributes(parent, attributes);
View Full Code Here

                             PaneAttributes attributes) {
        // If a div tag was generated around the pane, then close it
        if (supportsInlineStyles || supportsExternalStyleSheets) {
            // Record the fact that the table cell was used
            // 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

        createTable = widthHandler.isSignificant(styles);

        if (createTable) {
            // We are forced to use a table. Set the rendering to USE_TABLE
            // so that the closePane does not attempt to close a div element
            PaneInstance paneInstance = (PaneInstance)
                    context.getDeviceLayoutContext().getCurrentFormatInstance(
                            attributes.getPane());
            paneInstance.setRendering(PaneRendering.USE_TABLE);

            openPaneTable(dom, attributes);
        } else {
            super.createEnclosingElement(dom, attributes);
        }
View Full Code Here

                            PaneAttributes attributes) {

        PaneRendering rendering = checkPaneRendering(dom, attributes);

        // Store it away in the PaneInstance for later use.
        PaneInstance paneInstance = (PaneInstance)
                context.getDeviceLayoutContext().getCurrentFormatInstance(
                        attributes.getPane());
        paneInstance.setRendering (rendering);

        if (rendering == PaneRendering.USE_TABLE) {
            openPaneTable(dom, attributes);

        } else if (rendering == PaneRendering.USE_ENCLOSING_TABLE_CELL) {
View Full Code Here

        // If the valign attribute is non-null we are forced to use a table
        // rather than a div element.
        if (verticalAlignHandler.isSignificant(styles)) {
            // We are forced to use a table. Set the rendering to USE_TABLE
            // so that the closePane does not attempt to close a div element
            PaneInstance paneInstance = (PaneInstance)
                    context.getDeviceLayoutContext().getCurrentFormatInstance(
                            attributes.getPane());
            paneInstance.setRendering(PaneRendering.USE_TABLE);

            openPaneTable(dom, attributes);
        } else {
            // Open a new tag and add the style class to this element.
            openDiv(dom, createDivAttributes(attributes));
View Full Code Here

    // javadoc inherited
    protected void closePane(DOMOutputBuffer dom,
                             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

TOP

Related Classes of com.volantis.mcs.protocols.layouts.PaneInstance

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.