|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.tableview.TableColumn
public class TableColumn
A TableColumn provides slots for a renderer and an editor that can be used to display and edit the cells in this column. When the renderer (or editor) in the TableColumn is null, the default renderer from the TableView is used.
The TableColumn stores the link between the columns in the TableView and the columns in the TableModel. The modelIndex is the column in the TableModel, which will be queried for the data values for the cells in this column. As the column moves around in the view this modelIndex does not change.
Setting the modelIndex to -1 indicates the the column is a custom column. Thus the column does not map to a column in the TableModel. A custom column is not editable and thus the cellEditor is never used.
TableColumnModel
,
DefaultTableColumnModel
,
BaseHeader.getDefaultRenderer()
,
BaseTableView.getDefaultRenderer()
,
BaseTableView.getDefaultEditor()
,
BaseTableView.getCellRenderer(int, int)
,
BaseTableView.getCellEditor(int, int)
Constructor Summary | |
---|---|
TableColumn()
Constructs a new TableColumn using a default model index of 0, a null renderer and a null editor. |
|
TableColumn(int mIndex)
Constructs a new TableColumn using a null renderer and a null editor. |
|
TableColumn(int mIndex,
TableCellRenderer cRenderer,
TableCellEditor cEditor)
Constructs a new TableColumn using the given renderer and editor. |
Method Summary | |
---|---|
TableCellEditor |
getCellEditor()
Returns the TableCellEditor used by the TableView to edit the cells for this column. |
TableCellRenderer |
getCellRenderer()
Returns the TableCellRenderer used by the TableView to draw the cells for this column. |
TableCellRenderer |
getHeaderRenderer()
Returns the TableCellRenderer used to draw the header of the TableColumn. |
java.lang.String |
getHeaderValue()
Returns the String used as the value for the header renderer. |
java.lang.Object |
getIdentifier()
Returns the identifier object for this column. |
int |
getModelIndex()
Returns the model index for this column. |
int |
getSize()
|
java.lang.Object |
getUniqueModelIdentifier()
|
boolean |
isResizable()
|
void |
setCellEditor(TableCellEditor cellEditor)
Sets the TableCellEditor used by the TableView to edit the cells for this column. |
void |
setCellRenderer(TableCellRenderer cellRenderer)
Sets the TableCellRenderer used by the TableView to draw the cells for this column. |
void |
setHeaderRenderer(TableCellRenderer headerRenderer)
Sets the TableCellRenderer used to draw the header of the TableColumn. |
void |
setHeaderValue(java.lang.String headerValue)
Sets the String that will be used as the value for the headerRenderer. |
void |
setIdentifier(java.lang.Object identifier)
Sets the TableColumn's identifier. |
void |
setModelIndex(int modelIndex)
Sets the model index for this column. |
void |
setResizable(boolean resizable)
|
void |
setSize(int size)
|
void |
setUniqueModelIdentifier(java.lang.Object uniqueModelIdentifier)
|
Constructor Detail |
---|
public TableColumn()
public TableColumn(int mIndex)
mIndex
- the new modelIndex for the columnpublic TableColumn(int mIndex, TableCellRenderer cRenderer, TableCellEditor cEditor)
mIndex
- the new modelIndex for the columncRenderer
- the new renderer for the columncEditor
- the new editor for the columnMethod Detail |
---|
public void setModelIndex(int modelIndex)
modelIndex
- the new modelIndexpublic int getModelIndex()
public void setIdentifier(java.lang.Object identifier)
identifier
- an identifier for this columnpublic java.lang.Object getIdentifier()
public java.lang.Object getUniqueModelIdentifier()
public void setUniqueModelIdentifier(java.lang.Object uniqueModelIdentifier)
public void setHeaderValue(java.lang.String headerValue)
headerValue
- the new headerValuepublic java.lang.String getHeaderValue()
public void setHeaderRenderer(TableCellRenderer headerRenderer)
headerRenderer
- the new headerRendererpublic TableCellRenderer getHeaderRenderer()
public void setCellRenderer(TableCellRenderer cellRenderer)
cellRenderer
- the new cellRendererpublic TableCellRenderer getCellRenderer()
BaseTableView.getDefaultRenderer()
public void setCellEditor(TableCellEditor cellEditor)
cellEditor
- the new cellEditorpublic TableCellEditor getCellEditor()
BaseTableView.getDefaultEditor()
public void setResizable(boolean resizable)
public boolean isResizable()
public void setSize(int size)
public int getSize()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |