public abstract class CayenneTableModel<T> extends AbstractTableModel
| Modifier and Type | Class and Description |
|---|---|
protected class |
CayenneTableModel.PropertyComparator |
| Modifier and Type | Field and Description |
|---|---|
protected Object |
eventSource |
protected ProjectController |
mediator |
protected List<T> |
objectList |
listenerList| Constructor and Description |
|---|
CayenneTableModel(ProjectController mediator,
Object eventSource,
List<T> objectList)
Constructor for CayenneTableModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRow(T row) |
abstract Class<?> |
getElementsClass()
Returns Java class of the internal list elements.
|
Object |
getEventSource()
Returns an object used as an event source.
|
ProjectController |
getMediator()
Returns EventController object.
|
List<T> |
getObjectList()
Returns internal object list.
|
String |
getOrderingKey()
Returns the key by which to order elements in the object list.
|
int |
getRowCount()
Returns the number of objects on the list.
|
abstract boolean |
isColumnSortable(int sortCol) |
boolean |
isValid() |
int |
moveRowDown(Object row)
Moves a row down, jumping up if row is already at the bottom.
|
int |
moveRowUp(Object row)
Moves a row up, jumping down if row is already at the top.
|
protected void |
orderList()
Orders internal object list.
|
void |
removeRow(Object row) |
void |
resetModel()
Correct errors that model has.
|
abstract void |
setUpdatedValueAt(Object newVal,
int row,
int col)
Sets a new value after it is already checked by the superclass and it is determined
that the value has changed.
|
void |
setValueAt(Object newVal,
int row,
int col) |
abstract void |
sortByColumn(int sortCol,
boolean isAscent) |
void |
sortByElementProperty(String string,
boolean isAscent) |
protected void |
swapRows(int i,
int j) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColumnCount, getValueAtprotected ProjectController mediator
protected Object eventSource
public CayenneTableModel(ProjectController mediator, Object eventSource, List<T> objectList)
public void setValueAt(Object newVal, int row, int col)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic abstract void setUpdatedValueAt(Object newVal, int row, int col)
protected void orderList()
getOrderingKey is used
for comparison.public abstract Class<?> getElementsClass()
public String getOrderingKey()
public int getRowCount()
public Object getEventSource()
public ProjectController getMediator()
public void addRow(T row)
public void removeRow(Object row)
public int moveRowUp(Object row)
public int moveRowDown(Object row)
protected void swapRows(int i,
int j)
public void resetModel()
public boolean isValid()
public abstract void sortByColumn(int sortCol,
boolean isAscent)
public abstract boolean isColumnSortable(int sortCol)
public void sortByElementProperty(String string, boolean isAscent)
Copyright © 2001–2015 Apache Cayenne. All rights reserved.