|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object util.swing.AbstractTableEntryDescriptor
public abstract class AbstractTableEntryDescriptor
Abstract base implementation of TableEntryDescriptor
.
This base implementations is useful when you want to define a TableEntryDescriptor that describes rows that are non-editable and use the default renderer for each cell, based on the cell value's class.
AbstractTableModel
,
Serialized FormConstructor Summary | |
---|---|
AbstractTableEntryDescriptor()
Dummy constructor, does nothing but call super() . |
Method Summary | |
---|---|
boolean |
canSortByColumn(int nIdx)
Returns false because AbstractTableEntryDescriptor does not allow sorting by column by default. |
TableCellEditor |
getCellEditor(int nIdx)
Returns null to indicate that the default cell editor is to be used based on the cell
value's class. |
TableCellRenderer |
getCellRenderer(int nIdx)
Returns null to indicate that the default cell renderer is to be used based on the cell
value's class. |
Comparator<Object> |
getColumnOrder(int nIdx)
Returns null because AbstractTableEntryDescriptor does not allow sorting by column by default. |
boolean |
isElementEditable(Object oRecord,
int nIdx)
Returns false to indicate that no cell is editable in the entire table. |
void |
setValueAt(Object oRecord,
int nIdx,
Object oValue)
Does nothing because AbstractTableEntryDescriptor does not allow editing by default. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface util.swing.TableEntryDescriptor |
---|
getColumnClass, getColumnCount, getColumnName, getValueAt |
Constructor Detail |
---|
public AbstractTableEntryDescriptor()
super()
.
Method Detail |
---|
public TableCellRenderer getCellRenderer(int nIdx)
null
to indicate that the default cell renderer is to be used based on the cell
value's class.
getCellRenderer
in interface TableEntryDescriptor
nIdx
- the index of the column for which to return the renderer. Indices run from 0 to
getColumnCount() - 1
.
null
to
indicate that the default cell renderer for the column class
should be used.public TableCellEditor getCellEditor(int nIdx)
null
to indicate that the default cell editor is to be used based on the cell
value's class.
getCellEditor
in interface TableEntryDescriptor
nIdx
- the index of the column for which to return the editor. Indices run from 0 to
getColumnCount() - 1
.
null
to
indicate that the default cell editor for the column class
should be used.isElementEditable(java.lang.Object, int)
and setValueAt(java.lang.Object, int, java.lang.Object)
for complete editing support.public boolean isElementEditable(Object oRecord, int nIdx)
false
to indicate that no cell is editable in the entire table.
isElementEditable
in interface TableEntryDescriptor
oRecord
- the record for which to determine editability. The actual class depends on the
AbstractTableModel
you are working with. It will be declared in the documentation for
the AbstractTableModel.getRecord(int)
method of that class.nIdx
- the index of the column for which to determine editability. Indices run from 0 to
getColumnCount() - 1
.
oRecord
depends on the TableModel
with which you work. See AbstractTableModel.getRecord(int)
in the concrete TableModel for a
description.
Note that you will also have to override setValueAt(java.lang.Object, int, java.lang.Object)
for complete editing support. It is also
recommended that you override getCellEditor(int)
if you override this method.public void setValueAt(Object oRecord, int nIdx, Object oValue)
setValueAt
in interface TableEntryDescriptor
oRecord
- the record for which to determine the value. The actual class depends on the
AbstractTableModel
you are working with. It will be declared in the documentation for
the AbstractTableModel.getRecord(int)
method of that class.nIdx
- the index of the column for which to return the cell value. Indices run from 0 to
getColumnCount() - 1
.oValue
- the value to become the new value of the cell. The class of this object depends on the
editor used for editing the cell. Normally, this will be determined by TableEntryDescriptor.getCellEditor(int)
.oRecord
depends on the TableModel
with which you work. See AbstractTableModel.getRecord(int)
in the concrete TableModel for a
description.
Note that you will also have to override isElementEditable(java.lang.Object, int)
for complete editing support. It is
also recommended that you override getCellEditor(int)
if you override this method.public boolean canSortByColumn(int nIdx)
canSortByColumn
in interface TableEntryDescriptor
nIdx
- the index of the column concerned.
public Comparator<Object> getColumnOrder(int nIdx)
null
because AbstractTableEntryDescriptor does not allow sorting by column by default.
getColumnOrder
in interface TableEntryDescriptor
nIdx
- the index of the column concerned.
|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |