|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.swing.table.DefaultTableColumnModel
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
JTable
, Serialized FormField Summary | |
protected ChangeEvent | changeEvent
Change event (only one needed) |
protected int | columnMargin
Width margin between each column |
protected boolean | columnSelectionAllowed
Column selection allowed in this column model |
protected EventListenerList | listenerList
List of TableColumnModelListener |
protected ListSelectionModel | selectionModel
Model for keeping track of column selections |
protected Vector | tableColumns
Array of TableColumn objects in this model |
protected int | totalColumnWidth
A local cache of the combined width of all columns |
Constructor Summary | |
DefaultTableColumnModel()
|
Method Summary | |
void | addColumn(TableColumn aColumn)
Appends aColumn to the end of the receiver's tableColumns array. |
void | addColumnModelListener(TableColumnModelListener x)
|
protected ListSelectionModel | createSelectionModel()
|
protected void | fireColumnAdded(TableColumnModelEvent e)
|
protected void | fireColumnMarginChanged()
|
protected void | fireColumnMoved(TableColumnModelEvent e)
|
protected void | fireColumnRemoved(TableColumnModelEvent e)
|
protected void | fireColumnSelectionChanged(ListSelectionEvent e)
|
TableColumn | getColumn(int columnIndex)
Returns the TableColumn object for the column at columnIndex |
int | getColumnCount()
Returns the number of columns in the receiver's table columns array. |
int | getColumnIndex(Object identifier)
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 for TableColumn. |
Enumeration | getColumns()
Returns an Enumeration of all the columns in the model |
boolean | getColumnSelectionAllowed()
|
int | getSelectedColumnCount()
|
int[] | getSelectedColumns()
|
ListSelectionModel | getSelectionModel()
Returns the ListSelectionModel that is used to maintain column selection state. |
int | getTotalColumnWidth()
|
void | moveColumn(int columnIndex,
int newIndex)
Moves the column and heading at columnIndex to newIndex. |
void | propertyChange(PropertyChangeEvent evt)
|
protected void | recalcWidthCache()
|
void | removeColumn(TableColumn column)
Deletes the TableColumn column from the receiver's table columns array. |
void | removeColumnModelListener(TableColumnModelListener x)
|
void | setColumnMargin(int newMargin)
Sets the column margin to newMargin. |
void | setColumnSelectionAllowed(boolean flag)
|
void | setSelectionModel(ListSelectionModel newModel)
Sets the selection model for this TableColumnModel to newModel and registers with for listner notifications from the new selection model. |
void | valueChanged(ListSelectionEvent e)
|
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Field Detail |
protected Vector tableColumns
protected ListSelectionModel selectionModel
protected int columnMargin
protected EventListenerList listenerList
protected transient ChangeEvent changeEvent
protected boolean columnSelectionAllowed
protected int totalColumnWidth
Constructor Detail |
public DefaultTableColumnModel()
Method Detail |
public void addColumn(TableColumn aColumn)
column
- The TableColumn to be added#removeColumn()
public void removeColumn(TableColumn column)
column
- The TableColumn to be removed#addColumn()
public void moveColumn(int columnIndex, int newIndex)
columnIndex
- the index of column to be moved
newIndex
- New index to move the columnpublic void setColumnMargin(int newMargin)
newMargin
- the width margin of the columngetColumnMargin()
,
getTotalColumnWidth()
public int getColumnCount()
getColumns()
public Enumeration getColumns()
public int getColumnIndex(Object identifier)
identifier
- the identifier object#getColumn()
public TableColumn getColumn(int columnIndex)
columnIndex
- the index of the column desiredpublic int getColumnMargin()
#setColumnMargin()
public int getColumnIndexAtX(int xPosition)
public int getTotalColumnWidth()
public void setSelectionModel(ListSelectionModel newModel)
newModel
- the new selection modelgetSelectionModel()
public ListSelectionModel getSelectionModel()
#setSelectionModel()
public void setColumnSelectionAllowed(boolean flag)
public boolean getColumnSelectionAllowed()
public int[] getSelectedColumns()
public int getSelectedColumnCount()
public void addColumnModelListener(TableColumnModelListener x)
public void removeColumnModelListener(TableColumnModelListener x)
protected void fireColumnAdded(TableColumnModelEvent e)
protected void fireColumnRemoved(TableColumnModelEvent e)
protected void fireColumnMoved(TableColumnModelEvent e)
protected void fireColumnSelectionChanged(ListSelectionEvent e)
protected void fireColumnMarginChanged()
public void propertyChange(PropertyChangeEvent evt)
public void valueChanged(ListSelectionEvent e)
protected ListSelectionModel createSelectionModel()
protected void recalcWidthCache()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |