Examples of DeviceLayoutRegionContent


Examples of com.volantis.mcs.protocols.DeviceLayoutRegionContent

        // If we have been included in a region then we mustn't throw the
        // DeviceLayoutContext away, we must add it to the region context.
        if (pageContext.getDeviceLayoutContext() != null) {
            if (pageContext.getEnclosingRegionInstance() != null) {
                pageContext.getEnclosingRegionInstance().addRegionContent(
                        new DeviceLayoutRegionContent(
                                pageContext.getDeviceLayoutContext()));
            }
        }
        if (pageContext.getDeviceLayoutContext() != null) {
            pageContext.popDeviceLayoutContext();
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutRegionContent

            pageContext.popDeviceLayoutContext();

            // If the layout being popped was included in a region then we must
            // add it to the enclosing region context (or it will be lost).
            RegionContent regionContent =
                    new DeviceLayoutRegionContent(layoutContext);
            containingRegionInstance.addRegionContent(regionContent);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.DeviceLayoutRegionContent

        TabsContext context = getCurrentContext();

        // pop labels deviceLayoutContext
        DeviceLayoutContext labelsLayoutToPop = context.getPageContext()
                .getDeviceLayoutContext();
        RegionContent labelsRegionContent = new DeviceLayoutRegionContent(
                labelsLayoutToPop);
        context.getPageContext().popDeviceLayoutContext();

        // pop tab's content RegionInstance
        context.getPageContext().popContainerInstance(getContentsRegionInstance());

        DOMOutputBuffer mainBuffer = getCurrentBuffer(protocol);

        Styles contentsTrStyle = StylingFactory.getDefaultInstance()
          .createInheritedStyles(
            protocol.getMarinerPageContext().getStylingEngine()
            .getStyles(), DisplayKeywords.TABLE_ROW);
               
        // Create tr element for labels in main buffer       
        Element labelsTrElem = mainBuffer.openStyledElement("tr", contentsTrStyle);
       
        labelsTrElem.setAttribute("id", protocol.getMarinerPageContext()
                .generateUniqueFCID());
        // set in order to label occupy only area for content
        labelsTrElem.setAttribute("style", "height: 1px");

        setElementLocked(protocol, labelsTrElem);

        // get main RegionInstance
        ContainerInstance containingInstance = context.getPageContext()
                .getCurrentContainerInstance();

        containingInstance.getCurrentBuffer().transferContentsFrom(
                getLabelsRegionInstance().getCurrentBuffer());
       
        renderTabStripFiller(mainBuffer);
        // Increase colspan for tab strip filler
        context.addColspan(1);

        // Close labels tr
        mainBuffer.closeElement("tr");

        // Create tr element for contents in main buffer               
        Element contentsTrElem = mainBuffer.openStyledElement("tr", contentsTrStyle);
       
        contentsTrElem.setAttribute("id", protocol.getMarinerPageContext()
                .generateUniqueFCID());
        setElementLocked(protocol, contentsTrElem);

        // Create td element with proper style
        Styles contentsTdStyle = StylingFactory.getDefaultInstance()
          .createInheritedStyles(
                 protocol.getMarinerPageContext().getStylingEngine()           
            .getStyles(), DisplayKeywords.TABLE_CELL);
       
        Element contentsTdElem = mainBuffer.openStyledElement("td",
                contentsTdStyle);
        String contentId = protocol.getMarinerPageContext()
                .generateUniqueFCID();
        context.setContentId(contentId);
        contentsTdElem.setAttribute("id", contentId);
        contentsTdElem.setAttribute("colspan", "" + context.getColspan());
        setElementLocked(protocol, contentsTdElem);
        contentsTdElem.getStyles().getPropertyValues()
                .setComputedAndSpecifiedValue(
                        StylePropertyDetails.VERTICAL_ALIGN,
                        VerticalAlignKeywords.TOP);

        // Insert tab contents buffer to main buffer
        // mainBuffer.addOutputBuffer(tabsBuffer);

        // pop tab's contents deviceLayoutContext
        DeviceLayoutContext contentsLayoutToPop = context.getPageContext()
                .getDeviceLayoutContext();
        RegionContent contentsRegionContent = new DeviceLayoutRegionContent(
                contentsLayoutToPop);
        context.getPageContext().popDeviceLayoutContext();

        // add contentsRegionContent to main RegionInstance
        containingInstance.getCurrentBuffer().transferContentsFrom(
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.