| java.lang.Object com.jeta.swingbuilder.gui.components.TableUtils
TableUtils | public class TableUtils (Code) | | This class contains utility methods for doing common tasks with JTables
author: Jeff Tassin |
clearColumnHeaders | public static void clearColumnHeaders(JTable table)(Code) | | Clears the column header icons for a given table
|
convertTableToModelIndex | public static int convertTableToModelIndex(JTable table, int index)(Code) | | Converts a table row the the corresponding model index. This is needed
when the table is sorted. If the table is not sorted, the table index
will equal the model index
Parameters: table - the table whose index to convert Parameters: index - the table index to convert the corresponding model index |
createBasicTablePanel | public static JTable createBasicTablePanel(TableModel model, boolean sortable)(Code) | | Creates a panel that contains a table that can be sorted can be sorted.
The table is scrollable and has automatically resized subsequent columns
Parameters: model - the data model for the table. Don't send in a TableSorterhere. Parameters: sortable - if true, then we will return a table that has sortablecolumns. This will wrap the tablemodel with a TableSorter. a container that contains the table. |
initializeTableSorter | public static void initializeTableSorter(TableSorter sorter, JTable table)(Code) | | Intializes a table and a table sorter
|
removeRowHeader | public static void removeRowHeader(JTable table)(Code) | | Creates row header for table with row number (starting with 1)
displayed
|
setRowHeader | public static TableRowHeader setRowHeader(JTable table)(Code) | | Creates row header for table with row number (starting with 1) displayed
|
setRowHeader | public static TableRowHeader setRowHeader(JTable table, int headerWidth)(Code) | | Creats a row header for the given table. The row number is displayed to
the left of the table ( starting with row 1).
Parameters: table - the table to create the row header for Parameters: headerWidth - the number of characters to size the header |
stopEditing | public static void stopEditing(JTable table)(Code) | | Stops any editing for a given cell on a table.
|
|
|