| Package | org.aswing.table |
| Interface | public interface TableColumnModel |
| Implementors | DefaultTableColumnModel, JTable, JTableHeader |
JTable.
| Method | Defined by | ||
|---|---|---|---|
|
addColumn(aColumn:TableColumn):void
Appends
aColumn to the end of the
tableColumns array. | TableColumnModel | ||
|
Adds a listener for table column model events.
| TableColumnModel | ||
|
getColumn(columnIndex:int):TableColumn
Returns the
TableColumn object for the column at
columnIndex. | TableColumnModel | ||
|
getColumnCount():int
Returns the number of columns in the model.
| TableColumnModel | ||
|
getColumnIndex(columnIdentifier:Object):int
Returns the index of the first column in the table
whose identifier is equal to
identifier,
when compared using equals. | TableColumnModel | ||
|
getColumnIndexAtX(xPosition:int):int
Returns the index of the column that lies on the
horizontal point,
xPosition;
or -1 if it lies outside the any of the column's bounds. | TableColumnModel | ||
|
getColumnMargin():int
Returns the width between the cells in each column.
| TableColumnModel | ||
|
getColumns():Array
Returns an
Array of all the columns in the model. | TableColumnModel | ||
|
getColumnSelectionAllowed():Boolean
Returns true if columns may be selected.
| TableColumnModel | ||
|
getSelectedColumnCount():int
Returns the number of selected columns.
| TableColumnModel | ||
|
getSelectedColumns():Array
Returns an array of indicies of all selected columns.
| TableColumnModel | ||
|
Returns the current selection model.
| TableColumnModel | ||
|
getTotalColumnWidth():int
Returns the total width of all the columns.
| TableColumnModel | ||
|
moveColumn(columnIndex:int, newIndex:int):void
Moves the column and its header at
columnIndex to
newIndex. | TableColumnModel | ||
|
removeColumn(column:TableColumn):void
Deletes the
TableColumn column from the
tableColumns array. | TableColumnModel | ||
|
Removes a listener for table column model events.
| TableColumnModel | ||
|
setColumnMargin(newMargin:int):void
Sets the
TableColumn's column margin to
newMargin. | TableColumnModel | ||
|
setColumnSelectionAllowed(flag:Boolean):void
Sets whether the columns in this model may be selected.
| TableColumnModel | ||
|
setSelectionModel(newModel:ListSelectionModel):void
Sets the selection model.
| TableColumnModel | ||
| addColumn | () | method |
public function addColumn(aColumn:TableColumn):void
Appends aColumn to the end of the
tableColumns array.
This method posts a columnAdded
event to its listeners.
aColumn:TableColumn — aColumn the TableColumn to be added
|
See also
| addColumnModelListener | () | method |
public function addColumnModelListener(x:TableColumnModelListener):voidAdds a listener for table column model events.
Parametersx:TableColumnModelListener — a TableColumnModelListener object
|
| getColumn | () | method |
public function getColumn(columnIndex:int):TableColumn
Returns the TableColumn object for the column at
columnIndex.
columnIndex:int — columnIndex the index of the desired column
|
TableColumn —
the TableColumn object for
the column at columnIndex
|
| getColumnCount | () | method |
public function getColumnCount():intReturns the number of columns in the model.
Returnsint — the number of columns in the model
|
| getColumnIndex | () | method |
public function getColumnIndex(columnIdentifier:Object):int
Returns the index of the first column in the table
whose identifier is equal to identifier,
when compared using equals.
columnIdentifier:Object — columnIdentifier the identifier object
|
int — the index of the first table column
whose identifier is equal to identifier
|
See also
| getColumnIndexAtX | () | method |
public function getColumnIndexAtX(xPosition:int):int
Returns the index of the column that lies on the
horizontal point, xPosition;
or -1 if it lies outside the any of the column's bounds.
In keeping with Swing's separable model architecture, a
TableColumnModel does not know how the table columns actually appear on
screen. The visual presentation of the columns is the responsibility
of the view/controller object using this model (typically JTable). The
view/controller need not display the columns sequentially from left to
right. For example, columns could be displayed from right to left to
accomodate a locale preference or some columns might be hidden at the
request of the user. Because the model does not know how the columns
are laid out on screen, the given xPosition should not be
considered to be a coordinate in 2D graphics space. Instead, it should
be considered to be a width from the start of the first column in the
model. If the column index for a given X coordinate in 2D space is
required, JTable.columnAtPoint can be used instead.
xPosition:int |
int — the index of the column; or -1 if no column is found
|
See also
| getColumnMargin | () | method |
public function getColumnMargin():intReturns the width between the cells in each column.
Returnsint — the margin, in pixels, between the cells
|
| getColumns | () | method |
public function getColumns():Array
Returns an Array of all the columns in the model.
Array — an Array of all the columns in the model
|
| getColumnSelectionAllowed | () | method |
public function getColumnSelectionAllowed():BooleanReturns true if columns may be selected.
ReturnsBoolean — true if columns may be selected
|
See also
| getSelectedColumnCount | () | method |
public function getSelectedColumnCount():intReturns the number of selected columns.
Returnsint — the number of selected columns; or 0 if no columns are selected
|
| getSelectedColumns | () | method |
public function getSelectedColumns():ArrayReturns an array of indicies of all selected columns.
ReturnsArray — an array of integers containing the indicies of all
selected columns; or an empty array if nothing is selected
|
| getSelectionModel | () | method |
public function getSelectionModel():ListSelectionModelReturns the current selection model.
ReturnsListSelectionModel —
a ListSelectionModel object
|
See also
| getTotalColumnWidth | () | method |
public function getTotalColumnWidth():intReturns the total width of all the columns.
Returnsint — the total computed width of all columns
|
| moveColumn | () | method |
public function moveColumn(columnIndex:int, newIndex:int):void
Moves the column and its header at columnIndex to
newIndex. The old column at columnIndex
will now be found at newIndex. The column that used
to be at newIndex is shifted left or right
to make room. This will not move any columns if
columnIndex equals newIndex. This method
posts a columnMoved event to its listeners.
columnIndex:int — columnIndex the index of column to be moved
|
|
newIndex:int — newIndex index of the column's new location
|
| removeColumn | () | method |
public function removeColumn(column:TableColumn):void
Deletes the TableColumn column from the
tableColumns array. This method will do nothing if
column is not in the table's column list.
This method posts a columnRemoved
event to its listeners.
column:TableColumn — column the TableColumn to be removed
|
See also
| removeColumnModelListener | () | method |
public function removeColumnModelListener(x:TableColumnModelListener):voidRemoves a listener for table column model events.
Parametersx:TableColumnModelListener — a TableColumnModelListener object
|
| setColumnMargin | () | method |
public function setColumnMargin(newMargin:int):void
Sets the TableColumn's column margin to
newMargin. This method posts
a columnMarginChanged event to its listeners.
newMargin:int — newMargin the width, in pixels, of the new column margins
|
See also
| setColumnSelectionAllowed | () | method |
public function setColumnSelectionAllowed(flag:Boolean):voidSets whether the columns in this model may be selected.
Parametersflag:Boolean — true if columns may be selected; otherwise false
|
See also
| setSelectionModel | () | method |
public function setSelectionModel(newModel:ListSelectionModel):voidSets the selection model.
ParametersnewModel:ListSelectionModel — a ListSelectionModel object
|
See also