|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.table.TableUtilities
public class TableUtilities
Collection of utility methods for J/X/Table.
Method Summary | |
---|---|
static void |
clear(TableColumnModel model,
boolean includeHidden)
Removes all columns of the given column model. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 examine
public 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 coordinates
NullPointerException
- 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 coordinates
NullPointerException
- 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 to
NullPointerException
- 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 ordinals
public 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |