public class IlvConfigurableTableColumn extends IlvStringColumn
IlvConfigurableTableColumn is a column definition that
can be customized for rendering and editing a property of an
IlvHierarchyNode, that is, an activity or a resource, in an
IlvJTable.
The property that is rendered is defined by an IlvStringProperty.
Editing of the property can be enabled separately for parent rows and
leaf rows.
If no customization is done for editing, editing is done in
an IlvTextFieldTableEditor.
If no customization is done for rendering, the
IlvDefaultTableCellRenderer is used.
DEFAULT_COLUMN_WIDTH| Constructor and Description |
|---|
IlvConfigurableTableColumn(Object headerValue,
IlvStringProperty property,
int width,
Object identifier)
Constructs a new column with the specified header value, a width, and a
column identifier, which will render the specified activity or
resource property.
|
IlvConfigurableTableColumn(Object headerValue,
IlvStringProperty property,
int width,
Object identifier,
TableCellEditor tableCellEditor,
TableCellRenderer tableCellRenderer)
Constructs a new column with the specified header value, a width, and a
column identifier, which will render the specified activity or
resource property, and with a table cell editor and a table cell
renderer.
|
IlvConfigurableTableColumn(Object headerValue,
IlvStringProperty property,
Object identifier)
Constructs a new column with the specified header value, which will
render the specified activity or resource property, and with a column
identifier.
|
IlvConfigurableTableColumn(Object headerValue,
IlvStringProperty property,
Object identifier,
TableCellEditor tableCellEditor,
TableCellRenderer tableCellRenderer)
Constructs a new column with the specified header value, that will
render the specified activity or resource property, with a column
identifier, and with a table cell editor and a table cell renderer.
|
| Modifier and Type | Method and Description |
|---|---|
protected TableCellEditor |
createEditor()
Creates the table cell editor that will be used to edit the
cells in this column.
|
protected TableCellRenderer |
createRenderer()
Creates the renderer that will be used to render the cells in this
column.
|
void |
setTableCellEditor(TableCellEditor tableCellEditor)
Sets the table cell editor that will be used to edit the cells in
this column.
|
void |
setTableCellRenderer(TableCellRenderer tableCellRenderer)
Sets the renderer that will be used to render the cells in this
column.
|
getGanttConfiguration, getGanttModel, getProperty, getValue, inform, isChildrenEditable, isEditable, isParentsEditable, setChildrenEditable, setGanttConfiguration, setParentsEditable, setValuecellUpdated, columnHeaderUpdated, columnUpdated, getColumn, getColumnIndex, getModelIndex, getTable, getValueAsText, setTable, updateUIpublic IlvConfigurableTableColumn(Object headerValue, IlvStringProperty property, Object identifier)
headerValue - The value rendered in the column header.property - The activity or resource property that will be
displayed in the column.identifier - The column identifier.public IlvConfigurableTableColumn(Object headerValue, IlvStringProperty property, int width, Object identifier)
width parameter is used to set
both the preferred and initial width of the column.headerValue - The value rendered in the column header.property - The activity or resource property that will be
displayed in the column.width - The width of the column.identifier - The column identifier.public IlvConfigurableTableColumn(Object headerValue, IlvStringProperty property, Object identifier, TableCellEditor tableCellEditor, TableCellRenderer tableCellRenderer)
headerValue - The value rendered in the column header.property - The activity or resource property that will be
displayed in the column.identifier - The column identifier.tableCellEditor - The table cell editor.tableCellRenderer - The table cell renderer.public IlvConfigurableTableColumn(Object headerValue, IlvStringProperty property, int width, Object identifier, TableCellEditor tableCellEditor, TableCellRenderer tableCellRenderer)
width parameter is used to set both the preferred
and initial width of the column.headerValue - The value rendered in the column header.property - The activity or resource property that will be
displayed in the column.width - The width of the column.identifier - The column identifier.tableCellEditor - The table cell editor.tableCellRenderer - The table cell renderer.protected TableCellEditor createEditor()
IlvTextFieldTableEditor is created.
When editing of a cell begins, the
getTableCellEditorComponent method of the editor will be
passed the value returned by the IlvStringColumn.getValue(ilog.views.gantt.IlvHierarchyNode) method of
the column. When editing is completed, the value returned by
the getCellEditorValue method of the editor will be
passed to the IlvStringColumn.setValue(ilog.views.gantt.IlvHierarchyNode, java.lang.Object) method of the column.
The table cell editor returned by this method is installed on the
internal TableColumn object of the column.
createEditor in class IlvStringColumnnull, as the default table cell editor.public void setTableCellEditor(TableCellEditor tableCellEditor)
null value is passed, an IlvTextFieldTableEditor
will be created.
When editing of a cell begins, the
getTableCellEditorComponent method of the editor will be
passed the value returned by the IlvStringColumn.getValue(ilog.views.gantt.IlvHierarchyNode) method of
the column. When editing is completed, the value returned by
the getCellEditorValue method of the editor will be
passed to the IlvStringColumn.setValue(ilog.views.gantt.IlvHierarchyNode, java.lang.Object) method of the column.
The table cell editor set by this method is installed on the
internal TableColumn object of the column.
tableCellEditor - The table cell editor to install on this column.protected TableCellRenderer createRenderer()
For each cell, the renderer will be passed the value
returned by the IlvStringColumn.getValue(ilog.views.gantt.IlvHierarchyNode) method of the column.
The renderer returned by this method is installed on the
internal TableColumn object of the column.
If no table cell renderer has been defined, this default
implementation creates an IlvDefaultTableCellRenderer that
renders the cell value as a string by invoking the
toString method of the value. Subclasses should override
this method as needed.
createRenderer in class IlvAbstractJTableColumnIlvDefaultTableCellRenderer as the default
table cell renderer.public void setTableCellRenderer(TableCellRenderer tableCellRenderer)
For each cell, the renderer will be passed the value
returned by the IlvStringColumn.getValue(ilog.views.gantt.IlvHierarchyNode) method of the column.
The renderer set by this method is installed on the
internal TableColumn object of the column.
If no table cell renderer has been specified, that is, a
null value is passed, an
IlvDefaultTableCellRenderer is created that
renders the cell value as a string by invoking the
toString method of the value.
tableCellRenderer - The table cell renderer.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.