|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.TableColumn | +--com.klg.jclass.util.swing.JCTableColumn
JCTableColumn extends TableColumn to add an EditorRendererRegistry type and a header label horizontal alignment specification.
Field Summary | |
protected int |
headerLabelHorizontalAlignment
|
protected String |
registryType
|
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 |
Constructor Summary | |
JCTableColumn()
Default constructor |
|
JCTableColumn(int modelIndex)
Constructor which specifies the model index of this column. |
|
JCTableColumn(int modelIndex,
int width)
Constructor which specifies the model index and the width of this column. |
|
JCTableColumn(int modelIndex,
int width,
String registryType)
Constructor which specifies the registry type, width, and model index. |
|
JCTableColumn(int modelIndex,
int width,
TableCellRenderer cellRenderer,
TableCellEditor cellEditor)
Constructor which specifies the model index, width, and a cell renderer and editor for this column. |
|
JCTableColumn(int modelIndex,
int width,
TableCellRenderer cellRenderer,
TableCellEditor cellEditor,
String registryType)
Constructor which specifies the model index, width, a cell renderer and editor, and a registry type for this column. |
|
JCTableColumn(int modelIndex,
String registryType)
Constructor which specifies the registry type and the model index. |
|
JCTableColumn(String registryType)
Constructor which specifies the registry type. |
Method Summary | |
TableCellEditor |
getCellEditor()
Returns the TableCellEditor used by the JTable to
edit values for this column. |
int |
getHeaderLabelHorizontalAlignment()
Gets the horizontal alignment for the JLabel within the header
of this column. |
String |
getRegistryType()
Get the current registry type. |
void |
setHeaderLabelHorizontalAlignment(int alignment)
Sets the horizontal alignment for the JLabel within the header
of this column. |
void |
setRegistryType(String registryType)
Set the current registry type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String registryType
protected int headerLabelHorizontalAlignment
Constructor Detail |
public JCTableColumn()
public JCTableColumn(String registryType)
EditorRendererRegistry
allows multipule editors and renderers to
be registered for a particular class by defining a different modifier type
for each.
registryType
- The registry modifier type (can be null)public JCTableColumn(int modelIndex)
modelIndex
is the index of the column in the model which will
supply the data for this column in the table. The modelIndex
does not change as the columns are reordered in the view.
modelIndex
- The model index for this columnpublic JCTableColumn(int modelIndex, String registryType)
EditorRendererRegistry
allows multipule editors and renderers
to be registered for a particular class by defining a different modifier type
for each. The modelIndex
is the index of the column in the model
which will supply the data for this column in the table. The
modelIndex
does not change as the columns are reordered in the
view.
modelIndex
- The model index for this columnregistryType
- The registry modifier type (can be null)public JCTableColumn(int modelIndex, int width)
modelIndex
is the index of the column in the model which will
supply the data for this column in the table. The modelIndex
does not change as the columns are reordered in the view. The width
parameter is used to set both the preferredWidth
for this
column and the initial width.
modelIndex
- The model index for this columnwidth
- The preferred and initial width of this columnpublic JCTableColumn(int modelIndex, int width, String registryType)
EditorRendererRegistry
allows multipule editors and renderers to
be registered for a particular class by defining a different modifier type
for each. The modelIndex
is the index of the column in the model
which will supply the data for this column in the table. The
modelIndex
does not change as the columns are reordered in the
view. The width parameter is used to set both the preferredWidth
for this column and the initial width.
modelIndex
- The model index for this columnwidth
- The preferred and initial width of this columnregistryType
- The registry modifier type (can be null)public JCTableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor)
modelIndex
is the index of the
column in the model which will supply the data for this column in the table.
The modelIndex
does not change as the columns are reordered in
the view. The width parameter is used to set both the
preferredWidth
for this column and the initial width. The
renderer and editor are the objects used respectively to render and edit
values in this column. When these are null
, default values,
provided by the getDefaultRenderer
and
getDefaultEditor
methods in the JTable
class are
used to provide defaults based on the type of the data in this column.
modelIndex
- The model index for this columnwidth
- The preferred and initial width of this columncellRenderer
- The cell renderer for this columncellEditor
- The cell editor for this columnJTable.getDefaultRenderer(Class)
,
JTable.getDefaultEditor(Class)
,
JTable.getCellRenderer(int, int)
,
JTable.getCellEditor(int, int)
public JCTableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor, String registryType)
modelIndex
is
the index of the column in the model which will supply the data for this
column in the table. The modelIndex
does not change as the
columns are reordered in the view. The width parameter is used to set both
the preferredWidth
for this column and the initial width. The
renderer and editor are the objects used respectively to render and edit
values in this column. When these are null
, default values,
provided by the getDefaultRenderer
and
getDefaultEditor
methods in the JTable
class are
used to provide defaults based on the type of the data in this column. The
EditorRendererRegistry
allows multipule editors and renderers
to be registered for a particular class by defining a different modifier type
for each.
modelIndex
- The model index for this columnwidth
- The preferred and initial width of this columncellRenderer
- The cell renderer for this columncellEditor
- The cell editor for this columnregistryType
- The registry modifier type (can be null)JTable.getDefaultRenderer(Class)
,
JTable.getDefaultEditor(Class)
,
JTable.getCellRenderer(int, int)
,
JTable.getCellEditor(int, int)
Method Detail |
public String getRegistryType()
EditorRendererRegistry
allows multipule editors and renderers to be registered for a particular
class by defining a different modifier type for each.
public void setRegistryType(String registryType)
EditorRendererRegistry
allows multipule editors and renderers to be registered for a particular
class by defining a different modifier type for each.
registryType
- The new registry type (can be null)public TableCellEditor getCellEditor()
TableCellEditor
used by the JTable
to
edit values for this column. When the cellEditor
is
null
, the JTable
uses a default editor based on the
class of the cells in that column. The default value for a
cellEditor
is null
.
getCellEditor
in class TableColumn
cellEditor
for this columnTableColumn.setCellEditor(javax.swing.table.TableCellEditor)
,
JTable.setDefaultEditor(java.lang.Class, javax.swing.table.TableCellEditor)
public void setHeaderLabelHorizontalAlignment(int alignment)
JLabel
within the header
of this column. This is used by the default header renderer for
JCSortableTable
and JCTreeTable
. By default this
value is a non-valid alignment value, in which case the renderer will use
the default JLabel
horizontal alignment value, which is
SwingConstants.LEADING
.
alignment
- the new header label horizontal alignment valueJLabel
public int getHeaderLabelHorizontalAlignment()
JLabel
within the header
of this column. This is used by the default header renderer for
JCSortableTable
and JCTreeTable
. By default this
value is a non-valid alignment value, in which case the renderer will use
the default JLabel
horizontal alignment value, which is
SwingConstants.LEADING
.
JLabel
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |