Package com.volantis.mcs.runtime.layouts

Examples of com.volantis.mcs.runtime.layouts.RuntimeDeviceLayout


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

        // Activate the device layout.
        RuntimeDeviceLayout runtimeDeviceLayout1 =
                RuntimeDeviceLayoutTestHelper.activate(canvasLayout);
        RuntimeDeviceLayout runtimeDeviceLayout =
                runtimeDeviceLayout1;

        MarinerRequestContext requestContext = new TestMarinerRequestContext();
        context = new TestMarinerPageContext();
        context.pushRequestContext(requestContext);
View Full Code Here


     */
     protected RegionInstance createAnonymousRegion(MarinerPageContext pageContext)
         throws XDIMEException {
         try {
             // Create a layout containing a simple region.
             RuntimeDeviceLayout anonymousLayout = createAnonymousRegionLayout();
        
             // Create a context for the layout and push it onto the page context.
             DeviceLayoutContext deviceLayoutContext = new DeviceLayoutContext();
            
             deviceLayoutContext.setMarinerPageContext(pageContext);
             deviceLayoutContext.setDeviceLayout(anonymousLayout);
             deviceLayoutContext.initialise();
             pageContext.pushDeviceLayoutContext(deviceLayoutContext);
        
             // Get an instance of the layout's region.
             Region region = (Region) anonymousLayout.getRootFormat();
             RegionInstance anonymousRegionInstance = (RegionInstance)
                     pageContext.getFormatInstance(region,
                             NDimensionalIndex.ZERO_DIMENSIONS);
        
             return anonymousRegionInstance;
View Full Code Here

         // Activate it to turn it into a runtime device layout
         LayoutContentActivator activator = new LayoutContentActivator();
         final ActivatedLayoutContent activatedLayoutContent =
                 activator.activateLayoutContent(styleSheetActivator,
                         (InternalLayoutContent) layoutContent.getContent());
         RuntimeDeviceLayout runtimeLayout = new RuntimeLayoutAdapter(
                 "<anonymous>", layout,
                 activatedLayoutContent.getCompiledStyleSheet(),
                 activatedLayoutContent.getContainerNameToFragments());

         return runtimeLayout;
View Full Code Here

        String requestValue;
        PageGenerationCache pageGenerationCache
                = pageContext.getPageGenerationCache();

        RuntimeDeviceLayout deviceLayout =
                pageContext.getDeviceLayout();
        String defaultFragmentName = deviceLayout.getDefaultFragmentName();
        boolean isDefault = true;
        if (defaultFragmentName == null
                || !fragmentName.equals(defaultFragmentName)) {
            isDefault = false;
        }
View Full Code Here

        // Pop spatial
        builder.popFormat();

        Layout layout = builder.getLayout();

        RuntimeDeviceLayout runtimeDeviceLayout =
                RuntimeDeviceLayoutTestHelper.activate(layout);

        return runtimeDeviceLayout;
    }
View Full Code Here

    public void notestStyling()
            throws Exception {

        // Create and activate the runtime device layout.
        RuntimeDeviceLayout runtimeDeviceLayout = createRuntimeDeviceLayout();
        SpatialFormatIterator spatialFormatIterator = (SpatialFormatIterator)
                runtimeDeviceLayout.getRootFormat();

        // Initialise the device layout and page contexts.
        DeviceLayoutContext deviceLayoutContext = new DeviceLayoutContext();
//        deviceLayoutContext.setStylingFactory(StylingFactory.getDefaultInstance());
//        deviceLayoutContext.setFormatStylingEngine(
View Full Code Here

        // Original protocol object, note this will be cloned by the
        // MarinerPageContext and the clone used.
        DOMProtocol protocol = createProtocol();

        // Create a basic layout object
        RuntimeDeviceLayout deviceLayout = createDeviceLayout();

        RuntimeTestMarinerPageContext pageContext = new RuntimeTestMarinerPageContext();
        RuntimeTestMarinerRequestContext requestContext = new RuntimeTestMarinerRequestContext();
        EnvironmentContext environmentContext = new RuntimeTestEnvironmentContext();
        ((RuntimeTestEnvironmentContext)environmentContext)
View Full Code Here

     * @throws RepositoryException
     */
    protected RuntimeDeviceLayout createDeviceLayout()
            throws RepositoryException {

        RuntimeDeviceLayout result = null;

        LayoutBuilder builder = new LayoutBuilder(new RuntimeLayoutFactory());

        builder.createLayout(LayoutType.CANVAS);

View Full Code Here

        String value;

        Element element = dom.openElement("wml");

        RuntimeDeviceLayout layout = context.getDeviceLayout();

        if (layout != null) {
            if ((value = layout.getLayoutGroupName()) != null) {
                String baseDir
                        = context.getVolantisBean().getModeSetsBase();

                value = baseDir + "/" + value + ".wml";
View Full Code Here

    }

    protected void processBodyBuffer(DOMOutputBuffer buffer) {
        super.processBodyBuffer(buffer);

        RuntimeDeviceLayout deviceLayout = context.getDeviceLayout();
        String destinationLayout = deviceLayout.getDestinationLayout();
        if (destinationLayout == null
                || destinationLayout.length() == 0) {
            return;
        }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.layouts.RuntimeDeviceLayout

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.