|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
com.jgoodies.uifextras.util.ExtTable
public class ExtTable
A JTable subclass that can align and size columns. Therefore it utilizes two arrays and a List for the column alignment, header alignment, and the column size hints. It also configures the table renderers, selection behavior, row height, etc.
Nested Class Summary | |
---|---|
static class |
ExtTable.BooleanEditor
Unlike the default BooleanEditor, we set the "border painted flat" property. |
static class |
ExtTable.BooleanRenderer
Unlike the default BooleanRenderer, we set the "border painted flat" property. |
static class |
ExtTable.MyDefaultTableCellRenderer
A default renderer that honors the columns alignment. |
Nested classes/interfaces inherited from class javax.swing.JTable |
---|
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ExtTable()
Constructs an ExtTable. |
|
ExtTable(Object[][] rowData,
Object[] columnNames)
Constructs an ExtTable for the specified row data and column names. |
|
ExtTable(TableModel tableModel)
Constructs an ExtTable on the given TableModel. |
Method Summary | |
---|---|
protected int |
computeRowHeight()
|
protected void |
configureTable()
Configures this table. |
protected TableCellRenderer |
createDefaultTableCellRenderer()
Creates and returns the default table cell renderer. |
int |
getColumnAlignment(int col)
Returns the column alignment for the given column index. |
int[] |
getColumnAlignments()
Returns an array of all column alignments. |
void |
release()
Eagerly releases resources, here: the model. |
void |
resetSelection()
Resets the selection. |
void |
setColumnAlignments(int[] alignments)
Sets all column alignments. |
void |
setColumnSizes(int[] columnSizeHints)
Sets all columns sizes using the given array of column size hints. |
void |
setColumnSizes(List<Integer> columnSizeHints)
Sets all columns sizes using the given List of column size hints. |
void |
setHeaderAlignments(int[] alignments)
Sets all header alignments using the given array of alignments. |
void |
setModel(TableModel model)
Sets a new model. |
void |
updateUI()
Updates the UI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExtTable()
public ExtTable(TableModel tableModel)
tableModel
- this table's modelpublic ExtTable(Object[][] rowData, Object[] columnNames)
Method Detail |
---|
protected void configureTable()
protected TableCellRenderer createDefaultTableCellRenderer()
public int getColumnAlignment(int col)
public int[] getColumnAlignments()
public void setColumnAlignments(int[] alignments)
public void release()
public void resetSelection()
public void setColumnSizes(int[] columnSizeHints)
public void setColumnSizes(List<Integer> columnSizeHints)
public void setHeaderAlignments(int[] alignments)
public void setModel(TableModel model)
setModel
in class JTable
public void updateUI()
updateUI
in class JTable
protected int computeRowHeight()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |