|
RADi Runtime Library v1.2.1 | ||||||||
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
de.muntjak.radiloader.SelfResizingTable
public class SelfResizingTable
SelfResizingTable is a table which calculates preferred column widths
as it is first displayed and each time its tableChanged
method gets called (generally after a change in the model). You can specify
the maximum display width of a single column and an array of non-resizable
columns (a non-resizable column will be displayed at its preferred width and
will not enlarge).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JTable |
---|
JTable.AccessibleJTable, 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.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 | |
---|---|
SelfResizingTable()
Constructs a default SelfResizingTable that is initialized with a default
data model, a default column model, and a default selection
model. |
|
SelfResizingTable(TableModel model)
Constructs a SelfResizingTable that is initialized with
model as the data model, a default column model,
and a default selection model. |
|
SelfResizingTable(TableModel model,
int[] nonResizableColumns)
Constructs a SelfResizingTable that is initialized with
model as the data model, a default column model,
and a default selection model. |
|
SelfResizingTable(TableModel model,
int[] nonResizableColumns,
int maximumColumnWidth)
Constructs a SelfResizingTable that is initialized with
model as the data model, a default column model,
and a default selection model. |
Method Summary | |
---|---|
TableCellRenderer |
getCellRenderer(int row,
int column)
Overridden because SelfResizingTable can be fed with a (RADi-generated) RadiTableModel which might
contain information about RADi-defined renderers. |
void |
tableChanged(TableModelEvent e)
Overridden to trigger recalculation of column widths. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SelfResizingTable()
SelfResizingTable
that is initialized with a default
data model, a default column model, and a default selection
model. All columns are resizable, the
maximum column width is 1024 pixels.
public SelfResizingTable(TableModel model)
SelfResizingTable
that is initialized with
model
as the data model, a default column model,
and a default selection model. All columns are resizable, the
maximum column width is 1024 pixels.
model
- the data model for the tablepublic SelfResizingTable(TableModel model, int[] nonResizableColumns)
SelfResizingTable
that is initialized with
model
as the data model, a default column model,
and a default selection model. Columns specified in nonResizableColumns
will be displayed at their preferred sizes and will not enlarge.
The maximum column width is 1024 pixels.
model
- the data model for the tablenonResizableColumns
- an array of non-resizable columns.
Specifying null or an empty array for nonResizableColumns
is
equal to calling the one argument constructor.public SelfResizingTable(TableModel model, int[] nonResizableColumns, int maximumColumnWidth)
SelfResizingTable
that is initialized with
model
as the data model, a default column model,
and a default selection model. Columns specified in nonResizableColumns
will be displayed at their preferred sizes and will not enlarge. The
display width of a single column will be limited to maximumColumnWidth
.
model
- the data model for the tablenonResizableColumns
- an array of non-resizable columns.
Specifying null or an empty array for nonResizableColumns
is
equal to calling the one argument constructor.maximumColumnWidth
- the maximum display width of a single column.Method Detail |
---|
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
tableChanged
in class JTable
JTable.tableChanged(TableModelEvent)
public TableCellRenderer getCellRenderer(int row, int column)
RadiTableModel
which might
contain information about RADi-defined renderers.
getCellRenderer
in class JTable
JTable.getCellRenderer(int, int)
|
RADi Runtime Library v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |