public class CallbackDescriptorTableModel extends CayenneTableModel
CayenneTableModel.PropertyComparator| Modifier and Type | Field and Description |
|---|---|
protected CallbackDescriptor |
callbackDescriptor |
protected CallbackType |
callbackType |
protected ObjEntity |
entity |
static int |
METHOD_NAME |
eventSource, mediator, objectListlistenerList| Constructor and Description |
|---|
CallbackDescriptorTableModel(ProjectController mediator,
Object eventSource,
List objectList,
CallbackDescriptor callbackDescriptor,
CallbackType callbackType)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
CallbackDescriptor |
getCallbackDescriptor() |
String |
getCallbackMethod(int rowIndex) |
CallbackType |
getCallbackType() |
int |
getColumnCount()
Returns the number of columns in the model.
|
String |
getColumnName(int column) |
Class |
getElementsClass()
Returns Java class of the internal list elements.
|
Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at
columnIndex and
rowIndex. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
all cells are editable
|
boolean |
isColumnSortable(int sortCol) |
protected void |
orderList()
sorting disabled
|
void |
setUpdatedValueAt(Object newVal,
int row,
int col)
does nothing
|
void |
setValueAt(Object newVal,
int row,
int col)
stores edited value
|
void |
sortByColumn(int sortCol,
boolean isAscent) |
addRow, getEventSource, getMediator, getObjectList, getOrderingKey, getRowCount, isValid, moveRowDown, moveRowUp, removeRow, resetModel, sortByElementProperty, swapRowsaddTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListenerpublic static final int METHOD_NAME
protected ObjEntity entity
protected CallbackDescriptor callbackDescriptor
protected CallbackType callbackType
public CallbackDescriptorTableModel(ProjectController mediator, Object eventSource, List objectList, CallbackDescriptor callbackDescriptor, CallbackType callbackType)
mediator - mediator instanceeventSource - event sourceobjectList - default objects listcallbackDescriptor - callback descriptor instancepublic void setUpdatedValueAt(Object newVal, int row, int col)
setUpdatedValueAt in class CayenneTableModelnewVal - newValrow - rowcol - colpublic Class getElementsClass()
getElementsClass in class CayenneTableModelpublic String getCallbackMethod(int rowIndex)
rowIndex - method indexpublic int getColumnCount()
JTable uses this method
to determine how many columns it should create and display by default.CayenneTableModel.getRowCount()public Object getValueAt(int rowIndex, int columnIndex)
columnIndex and
rowIndex.rowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queriedprotected void orderList()
orderList in class CayenneTableModelpublic String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelcolumn - column indexpublic boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrowIndex - row indexcolumnIndex - column indexpublic void setValueAt(Object newVal, int row, int col)
setValueAt in interface TableModelsetValueAt in class CayenneTableModelnewVal - new valuerow - rowcol - columnpublic CallbackDescriptor getCallbackDescriptor()
public CallbackType getCallbackType()
public boolean isColumnSortable(int sortCol)
isColumnSortable in class CayenneTableModelpublic void sortByColumn(int sortCol,
boolean isAscent)
sortByColumn in class CayenneTableModelCopyright © 2001–2015 Apache Cayenne. All rights reserved.