Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the requirements for a model object suitable for use with JTable.
DefaultTableColumnModel
Method Summary | |
void |
addColumn(TableColumn aColumn)
Appends aColumn to the end of the receiver's tableColumns array. |
void |
addColumnModelListener(TableColumnModelListener x)
Add a listener for table column model events. |
TableColumn |
getColumn(int columnIndex)
Returns the TableColumn object for the column at columnIndex |
int |
getColumnCount()
Returns the number of columns in the model |
int |
getColumnIndex(Object columnIdentifier)
Returns the index of the first column in the receiver's columns array whose identifier is equal to identifier, when compared using equals(). |
int |
getColumnIndexAtX(int xPosition)
Returns the index of the column that lies on the xPosition, or -1 if it lies outside the any of the column's bounds. |
int |
getColumnMargin()
Returns the width margin between each column |
Enumeration |
getColumns()
Returns an Enumeration of all the columns in the model |
boolean |
getColumnSelectionAllowed()
Returns true if columns can be selected. |
int |
getSelectedColumnCount()
Returns the number of selected columns. |
int[] |
getSelectedColumns()
Returns an array of indexes for selected columns |
ListSelectionModel |
getSelectionModel()
Returns the current selection model. |
int |
getTotalColumnWidth()
Returns the total width of all the columns. |
void |
moveColumn(int columnIndex,
int newIndex)
Moves the column and heading at columnIndex to newIndex. |
void |
removeColumn(TableColumn column)
Deletes the TableColumn column from the receiver's table columns array. |
void |
removeColumnModelListener(TableColumnModelListener x)
Remove a listener for table column model events. |
void |
setColumnMargin(int newMargin)
Sets the TableColumn's column margin to newMargin. |
void |
setColumnSelectionAllowed(boolean flag)
Sets whether the columns in this model can be selected. |
void |
setSelectionModel(ListSelectionModel newModel)
Sets the selection model, which handles selections. |
Method Detail |
public void addColumn(TableColumn aColumn)
aColumn
- The TableColumn to be addedremoveColumn(javax.swing.table.TableColumn)
public void removeColumn(TableColumn column)
column
- The TableColumn to be removedaddColumn(javax.swing.table.TableColumn)
public void moveColumn(int columnIndex, int newIndex)
columnIndex
- the index of column to be movednewIndex
- New index to move the columnpublic void setColumnMargin(int newMargin)
newMargin
- the width margin of the columngetColumnMargin()
public int getColumnCount()
public Enumeration getColumns()
public int getColumnIndex(Object columnIdentifier)
identifier
- the identifier objectgetColumn(int)
public TableColumn getColumn(int columnIndex)
columnIndex
- the index of the column desiredpublic int getColumnMargin()
public int getColumnIndexAtX(int xPosition)
public int getTotalColumnWidth()
public void setColumnSelectionAllowed(boolean flag)
getColumnSelectionAllowed()
public boolean getColumnSelectionAllowed()
setColumnSelectionAllowed(boolean)
public int[] getSelectedColumns()
public int getSelectedColumnCount()
public void setSelectionModel(ListSelectionModel newModel)
newModel
- a ListSelectionModel objectgetSelectionModel()
public ListSelectionModel getSelectionModel()
setSelectionModel(javax.swing.ListSelectionModel)
public void addColumnModelListener(TableColumnModelListener x)
x
- a TableColumnModelListener objectpublic void removeColumnModelListener(TableColumnModelListener x)
x
- a TableColumnModelListener object
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |