util
Class CompoundModel
java.lang.Object
java.util.Observable
util.AbstractDataModel
util.CompoundModel
- All Implemented Interfaces:
- Observer, DataModel
public class CompoundModel
- extends AbstractDataModel
- implements Observer
Join two Data Models into a single model. Model A's columns come first
in the new model followed by model B's. The order of models matters for
delete and insert; model A's delete/insert is performed before model B's.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompoundModel
public CompoundModel(DataModel aModelA,
DataModel aModelB)
insertRow
public boolean insertRow(int row)
- Specified by:
insertRow in interface DataModel- Overrides:
insertRow in class AbstractDataModel
deleteRow
public boolean deleteRow(int row)
- Specified by:
deleteRow in interface DataModel- Overrides:
deleteRow in class AbstractDataModel
canInsertRow
public boolean canInsertRow(int row)
- Specified by:
canInsertRow in interface DataModel- Overrides:
canInsertRow in class AbstractDataModel
canDeleteRow
public boolean canDeleteRow(int row)
- Specified by:
canDeleteRow in interface DataModel- Overrides:
canDeleteRow in class AbstractDataModel
update
public void update(Observable o,
Object arg)
- Specified by:
update in interface Observer
getColumnClass
public Class getColumnClass(int columnIndex)
- Specified by:
getColumnClass in interface DataModel- Overrides:
getColumnClass in class AbstractDataModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount in interface DataModel- Overrides:
getColumnCount in class AbstractDataModel
getColumnName
public String getColumnName(int columnIndex)
- Specified by:
getColumnName in interface DataModel- Overrides:
getColumnName in class AbstractDataModel
getRowCount
public int getRowCount()
- Specified by:
getRowCount in interface DataModel- Overrides:
getRowCount in class AbstractDataModel
getValueAt
public Object getValueAt(int rowIndex,
int columnIndex)
- Specified by:
getValueAt in interface DataModel- Overrides:
getValueAt in class AbstractDataModel
isCellEditable
public boolean isCellEditable(int rowIndex,
int columnIndex)
- Specified by:
isCellEditable in interface DataModel- Overrides:
isCellEditable in class AbstractDataModel
setValueAt
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
- Specified by:
setValueAt in interface DataModel- Overrides:
setValueAt in class AbstractDataModel
Copyright © 2010, 2011 Mike Feeley. All Rights Reserved.