Package com.volantis.mcs.layouts

Examples of com.volantis.mcs.layouts.SpatialFormatIterator


        context.setDevice(INTERNAL_DEVICE_FACTORY.createInternalDevice(
            new DefaultDevice(DEVICE_NAME, new HashMap(), null)));
        DOMOutputBuffer buffer = new DOMOutputBuffer();
        buffer.initialise();

        SpatialFormatIterator sfi = new SpatialFormatIterator(canvasLayout);

        SpatialFormatIteratorAttributes sfiAttrs =
                new SpatialFormatIteratorAttributes();
        sfiAttrs.setStyles(StylesBuilder.getDeprecatedStyles());
View Full Code Here


     */
    public void testIsSkippableSpatial1D1() throws Exception
    {       
        privateSetUp();
       
        SpatialFormatIterator sfi = new SpatialFormatIterator(canvasLayout);
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "2");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "2");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "fixed");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "fixed");
        format.setParent(sfi);
       
        index = new NDimensionalIndex(new int[] {0});
        assertTrue("shouldn't skip format.0",
                !createPaneContext(index).ignore());
View Full Code Here

     */
    public void testIsSkippableSpatial1D2() throws Exception
    {
        privateSetUp();
               
        SpatialFormatIterator sfi = new SpatialFormatIterator(canvasLayout);
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "2");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "3");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "variable");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "fixed");
        format.setParent(sfi);
       
        index = new NDimensionalIndex(new int[] {0});
        assertTrue("shouldn't skip format.0",
                !createPaneContext(index).ignore());
View Full Code Here

     */
    public void testIsSkippableSpatial1D3() throws Exception
    {
        privateSetUp();
               
        SpatialFormatIterator sfi = new SpatialFormatIterator(canvasLayout);
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "1");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "3");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "variable");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "variable");
        format.setParent(sfi);
       
        index = new NDimensionalIndex(new int[] {0});
        assertTrue("shouldn't skip format.0",
                !createPaneContext(index).ignore());
View Full Code Here

     */
    public void testIsSkippableSpatial1D4() throws Exception
    {
        privateSetUp();
               
        SpatialFormatIterator sfi = new SpatialFormatIterator(canvasLayout);
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "5");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "0");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "fixed");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "variable");
        format.setParent(sfi);
       
        index = new NDimensionalIndex(new int[] {0});
        assertTrue("shouldn't skip format.0",
                !createPaneContext(index).ignore());
View Full Code Here

     */
    public void testIsSkippableSpatial1D5() throws Exception
    {
        privateSetUp();
               
        SpatialFormatIterator sfi = new SpatialFormatIterator(canvasLayout);
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "0");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "0");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "fixed");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "variable");
        format.setParent(sfi);
       
        index = new NDimensionalIndex(new int[] {0});
        assertTrue("should skip format.0",
                createPaneContext(index).ignore());
View Full Code Here

     */
    public void testIsSkippableSpatial2D() throws Exception
    {  
        privateSetUp();
            
        SpatialFormatIterator sfi = new SpatialFormatIterator(canvasLayout);
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "2");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "0");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "fixed");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "variable");
        sfi.setName("spatial1");

        SpatialFormatIterator sfi2 = new SpatialFormatIterator(canvasLayout);
        sfi2.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "2");
        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);
        format.setParent(grid);
      
        grid.insertChildAt(sfi2, 1);
        sfi2.setParent(grid);

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

     */
    public void testIsSkippableSpatial3D() throws Exception
    {       
        privateSetUp();
       
        SpatialFormatIterator sfi = new SpatialFormatIterator(canvasLayout);
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "2");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMN_COUNT, "2");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROWS, "fixed");
        sfi.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_COLUMNS, "variable");
        sfi.setName("spatial1");

        SpatialFormatIterator sfi2 = new SpatialFormatIterator(canvasLayout);
        sfi2.setAttribute(SpatialFormatIterator.SPATIAL_ITERATOR_ROW_COUNT, "2");
        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");

        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);
        grid2.setParent(sfi2);
        grid2.insertChildAt(format2, 0);
        format2.setParent(grid2);
       
        grid2.insertChildAt(tfi, 1);
        tfi.setParent(grid2);

        grid2.setParent(sfi2);

        grid.setRows(2);
        grid.setColumns(1);
        grid.setParent(sfi);
        grid.insertChildAt(format, 0);
        format.setParent(grid);
      
        grid.insertChildAt(sfi2, 1);
        sfi2.setParent(grid);
        index = new NDimensionalIndex(new int[] {0});
        assertTrue("shouldn't skip format.0",
                !createPaneContext(index).ignore());
       
View Full Code Here

     * Return a property filled SpatialFormatIteratorAttributes for testing
     * @return SpatialFormatIteratorAttributes
     */
    protected SpatialFormatIteratorAttributes getSpatialFormatIteratorAttributes() {
        SpatialFormatIteratorAttributes attr = new SpatialFormatIteratorAttributes();
        final SpatialFormatIterator spatial = new SpatialFormatIterator(canvasLayout);
        spatial.setColumns(1);
        attr.setFormat(spatial);
        attr.setStyles(StylesBuilder.getDeprecatedStyles());
        return attr;
    }
View Full Code Here

        tfiInstance = new TemporalFormatIteratorInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
        tfiInstance.setDeviceLayoutContext(deviceLayoutContext);
        tfiInstance.setFormat(tfi);

        sfi = new SpatialFormatIterator(null);
        sfi.setInstance(3);

        sfiInstance = new SpatialFormatIteratorInstance(
                NDimensionalIndex.ZERO_DIMENSIONS);
        sfiInstance.setDeviceLayoutContext(deviceLayoutContext);
View Full Code Here

TOP

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

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.