class org.aswing.table.JTableHeader extends Container
This is the object which manages the header of the JTable
.
Instance Fields
function new(?cm:TableColumnModel = null): Void
Constructs a JTableHeader
which is initialized with
cm
as the column model. If cm
is
null
this method will initialize the table header
with a default TableColumnModel
.
cm | the column model for the table |
See Also
- this.createDefaultColumnModel()
function columnAtPoint(point:IntPoint): Int
Returns the index of the column that point
lies in, or -1 if it
lies out of bounds.
returns | the index of the column that |
function columnSelectionChanged(source:TableColumnModel, firstIndex:Int, lastIndex:Int, programmatic:Bool): Void
function getColumnModel(): TableColumnModel
Returns the TableColumnModel
that contains all column information
of this table header.
returns | the |
See Also
- this.setColumnModel()
function getDefaultRenderer(): TableCellFactory
Returns the default renderer used when no headerRenderer
is defined by a TableColumn
.
returns | the default renderer |
function getHeaderRect(column:Int): IntRectangle
Returns the rect containing the header tile at column
.
When the column
parameter is out of bounds this method uses the
same conventions as the JTable
method getCellRect
.
returns | the rect containing the header tile at |
See Also
function getReorderingAllowed(): Bool
Returns true if the user is allowed to rearrange columns by dragging their headers, false otherwise. The default is true. You can rearrange columns programmatically regardless of this setting.
returns | the |
See Also
- this.setReorderingAllowed
function getResizingAllowed(): Bool
Returns true if the user is allowed to resize columns by dragging between their headers, false otherwise. The default is true. You can resize columns programmatically regardless of this setting.
returns | the |
See Also
- this.setResizingAllowed()
function getResizingColumn(): TableColumn
function getRowHeight(): Int
Returns the height of row, in pixels. The default row height is 16.0.
returns | the height in pixels of row |
See Also
- this.setAllRowHeight()
function resizeAndRepaint(): Void
Sizes the header and marks it as needing display. Equivalent
to revalidate
followed by repaint
.
function setColumnModel(columnModel:TableColumnModel): Void
Sets the column model for this table to newModel
and registers
for listener notifications from the new column model.
if newModel
is null
, nothing will happen except a trace.
columnModel | the new data source for this table |
See Also
- this.getColumnModel()
function setDefaultRenderer(defaultRenderer:TableCellFactory): Void
Sets the default renderer to be used when no headerRenderer
is defined by a TableColumn
.
defaultRenderer | the default renderer |
function setReorderingAllowed(reorderingAllowed:Bool): Void
Sets whether the user can drag column headers to reorder columns.
reorderingAllowed | true if the table view should allow reordering; otherwise false |
See Also
- this.getReorderingAllowed()
function setResizingAllowed(resizingAllowed:Bool): Void
Sets whether the user can resize columns by dragging between headers.
resizingAllowed | true if table view should allow resizing |
See Also
- this.getResizingAllowed()
function setResizingColumn(aColumn:TableColumn): Void
Sets the header's resizingColumn
to aColumn
.
Application code will not use this method explicitly, it is used internally by the column sizing mechanism.
aColumn | the column being resized, or |
function setRowHeight(rowHeight:Int): Void
Sets the height, in pixels, of all cells to rowHeight
,
revalidates, and repaints.
The height of the cells will be equal to the row height minus
the row margin.
rowHeight | new row height |
See Also
- this.getAllRowHeight()