Package com.volantis.mcs.layouts

Examples of com.volantis.mcs.layouts.Format


     * @return A collection of valid names for the specified target
     */
    public Collection getValidNames(Layout layout, DefaultTargetType type) {
        DefaultTargetCollector descriptor =
                new DefaultTargetCollector(type);
        Format format = layout.getRootFormat();
        if (format != null) {
            format.visit(this, descriptor);
        }
        return descriptor.getValues();
    }
View Full Code Here


       
        TemporalFormatIterator tfi = new TemporalFormatIterator(canvasLayout);
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELL_COUNT, "0");
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELLS, "variable");

        Format format2 = new Pane(canvasLayout);
        format2.setName("pane2");
        pageContext.addPaneMapping((Pane)format2);

        grid.setRows(1);
        grid.setColumns(2);
        grid.setParent(tfi);
        grid.insertChildAt(format, 0);
        format.setParent(grid);
       
        grid.insertChildAt(format2, 1);
        format2.setParent(grid);

        index = new NDimensionalIndex(new int[] {0});
        assertTrue("shouldn't skip format.0",
                !createPaneContext(index).ignore());
       
View Full Code Here

       
        TemporalFormatIterator tfi = new TemporalFormatIterator(canvasLayout);
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELL_COUNT, "4");
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELLS, "fixed");

        Format format2 = new Pane(canvasLayout);
        format2.setName("pane2");
        pageContext.addPaneMapping((Pane)format2);

        grid.setRows(1);
        grid.setColumns(2);
        grid.setParent(tfi);
        grid.insertChildAt(format, 0);
        format.setParent(grid);
       
        grid.insertChildAt(format2, 1);
        format2.setParent(grid);

        index = new NDimensionalIndex(new int[] {0});
        assertTrue("shouldn't skip format.0",
                !createPaneContext(index).ignore());
       
View Full Code Here

       
        TemporalFormatIterator tfi = new TemporalFormatIterator(canvasLayout);
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELL_COUNT, "4");
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELLS, "variable");

        Format format2 = new Pane(canvasLayout);
        format2.setName("pane2");
        pageContext.addPaneMapping((Pane)format2);

        grid.setRows(1);
        grid.setColumns(2);
        grid.setParent(tfi);
        grid.insertChildAt(format, 0);
        format.setParent(grid);
       
        grid.insertChildAt(format2, 1);
        format2.setParent(grid);

        index = new NDimensionalIndex(new int[] {0});
        assertTrue("shouldn't skip format.0",
                !createPaneContext(index).ignore());
       
View Full Code Here

       
        TemporalFormatIterator tfi = new TemporalFormatIterator(canvasLayout);
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELL_COUNT, "0");
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELLS, "fixed");

        Format format2 = new Pane(canvasLayout);
        format2.setName("pane2");
        pageContext.addPaneMapping((Pane)format2);

        grid.setRows(1);
        grid.setColumns(2);
        grid.setParent(tfi);
        grid.insertChildAt(format, 0);
        format.setParent(grid);
       
        grid.insertChildAt(format2, 1);
        format2.setParent(grid);

        index = new NDimensionalIndex(new int[] {0});
        assertTrue("should skip format.0", createPaneContext(index).ignore());
       
        index = new NDimensionalIndex(new int[] {1});
View Full Code Here

        sfi2.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "3");
        sfi2.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "fixed");
        sfi2.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "fixed");
        sfi2.setName("spatial2");

        Format format2 = new Pane(canvasLayout);
        format2.setName("pane2");
        pageContext.addPaneMapping((Pane)format2);
        format2.setParent(sfi2);

        grid.setRows(1);
        grid.setColumns(2);
        grid.setParent(sfi);
        grid.insertChildAt(format, 0);
View Full Code Here

        TemporalFormatIterator tfi = new TemporalFormatIterator(canvasLayout);
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELL_COUNT, "4");
        tfi.setAttribute(TemporalFormatIterator.TEMPORAL_ITERATOR_CELLS, "variable");
        tfi.setName("temporal");

        Format format2 = new Pane(canvasLayout);
        format2.setName("pane2");
        pageContext.addPaneMapping((Pane)format2);

        Format format3 = new Pane(canvasLayout);
        format3.setName("pane3");
        pageContext.addPaneMapping((Pane)format3);
        format3.setParent(tfi);

        Grid grid2 = new Grid(canvasLayout);
        grid2.setName("grid2");      
        grid2.setRows(2);
        grid2.setColumns(1);
View Full Code Here

    /**
     * Test the getPane() method.
     */
    public void testGetPane() throws RepositoryException {
        Format pane = new Pane(canvasLayout);
        pane.setName("pane");

        activateAndSetDeviceLayout();

        assertSame(pane, context.getPane("pane"));

        Fragment fragment = new Fragment(canvasLayout);
        Format dp = new DissectingPane(canvasLayout);
        dp.setName("dissectingPane");
        canvasLayout.removeFormat(dp);
        fragment.addFormat(dp);

        activateAndSetDeviceLayout();

View Full Code Here

        context.setCurrentFragment(fragment);

        assertSame(fragment, context.getCurrentFragment());

        Format pane = new Pane(canvasLayout);
        pane.setName("pane");


        assertSame(pane, context.getPane("pane"));

        Format dp = new DissectingPane(canvasLayout);
        dp.setName("dissectingPane");
        canvasLayout.removeFormat(dp);
        fragment.addFormat(dp);

        context.setCurrentFragment(fragment);
View Full Code Here

            // Populate the attributes map with the corrected case values for
            // each attribute name. E.g. 'Name' maps to 'name'.
            Iterator iterator = formats.iterator();
            StringBuffer newName = new StringBuffer();
            while (iterator.hasNext()) {
                Format format = (Format) iterator.next();
                String[] attrs = format.getUserAttributes();
                for (int i = 0; i < attrs.length; i++) {
                    if (!attributeMap.containsKey(attrs[i])) {
                        newName.setLength(0);
                        newName.append(StringUtils.toLowerIgnoreLocale(
                                String.valueOf(attrs[i].charAt(0))));
View Full Code Here

TOP

Related Classes of com.volantis.mcs.layouts.Format

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.