JTable
.
DefaultTableColumnModel
Modifier and Type | Method and Description |
---|---|
public void | addColumn(TableColumn
the aColumn)TableColumn to be addedAppends |
public void | addColumnModelListener(TableColumnModelListener
a x)TableColumnModelListener objectAdds a listener for table column model events. |
public TableColumn | Returns: theTableColumn object for
the column at columnIndex the index of the desired column columnIndex)Returns the |
public int | Returns: the number of columns in the modelReturns the number of columns in the model. |
public int | Returns: the index of the first table column whose identifier is equal toidentifier the identifier object columnIdentifier)Returns the index of the first column in the table
whose identifier is equal to |
public int | Returns: the index of the column; or -1 if no column is foundwidth from the start of the first column in
the model. xPosition)Returns the index of the column that lies on the
horizontal point, |
public int | Returns: the margin, in pixels, between the cellsReturns the width between the cells in each column. |
public Enumeration | Returns: anEnumeration of all the columns in the modelReturns an |
public boolean | Returns: true if columns may be selectedReturns true if columns may be selected. |
public int | Returns: the number of selected columns; or 0 if no columns are selectedReturns the number of selected columns. |
public int[] | Returns: an array of integers containing the indices of all selected columns; or an empty array if nothing is selectedReturns an array of indices of all selected columns. |
public ListSelectionModel | |
public int | Returns: the total computed width of all columnsReturns the total width of all the columns. |
public void | moveColumn(int
the index of column to be moved columnIndex, int index of the column's new location newIndex)Moves the column and its header at |
public void | removeColumn(TableColumn
the column)TableColumn to be removedDeletes the |
public void | removeColumnModelListener(TableColumnModelListener
a x)TableColumnModelListener objectRemoves a listener for table column model events. |
public void | setColumnMargin(int
the width, in pixels, of the new column margins newMargin)Sets the |
public void | setColumnSelectionAllowed(boolean
true if columns may be selected; otherwise false flag)Sets whether the columns in this model may be selected. |
public void |
addColumn | back to summary |
---|---|
public void addColumn(TableColumn aColumn) Appends
|
addColumnModelListener | back to summary |
---|---|
public void addColumnModelListener(TableColumnModelListener x) Adds a listener for table column model events.
|
getColumn | back to summary |
---|---|
public TableColumn getColumn(int columnIndex) Returns the
|
getColumnCount | back to summary |
---|---|
public int getColumnCount() Returns the number of columns in the model.
|
getColumnIndex | back to summary |
---|---|
public int getColumnIndex(Object columnIdentifier) Returns the index of the first column in the table
whose identifier is equal to
|
getColumnIndexAtX | back to summary |
---|---|
public int getColumnIndexAtX(int xPosition) Returns the index of the column that lies on the
horizontal point,
|
getColumnMargin | back to summary |
---|---|
public int getColumnMargin() Returns the width between the cells in each column.
|
getColumns | back to summary |
---|---|
public Enumeration Returns an
|
getColumnSelectionAllowed | back to summary |
---|---|
public boolean getColumnSelectionAllowed() Returns true if columns may be selected.
|
getSelectedColumnCount | back to summary |
---|---|
public int getSelectedColumnCount() Returns the number of selected columns.
|
getSelectedColumns | back to summary |
---|---|
public int[] getSelectedColumns() Returns an array of indices of all selected columns.
|
getSelectionModel | back to summary |
---|---|
public ListSelectionModel getSelectionModel() Returns the current selection model.
|
getTotalColumnWidth | back to summary |
---|---|
public int getTotalColumnWidth() Returns the total width of all the columns.
|
moveColumn | back to summary |
---|---|
public void moveColumn(int columnIndex, int newIndex) Moves the column and its header at
|
removeColumn | back to summary |
---|---|
public void removeColumn(TableColumn column) Deletes the
|
removeColumnModelListener | back to summary |
---|---|
public void removeColumnModelListener(TableColumnModelListener x) Removes a listener for table column model events.
|
setColumnMargin | back to summary |
---|---|
public void setColumnMargin(int newMargin) Sets the
|
setColumnSelectionAllowed | back to summary |
---|---|
public void setColumnSelectionAllowed(boolean flag) Sets whether the columns in this model may be selected.
|
setSelectionModel | back to summary |
---|---|
public void setSelectionModel(ListSelectionModel newModel) Sets the selection model.
|