org.jdesktop.swing.table
Class TableColumnExt
java.lang.Object
javax.swing.table.TableColumn
org.jdesktop.swing.table.TableColumnExt
- All Implemented Interfaces:
- Cloneable, Serializable
- public class TableColumnExt
- extends TableColumn
- implements Cloneable
TableColumnExt
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.table.TableColumn |
CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, COLUMN_WIDTH_PROPERTY, HEADER_RENDERER_PROPERTY, HEADER_VALUE_PROPERTY, headerRenderer, headerValue, identifier, isResizable, maxWidth, minWidth, modelIndex, resizedPostingDisableCount, width |
| Methods inherited from class javax.swing.table.TableColumn |
addPropertyChangeListener, createDefaultHeaderRenderer, disableResizedPosting, enableResizedPosting, getCellEditor, getHeaderValue, getIdentifier, getMaxWidth, getMinWidth, getModelIndex, getPropertyChangeListeners, getResizable, getWidth, removePropertyChangeListener, setCellEditor, setCellRenderer, setHeaderRenderer, setHeaderValue, setIdentifier, setMaxWidth, setMinWidth, setModelIndex, setPreferredWidth, setResizable, setWidth, sizeWidthToFit |
table
protected JTable table
cellProperties
protected LabelProperties cellProperties
headerProperties
protected LabelProperties headerProperties
editable
protected boolean editable
sorter
protected Sorter sorter
visible
protected boolean visible
prototypeValue
protected Object prototypeValue
TableColumnExt
public TableColumnExt()
TableColumnExt
public TableColumnExt(JTable table)
TableColumnExt
public TableColumnExt(JTable table,
int modelIndex)
TableColumnExt
public TableColumnExt(JTable table,
int modelIndex,
int width)
TableColumnExt
public TableColumnExt(JTable table,
int modelIndex,
int width,
TableCellRenderer cellRenderer,
TableCellEditor cellEditor)
clone
public Object clone()
- Returns a clone of this TableColumn. Some implementations of TableColumn
may assume that all TableColumnModels are unique, therefore it is
recommended that the same TableColumn instance not be added more than
once to a TableColumnModel. To show TableColumns with the same column of
data from the model, create a new instance with the same modelIndex.
- Returns:
- a clone of this TableColumn
setTable
public void setTable(JTable table)
getTable
public JTable getTable()
getColumnClass
public Class getColumnClass()
getCellRenderer
public TableCellRenderer getCellRenderer()
getHeaderRenderer
public TableCellRenderer getHeaderRenderer()
setEditable
public void setEditable(boolean editable)
isEditable
public boolean isEditable()
applyCellProperties
public void applyCellProperties(LabelProperties props)
applyHeaderProperties
public void applyHeaderProperties(LabelProperties props)
getPreferredWidth
public int getPreferredWidth()
- Returns the preferred width of the
TableColumn.
If the prototypeValue property is non-null, then this
method will use that value object to compute the preferred width
by accessing the cell and header renderers for this column
to determine the optimal width.
- Returns:
- the
preferredWidth property - See Also:
TableColumn.setPreferredWidth(int),
setPrototypeValue(java.lang.Object)
setPrototypeValue
public void setPrototypeValue(Object value)
getPrototypeValue
public Object getPrototypeValue()
setSorterClass
public void setSorterClass(String sorterClassName)
- Sets a user-defined sorter for this column
getSorterClass
public String getSorterClass()
getSorter
public Sorter getSorter()
isSortable
public boolean isSortable()
setTitle
public void setTitle(String title)
getTitle
public String getTitle()
setVisible
public void setVisible(boolean visible)
isVisible
public boolean isVisible()
putClientProperty
public void putClientProperty(Object key,
Object value)
getClientProperty
public Object getClientProperty(Object key)
Copyright 2004 by Sun Microsystems, Inc. All Rights Reserved.