Package nextapp.echo2.webcontainer.syncpeer

Examples of nextapp.echo2.webcontainer.syncpeer.GridProcessor$Cell


        GridLayoutData gridLayoutData = new GridLayoutData();
        gridLayoutData.setRowSpan(3);
        label.setLayoutData(gridLayoutData);
        grid.add(label);
       
        GridProcessor gridProcessor = new GridProcessor(grid);
        assertEquals(1, gridProcessor.getColumnCount());
        assertEquals(1, gridProcessor.getRowCount());
    }
View Full Code Here


        layoutData.setColumnSpan(3);
        horizontalCollider.setLayoutData(layoutData);
        grid.add(horizontalCollider);
        grid.add(new Label("2"));
        grid.add(new Label("3"));
        GridProcessor gridProcessor = new GridProcessor(grid);
        assertEquals("0", ((Label) gridProcessor.getContent(0, 0)).getText());
        assertEquals("VC", ((Label) gridProcessor.getContent(1, 0)).getText());
        assertEquals("1", ((Label) gridProcessor.getContent(2, 0)).getText());
        assertEquals("HC", ((Label) gridProcessor.getContent(0, 1)).getText());
        assertEquals("VC", ((Label) gridProcessor.getContent(1, 1)).getText());
        assertEquals("2", ((Label) gridProcessor.getContent(2, 1)).getText());
        assertEquals("3", ((Label) gridProcessor.getContent(0, 2)).getText());
        assertEquals("VC", ((Label) gridProcessor.getContent(1, 2)).getText());
    }
View Full Code Here

        GridLayoutData layoutData = new GridLayoutData();
        layoutData.setRowSpan(4);
        label.setLayoutData(layoutData);
        grid.add(label);
       
        GridProcessor gridProcessor =  new GridProcessor(grid);

        // Verify Grid size is correct.
        assertEquals(2, gridProcessor.getColumnCount());
        assertEquals(2, gridProcessor.getRowCount());
       
        // Verify components are at correct positions.
        assertEquals(0, gridProcessor.getComponentIndex(0, 0));
        assertEquals(1, gridProcessor.getComponentIndex(1, 0));
        assertEquals(-1, gridProcessor.getComponentIndex(0, 1));
        assertEquals(1, gridProcessor.getComponentIndex(1, 1));
       
        // Verify x-spans were untouched.
        assertEquals(1, gridProcessor.getColumnSpan(0, 0));
        assertEquals(1, gridProcessor.getColumnSpan(1, 0));
        assertEquals(-1, gridProcessor.getColumnSpan(0, 1));
        assertEquals(1, gridProcessor.getColumnSpan(1, 1));

        // Verify y-spans were properly reduced.
        assertEquals(1, gridProcessor.getRowSpan(0, 0));
        assertEquals(2, gridProcessor.getRowSpan(1, 0));
        assertEquals(-1, gridProcessor.getRowSpan(0, 1));
        assertEquals(2, gridProcessor.getRowSpan(1, 1));
    }
View Full Code Here

        grid.setColumnWidth(3, new Extent(8));
        grid.setColumnWidth(4, new Extent(16));
        grid.setColumnWidth(5, new Extent(32));
        grid.setColumnWidth(6, new Extent(64));

        GridProcessor gridProcessor = new GridProcessor(grid);
       
        // Verify Grid size is correct.
        assertEquals(5, gridProcessor.getColumnCount());
        assertEquals(3, gridProcessor.getRowCount());
       
        // Verify components are at correct positions.
        assertEquals(0, gridProcessor.getComponentIndex(0, 0));
        assertEquals(1, gridProcessor.getComponentIndex(1, 0));
        assertEquals(2, gridProcessor.getComponentIndex(2, 0));
        assertEquals(2, gridProcessor.getComponentIndex(3, 0));
        assertEquals(3, gridProcessor.getComponentIndex(4, 0));
        assertEquals(4, gridProcessor.getComponentIndex(0, 1));
        assertEquals(5, gridProcessor.getComponentIndex(1, 1));
        assertEquals(6, gridProcessor.getComponentIndex(2, 1));
        assertEquals(7, gridProcessor.getComponentIndex(3, 1));
        assertEquals(8, gridProcessor.getComponentIndex(4, 1));
        assertEquals(9, gridProcessor.getComponentIndex(0, 2));
        assertEquals(10, gridProcessor.getComponentIndex(1, 2));
        assertEquals(11, gridProcessor.getComponentIndex(2, 2));
        assertEquals(11, gridProcessor.getComponentIndex(3, 2));
        assertEquals(8, gridProcessor.getComponentIndex(4, 2));
       
        // Verify x-spans were property reduced.
        assertEquals(1, gridProcessor.getColumnSpan(0, 0));
        assertEquals(1, gridProcessor.getColumnSpan(1, 0));
        assertEquals(2, gridProcessor.getColumnSpan(2, 0));
        assertEquals(2, gridProcessor.getColumnSpan(3, 0));
        assertEquals(1, gridProcessor.getColumnSpan(4, 0));
        assertEquals(1, gridProcessor.getColumnSpan(0, 1));
        assertEquals(1, gridProcessor.getColumnSpan(1, 1));
        assertEquals(1, gridProcessor.getColumnSpan(2, 1));
        assertEquals(1, gridProcessor.getColumnSpan(3, 1));
        assertEquals(1, gridProcessor.getColumnSpan(4, 1));
        assertEquals(1, gridProcessor.getColumnSpan(0, 2));
        assertEquals(1, gridProcessor.getColumnSpan(1, 2));
        assertEquals(2, gridProcessor.getColumnSpan(2, 2));
        assertEquals(2, gridProcessor.getColumnSpan(3, 2));
        assertEquals(1, gridProcessor.getColumnSpan(4, 2));
       
        // Verify y-spans were untouched.
        assertEquals(1, gridProcessor.getRowSpan(0, 0));
        assertEquals(1, gridProcessor.getRowSpan(1, 0));
        assertEquals(1, gridProcessor.getRowSpan(2, 0));
        assertEquals(1, gridProcessor.getRowSpan(3, 0));
        assertEquals(1, gridProcessor.getRowSpan(4, 0));
        assertEquals(1, gridProcessor.getRowSpan(0, 1));
        assertEquals(1, gridProcessor.getRowSpan(1, 1));
        assertEquals(1, gridProcessor.getRowSpan(3, 1));
        assertEquals(2, gridProcessor.getRowSpan(4, 1));
        assertEquals(1, gridProcessor.getRowSpan(0, 2));
        assertEquals(1, gridProcessor.getRowSpan(1, 2));
        assertEquals(1, gridProcessor.getRowSpan(2, 2));
        assertEquals(1, gridProcessor.getRowSpan(3, 2));
        assertEquals(2, gridProcessor.getRowSpan(4, 2));
       
        // Verify column sizes were properly combined.
        assertEquals(new Extent(1), gridProcessor.getColumnWidth(0));
        assertEquals(new Extent(6), gridProcessor.getColumnWidth(1));
        assertEquals(new Extent(8), gridProcessor.getColumnWidth(2));
        assertEquals(new Extent(16), gridProcessor.getColumnWidth(3));
        assertEquals(new Extent(96), gridProcessor.getColumnWidth(4));
    }
View Full Code Here

                layoutData.setColumnSpan(2);
                label.setLayoutData(layoutData);
            }
            grid.add(label);
        }
        GridProcessor gridProcessor = new GridProcessor(grid);
        assertEquals(3, gridProcessor.getColumnCount());
        assertEquals(2, gridProcessor.getRowCount());
        assertEquals(0, gridProcessor.getComponentIndex(0, 0));
        assertEquals(1, gridProcessor.getComponentIndex(1, 0));
        assertEquals(2, gridProcessor.getComponentIndex(2, 0));
        assertEquals(3, gridProcessor.getComponentIndex(0, 1));
        assertEquals(4, gridProcessor.getComponentIndex(1, 1));
        assertEquals(5, gridProcessor.getComponentIndex(2, 1));
    }
View Full Code Here

        grid.setRowHeight(3, new Extent(8));
        grid.setRowHeight(4, new Extent(16));
        grid.setRowHeight(5, new Extent(32));
        grid.setRowHeight(6, new Extent(64));

        GridProcessor gridProcessor = new GridProcessor(grid);
       
        // Verify Grid size is correct.
        assertEquals(3, gridProcessor.getColumnCount());
        assertEquals(5, gridProcessor.getRowCount());

        // Verify components are at correct positions.
        assertEquals(0, gridProcessor.getComponentIndex(0, 0));
        assertEquals(1, gridProcessor.getComponentIndex(1, 0));
        assertEquals(2, gridProcessor.getComponentIndex(2, 0));
        assertEquals(3, gridProcessor.getComponentIndex(0, 1));
        assertEquals(4, gridProcessor.getComponentIndex(1, 1));
        assertEquals(5, gridProcessor.getComponentIndex(2, 1));
        assertEquals(6, gridProcessor.getComponentIndex(0, 2));
        assertEquals(7, gridProcessor.getComponentIndex(1, 2));
        assertEquals(8, gridProcessor.getComponentIndex(2, 2));
        assertEquals(6, gridProcessor.getComponentIndex(0, 3));
        assertEquals(9, gridProcessor.getComponentIndex(1, 3));
        assertEquals(8, gridProcessor.getComponentIndex(2, 3));
        assertEquals(10, gridProcessor.getComponentIndex(0, 4));
        assertEquals(11, gridProcessor.getComponentIndex(1, 4));
        assertEquals(11, gridProcessor.getComponentIndex(2, 4));
       
        // Verify x-spans were untouched.
        assertEquals(1, gridProcessor.getColumnSpan(0, 0));
        assertEquals(1, gridProcessor.getColumnSpan(1, 0));
        assertEquals(1, gridProcessor.getColumnSpan(2, 0));
        assertEquals(1, gridProcessor.getColumnSpan(0, 1));
        assertEquals(1, gridProcessor.getColumnSpan(1, 1));
        assertEquals(1, gridProcessor.getColumnSpan(2, 1));
        assertEquals(1, gridProcessor.getColumnSpan(0, 2));
        assertEquals(1, gridProcessor.getColumnSpan(1, 2));
        assertEquals(1, gridProcessor.getColumnSpan(2, 2));
        assertEquals(1, gridProcessor.getColumnSpan(0, 3));
        assertEquals(1, gridProcessor.getColumnSpan(1, 3));
        assertEquals(1, gridProcessor.getColumnSpan(2, 3));
        assertEquals(1, gridProcessor.getColumnSpan(0, 4));
        assertEquals(2, gridProcessor.getColumnSpan(1, 4));
        assertEquals(2, gridProcessor.getColumnSpan(2, 4));
       
        // Verify y-spans were properly reduced.
        assertEquals(1, gridProcessor.getRowSpan(0, 0));
        assertEquals(1, gridProcessor.getRowSpan(1, 0));
        assertEquals(1, gridProcessor.getRowSpan(2, 0));
        assertEquals(1, gridProcessor.getRowSpan(0, 1));
        assertEquals(1, gridProcessor.getRowSpan(1, 1));
        assertEquals(1, gridProcessor.getRowSpan(2, 1));
        assertEquals(2, gridProcessor.getRowSpan(0, 2));
        assertEquals(1, gridProcessor.getRowSpan(1, 2));
        assertEquals(2, gridProcessor.getRowSpan(2, 2));
        assertEquals(2, gridProcessor.getRowSpan(0, 3));
        assertEquals(1, gridProcessor.getRowSpan(1, 3));
        assertEquals(2, gridProcessor.getRowSpan(2, 3));
        assertEquals(1, gridProcessor.getRowSpan(0, 4));
        assertEquals(1, gridProcessor.getRowSpan(1, 4));
        assertEquals(1, gridProcessor.getRowSpan(2, 4));
       
        // Verify column sizes were properly combined.
        assertEquals(new Extent(1), gridProcessor.getRowHeight(0));
        assertEquals(new Extent(6), gridProcessor.getRowHeight(1));
        assertEquals(new Extent(8), gridProcessor.getRowHeight(2));
        assertEquals(new Extent(16), gridProcessor.getRowHeight(3));
        assertEquals(new Extent(96), gridProcessor.getRowHeight(4));
    }
View Full Code Here

                layoutData.setRowSpan(2);
                label.setLayoutData(layoutData);
            }
            grid.add(label);
        }
        GridProcessor gridProcessor = new GridProcessor(grid);
        assertEquals(2, gridProcessor.getColumnCount());
        assertEquals(3, gridProcessor.getRowCount());
        assertEquals(0, gridProcessor.getComponentIndex(0, 0));
        assertEquals(1, gridProcessor.getComponentIndex(1, 0));
        assertEquals(2, gridProcessor.getComponentIndex(0, 1));
        assertEquals(3, gridProcessor.getComponentIndex(1, 1));
        assertEquals(4, gridProcessor.getComponentIndex(0, 2));
        assertEquals(5, gridProcessor.getComponentIndex(1, 2));
    }
View Full Code Here

                label.setLayoutData(layoutData);
            }
            grid.add(label);
        }

        GridProcessor gridProcessor = new GridProcessor(grid);
       
        // Verify Grid size is correct.
        assertEquals(2, gridProcessor.getColumnCount());
        assertEquals(2, gridProcessor.getRowCount());

        // Verify components are at correct positions.
        assertEquals(0, gridProcessor.getComponentIndex(0, 0));
        assertEquals(1, gridProcessor.getComponentIndex(1, 0));
        assertEquals(2, gridProcessor.getComponentIndex(0, 1));
        assertEquals(3, gridProcessor.getComponentIndex(1, 1));
       
        // Verify x-spans were properly reduced.
        assertEquals(1, gridProcessor.getColumnSpan(0, 0));
        assertEquals(1, gridProcessor.getColumnSpan(1, 0));
        assertEquals(1, gridProcessor.getColumnSpan(0, 1));
        assertEquals(1, gridProcessor.getColumnSpan(1, 1));

        // Verify y-spans were properly reduced.
        assertEquals(1, gridProcessor.getRowSpan(0, 0));
        assertEquals(1, gridProcessor.getRowSpan(1, 0));
        assertEquals(1, gridProcessor.getRowSpan(0, 1));
        assertEquals(1, gridProcessor.getRowSpan(1, 1));
    }
View Full Code Here

                label.setLayoutData(layoutData);
            }
            grid.add(label);
        }

        GridProcessor gridProcessor = new GridProcessor(grid);
       
        // Verify Grid size is correct.
        assertEquals(2, gridProcessor.getColumnCount());
        assertEquals(3, gridProcessor.getRowCount());

        // Verify components are at correct positions.
        assertEquals(0, gridProcessor.getComponentIndex(0, 0));
        assertEquals(1, gridProcessor.getComponentIndex(1, 0));
        assertEquals(2, gridProcessor.getComponentIndex(0, 1));
        assertEquals(3, gridProcessor.getComponentIndex(1, 1));
        assertEquals(4, gridProcessor.getComponentIndex(0, 2));
        assertEquals(5, gridProcessor.getComponentIndex(1, 2));

        // Verify x-spans were properly reduced.
        assertEquals(1, gridProcessor.getColumnSpan(0, 0));
        assertEquals(1, gridProcessor.getColumnSpan(1, 0));
        assertEquals(1, gridProcessor.getColumnSpan(0, 1));
        assertEquals(1, gridProcessor.getColumnSpan(1, 1));
        assertEquals(1, gridProcessor.getColumnSpan(0, 2));
        assertEquals(1, gridProcessor.getColumnSpan(1, 2));

        // Verify y-spans were untouched.
        assertEquals(1, gridProcessor.getRowSpan(0, 0));
        assertEquals(1, gridProcessor.getRowSpan(1, 0));
        assertEquals(1, gridProcessor.getRowSpan(0, 1));
        assertEquals(1, gridProcessor.getRowSpan(1, 1));
        assertEquals(1, gridProcessor.getRowSpan(0, 2));
        assertEquals(1, gridProcessor.getRowSpan(1, 2));
    }
View Full Code Here

                label.setLayoutData(layoutData);
            }
            grid.add(label);
        }
       
        GridProcessor gridProcessor = new GridProcessor(grid);
       
        // Verify Grid size is correct.
        assertEquals(3, gridProcessor.getColumnCount());
        assertEquals(2, gridProcessor.getRowCount());
       
        // Verify components are at correct positions.
        assertEquals(0, gridProcessor.getComponentIndex(0, 0));
        assertEquals(1, gridProcessor.getComponentIndex(1, 0));
        assertEquals(2, gridProcessor.getComponentIndex(2, 0));
        assertEquals(3, gridProcessor.getComponentIndex(0, 1));
        assertEquals(4, gridProcessor.getComponentIndex(1, 1));
        assertEquals(5, gridProcessor.getComponentIndex(2, 1));

        // Verify x-spans were untouched.
        assertEquals(1, gridProcessor.getColumnSpan(0, 0));
        assertEquals(1, gridProcessor.getColumnSpan(1, 0));
        assertEquals(1, gridProcessor.getColumnSpan(2, 0));
        assertEquals(1, gridProcessor.getColumnSpan(0, 1));
        assertEquals(1, gridProcessor.getColumnSpan(1, 1));
        assertEquals(1, gridProcessor.getColumnSpan(2, 1));

        // Verify y-spans were properly reduced.
        assertEquals(1, gridProcessor.getRowSpan(0, 0));
        assertEquals(1, gridProcessor.getRowSpan(1, 0));
        assertEquals(1, gridProcessor.getRowSpan(2, 0));
        assertEquals(1, gridProcessor.getRowSpan(0, 1));
        assertEquals(1, gridProcessor.getRowSpan(1, 1));
        assertEquals(1, gridProcessor.getRowSpan(2, 1));
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.webcontainer.syncpeer.GridProcessor$Cell

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.