Examples of GridLayoutData


Examples of nextapp.echo2.app.layout.GridLayoutData

    @Override
    protected void initPanel() {
        colMain.add(tpMain);

        ContentPane cpStdData = new ContentPane();
        GridLayoutData ld3Columns = new GridLayoutData();
        ld3Columns.setColumnSpan(3);

        grdMain = new JbsGrid(4);
        grdMain.setInsets(new Insets(5, 5));
        grdMain.setColumnWidth(0, new JbsExtent(300));
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

        Grid layoutGrid = new Grid();
        layoutGrid.setStyleName("LoginScreen.LayoutGrid");
        splitPane.add(layoutGrid);

        Column warningColumn = new Column();
        GridLayoutData gridLayoutData = new GridLayoutData();
        gridLayoutData.setColumnSpan(2);
        warningColumn.setLayoutData(gridLayoutData);
        layoutGrid.add(warningColumn);
       
        label = new Label(Messages.getString("LoginScreen.WarningTitle"));
        label.setStyleName("LoginScreen.WarningTitle");
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

    public void testLayoutData() {
        NullComponent c = new NullComponent();
        assertNull(c.getLayoutData());
        PropertyChangeEvaluator pce = new PropertyChangeEvaluator();
        c.addPropertyChangeListener(pce);
        GridLayoutData data = new GridLayoutData();
        data.setColumnSpan(2);
        c.setLayoutData(data);
        assertEquals(2, ((GridLayoutData) c.getLayoutData()).getColumnSpan());
        assertEquals(Component.PROPERTY_LAYOUT_DATA, pce.lastEvent.getPropertyName());
    }
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

        in.close();
    }
   
    public void testBasic() {
        Style alphaStyle = styleSheet.getStyle(Column.class, "alpha");
        GridLayoutData layoutData = (GridLayoutData) alphaStyle.getProperty(Component.PROPERTY_LAYOUT_DATA);
        assertEquals(2, layoutData.getColumnSpan());
        assertEquals(1, layoutData.getRowSpan());
        assertEquals(new Color(0xabcdef), layoutData.getBackground());
        assertEquals(new Insets(20, 30), layoutData.getInsets());
        assertNotNull(layoutData.getBackgroundImage());
        ImageReference imageReference = layoutData.getBackgroundImage().getImage();
        assertNotNull(imageReference);
        assertTrue(imageReference instanceof ResourceImageReference);
        assertEquals("nextapp/echo2/test/componentxml/BackgroundImage.png",
                ((ResourceImageReference) imageReference).getResource());
    }
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

     *
     * @param text the header text
     */
    public void addHeaderRow(String text) {
        Label label = new Label(text);
        GridLayoutData layoutData = new GridLayoutData();
        layoutData.setBackground(HEADER_CELL_BACKGROUND);
        layoutData.setColumnSpan(2);
        label.setLayoutData(layoutData);
        add(label);
    }
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

     * @param descriptor a description of the item
     * @param testComponent the item <code>Component</code>
     */
    public void addTestRow(String descriptor, Component testComponent) {
        Label label = new Label(descriptor);
        GridLayoutData layoutData = new GridLayoutData();
        layoutData.setBackground(DESCRIPTOR_CELL_BACKGROUND);
        label.setLayoutData(layoutData);
        add(label);
        add(testComponent);
    }
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

    public void testLessThanSizeWithRowSpan() {
        Grid grid = new Grid();
        grid.setSize(4);
       
        Label label = new Label();
        GridLayoutData gridLayoutData = new GridLayoutData();
        gridLayoutData.setRowSpan(3);
        label.setLayoutData(gridLayoutData);
        grid.add(label);
       
        GridProcessor gridProcessor = new GridProcessor(grid);
        assertEquals(1, gridProcessor.getColumnCount());
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

     * |__ /\ __|   |__|  |__|
     * |2 |  |3 |   |3 |  |  |
     * |__|__|__|   |__|__|__|
     */
    public void testInvalidAttemptCollision() {
        GridLayoutData layoutData;
        Grid grid = new Grid(3);
        grid.add(new Label("0"));
        Label verticalCollider = new Label("VC");
        layoutData = new GridLayoutData();
        layoutData.setRowSpan(3);
        verticalCollider.setLayoutData(layoutData);
        grid.add(verticalCollider);
        grid.add(new Label("1"));
        Label horizontalCollider = new Label("HC");
        layoutData = new GridLayoutData();
        layoutData.setColumnSpan(3);
        horizontalCollider.setLayoutData(layoutData);
        grid.add(horizontalCollider);
        grid.add(new Label("2"));
        grid.add(new Label("3"));
        GridProcessor gridProcessor = new GridProcessor(grid);
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

    public void testOutOfBoundsRowSpan() {
        Grid grid = new Grid();
        grid.add(new Label());

        Label label = new Label();
        GridLayoutData layoutData = new GridLayoutData();
        layoutData.setRowSpan(4);
        label.setLayoutData(layoutData);
        grid.add(label);
       
        GridProcessor gridProcessor =  new GridProcessor(grid);
View Full Code Here

Examples of nextapp.echo2.app.layout.GridLayoutData

        // Configure Grid Content
        grid.setSize(7);
        for (int i = 0; i < 12; ++i) {
            Label label = new Label(Integer.toString(i));
            if (i == 1 || i == 2 || i == 3 || i == 5 || i == 8 || i == 10 || i == 11) {
                GridLayoutData layoutData = new GridLayoutData();
                layoutData.setColumnSpan(2);
                if (i == 8) {
                    layoutData.setRowSpan(2);
                }
                label.setLayoutData(layoutData);
            }
            grid.add(label);
        }
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.