public class TableUtilities extends Object
Modifier | Constructor and Description |
---|---|
private |
TableUtilities() |
Modifier and Type | Method and Description |
---|---|
static void |
clear(TableColumnModel model,
boolean includeHidden)
Removes all columns of the given column model.
|
private static void |
clear(TableColumnModel model,
List<TableColumn> columns) |
static int |
getPreferredRowHeight(JTable table,
int row)
Returns the preferred height for the given row.
|
static boolean |
isDataChanged(TableModelEvent e)
Returns a boolean indication whether the event represents a
dataChanged type.
|
static boolean |
isInsert(TableModelEvent e)
Returns a boolean indication whether the event represents a
insert type.
|
static boolean |
isStructureChanged(TableModelEvent e)
Returns a boolean indication whether the event represents a
structureChanged type.
|
static boolean |
isUpdate(TableModelEvent e)
Returns a boolean indication whether the event represents a
update type.
|
static int[] |
ordinalsOf(Enum<?>... values)
Returns an array containing the ordinals of the given values of an Enum.
|
static void |
setPreferredRowHeight(JTable table,
int row) |
static void |
setPreferredRowHeights(JTable table)
Sets preferred row heights for all visible rows.
|
private TableUtilities()
public static boolean isDataChanged(TableModelEvent e)
e
- the event to examine.public static boolean isUpdate(TableModelEvent e)
e
- the event to examine.public static boolean isInsert(TableModelEvent e)
e
- the event to examinepublic static boolean isStructureChanged(TableModelEvent e)
e
- the event to examine.public static int getPreferredRowHeight(JTable table, int row)
table
- the table which provides the renderers, must not be nullrow
- the index of the row in view coordinatesNullPointerException
- if table is null.IndexOutOfBoundsException
- if the row is not a valid row indexpublic static void setPreferredRowHeight(JTable table, int row)
table
- the table which provides the renderers, must not be nullrow
- the index of the row in view coordinatesNullPointerException
- if table is null.IndexOutOfBoundsException
- if the row is not a valid row indexpublic static void setPreferredRowHeights(JTable table)
table
- the table to set row heights toNullPointerException
- if no table installed.public static int[] ordinalsOf(Enum<?>... values)
Convience for clients which define TableColumns as Enums (Issue #1304-swingx).
values
- the enums to map to its ordinalspublic static void clear(TableColumnModel model, boolean includeHidden)
model
- the column model to remove all columns from.includeHidden
- indicates whether hidden columns should be
removed as well, has no effect if model is not of type TableColumnModelExt.private static void clear(TableColumnModel model, List<TableColumn> columns)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses