|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.table.TableUtils
public class TableUtils
some utilities for tables
| Method Summary | |
|---|---|
static TableCellEditor |
getColorEditor()
edits Color objects |
static TableCellRenderer |
getColorRenderer()
renders Color objects |
static TableCellEditor |
getFontEditor()
edits Font objects |
static TableCellRenderer |
getFontRenderer()
renders Font objects |
static TableCellRenderer |
getMultiRenderer()
|
static TimeCellRenderer |
getTimeRenderer()
renders Date and Long objects |
static DefaultTableCellRenderer |
getToolTipRenderer()
provides a tool tip based on the toString() method of the cell object |
static JTable |
makePropertiesTable(Map properties)
calls makePropertiesTable(properties, "key", "value") |
static JTable |
makePropertiesTable(Map properties,
String keyHeader,
String valueHeader)
returns a table that orders the entries by the keys of the properties, using toString() on all objects in the map |
static void |
makeSortable(JTable table,
Comparator<?>... comp)
|
static void |
makeSortable(JTable table,
List<Comparator<?>> comp)
wrapps the TableModel with a SortableTableModel and registers a MouseListener on the table header to support sorting. |
static DefaultTableModel |
makeTableModel(Map<?,?> map)
|
static DefaultTableModel |
makeTableModel(Map<?,?> map,
String keyHeader,
String valueHeader)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TableCellRenderer getMultiRenderer()
public static TableCellRenderer getColorRenderer()
public static TableCellEditor getColorEditor()
public static TableCellRenderer getFontRenderer()
public static TableCellEditor getFontEditor()
public static TimeCellRenderer getTimeRenderer()
public static DefaultTableCellRenderer getToolTipRenderer()
public static void makeSortable(JTable table,
Comparator<?>... comp)
public static JTable makePropertiesTable(Map properties)
makePropertiesTable(properties, "key", "value")
public static JTable makePropertiesTable(Map properties,
String keyHeader,
String valueHeader)
toString() on all objects in the map
public static DefaultTableModel makeTableModel(Map<?,?> map)
public static DefaultTableModel makeTableModel(Map<?,?> map,
String keyHeader,
String valueHeader)
public static void makeSortable(JTable table,
List<Comparator<?>> comp)
SortableTableModel
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||