Examples of WebTable


Examples of com.alee.laf.table.WebTable

        String[][] data = { { "1", "2", "3", "4", "5", "6" }, { "7", "8", "9", "10", "11", "12" }, { "13", "14", "15", "16", "17", "18" },
                { "19", "20", "21", "22", "23", "24" }, { "25", "26", "27", "28", "29", "30" }, { "31", "32", "33", "34", "35", "36" },
                { "37", "38", "39", "40", "41", "42" }, { "43", "44", "45", "46", "47", "48" }, { "49", "50", "51", "52", "53", "54" } };

        // Static table
        WebTable table = new WebTable ( data, headers );
        table.setEditable ( false );
        table.setAutoResizeMode ( WebTable.AUTO_RESIZE_OFF );
        table.setRowSelectionAllowed ( false );
        table.setColumnSelectionAllowed ( true );
        table.setPreferredScrollableViewportSize ( new Dimension ( 300, 100 ) );
        return new WebScrollPane ( table );
    }
View Full Code Here

Examples of com.alee.laf.table.WebTable

    @Override
    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // Table
        WebTable table = new WebTable ( new ExampleTableModel () );
        WebScrollPane scrollPane = new WebScrollPane ( table );

        // Custom column
        TableColumn column = table.getColumnModel ().getColumn ( 1 );

        // Custom renderer
        WebTableCellRenderer renderer = new WebTableCellRenderer ();
        renderer.setToolTipText ( "Click for combo box" );
        column.setCellRenderer ( renderer );
View Full Code Here

Examples of com.alee.laf.table.WebTable

     */
    private Component createPropertiesTab ()
    {
        final Object[][] systemPropertiesData = createSystemPropertiesData ();
        final DefaultTableModel model = new DefaultTableModel ( systemPropertiesData, getPropertiesTableColumnNames () );
        final WebTable propertiesTable = new WebTable ( model );
        propertiesTable.setPreferredScrollableViewportSize ( new Dimension ( 1, 1 ) );
        propertiesTable.setEditable ( false );
        LanguageManager.addLanguageListener ( new LanguageAdapter ()
        {
            @Override
            public void languageUpdated ()
            {
                final int[] selection = propertiesTable.getSelectedRows ();

                model.setColumnIdentifiers ( getPropertiesTableColumnNames () );

                for ( final int s : selection )
                {
                    propertiesTable.addRowSelectionInterval ( s, s );
                }
            }
        } );
        return new WebScrollPane ( propertiesTable, false );
    }
View Full Code Here

Examples of com.meterware.httpunit.WebTable

        // render the page for the first time
        rd.forward(request, response);
    }

    public void endSimpleRender(WebResponse response) throws Exception {
        WebTable tables[] = response.getTables();
        assertEquals(1, tables.length);
        WebTable table = tables[0];
        System.err.println("table = " + table);
        // the table has 2 rows because of the way that httpunit parses it
        assertEquals(2, table.getRowCount());
    }
View Full Code Here

Examples of com.meterware.httpunit.WebTable

        return lifecycleId != null ? lifecycleId
                : LifecycleFactory.DEFAULT_LIFECYCLE;
    }

    public void endAddARow(WebResponse response) throws Exception {
        WebTable tables[] = response.getTables();
        assertEquals(1, tables.length);
        WebTable table = tables[0];
        System.err.println("table = " + table);
        // the table has 3 rows because of the way that httpunit parses it
        assertEquals(3, table.getRowCount());
    }
View Full Code Here

Examples of com.meterware.httpunit.WebTable

        HTMLElement divtotal = response.getElementWithID("divtotal");
        Assert.assertEquals("7.0", divtotal.getText());

        WebTable[] tables = response.getTables();
        Assert.assertEquals("Wrong number of tables.", 1, tables.length);
        WebTable table = tables[0];
        Assert.assertEquals("Wrong number of rows.", 5, table.getRowCount());
        Assert.assertEquals("Total not found in las row.", "7.0", table.getCellAsText(4, 0));

    }
View Full Code Here

Examples of com.meterware.httpunit.WebTable

        response = runner.getResponse(request);

        WebTable[] tables = response.getTables();
        Assert.assertEquals("Wrong number of tables.", 1, tables.length);
        WebTable table = tables[0];

        Assert.assertEquals("invalid id", "idX", table.getID());

        Assert.assertEquals("invalid attribute value", "cellspacingX", table.getAttribute("cellspacing"));
        Assert.assertEquals("invalid attribute value", "cellpaddingX", table.getAttribute("cellpadding"));
        Assert.assertEquals("invalid attribute value", "frameX", table.getAttribute("frame"));
        Assert.assertEquals("invalid attribute value", "rulesX", table.getAttribute("rules"));
        Assert.assertEquals("invalid attribute value", "styleX", table.getAttribute("style"));
        Assert.assertEquals("invalid attribute value", "summaryX", table.getAttribute("summary"));
        Assert.assertEquals("invalid attribute value", "classX table", table.getAttribute("class"));

        TableCell cell = table.getTableCell(1, 0);
        Assert.assertEquals("invalid attribute value", "styleX", cell.getAttribute("style"));
        Assert.assertEquals("invalid attribute value", "classX", cell.getAttribute("class"));

    }
View Full Code Here

Examples of com.meterware.httpunit.WebTable

        WebTable[] tables = response.getTables();
        Assert.assertEquals("Wrong number of tables.", 4, tables.length);

        for (int j = 0; j < tables.length; j++)
        {
            WebTable table = tables[j];
            Assert.assertEquals("Wrong number of columns in table." + j, 2, table.getColumnCount());
            Assert.assertEquals("Wrong number of rows in table." + j, 5, table.getRowCount());

            for (int u = 1; u < 5; u++)
            {
                Assert.assertEquals("Wrong value in table cell.", Integer.toString(u), table.getCellAsText(u, 1));
            }
        }

    }
View Full Code Here

Examples of com.meterware.httpunit.WebTable

        WebTable[] tables = response.getTables();
        Assert.assertEquals("Wrong number of tables in result.", 4, tables.length);

        for (int j = 0; j < tables.length; j++)
        {
            WebTable table = tables[j];
            Assert.assertEquals("Wrong number of rows in table " + (j + 1), 2, table.getRowCount());
            Assert.assertEquals("Wrong content in cell for table " + (j + 1), "ant", table.getCellAsText(1, 0));
            Assert.assertEquals("Wrong content in cell for table " + (j + 1), "bee", table.getCellAsText(1, 1));
        }
    }
View Full Code Here

Examples of com.meterware.httpunit.WebTable

        WebTable[] tables = response.getTables();
        Assert.assertEquals("Wrong number of tables.", 4, tables.length);

        for (int j = 0; j < tables.length; j++)
        {
            WebTable table = tables[j];
            Assert.assertEquals("Wrong number of columns in table." + j, 2, table.getColumnCount());
            Assert.assertEquals("Wrong number of rows in table." + j, 5, table.getRowCount());

            for (int u = 1; u < 5; u++)
            {
                Assert.assertEquals("Wrong value in table cell.", Integer.toString(u), table.getCellAsText(u, 1));
            }
        }

    }
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.