use of cbit.vcell.client.desktop.biomodel.SelectionManager in project vcell by virtualcell.
the class DefaultScrollTableCellRenderer method isMatchWithSelectedObject.
private boolean isMatchWithSelectedObject(JTable table, int row) {
SpatialProcessTableModel tm = (SpatialProcessTableModel) table.getModel();
SelectionManager selectionManager = tm.getSelectionManager();
boolean found = false;
if (selectionManager != null) {
for (Object ob : selectionManager.getSelectedObjects()) {
if (ob instanceof SpatialObject) {
// a SpatialObject selected
List<SpatialProcess> spList = ((SpatialObject) ob).getRelatedSpatialProcesses();
for (SpatialProcess theirs : spList) {
SpatialProcess ours = tm.getValueAt(row);
if (ours == theirs) {
found = true;
break;
}
}
}
if (found == true) {
break;
}
}
}
return found;
}
use of cbit.vcell.client.desktop.biomodel.SelectionManager in project vcell by virtualcell.
the class DefaultScrollTableCellRenderer method isMatchWithSelectedProcess.
private boolean isMatchWithSelectedProcess(JTable table, int row) {
SpatialObjectTableModel tm = (SpatialObjectTableModel) table.getModel();
SelectionManager selectionManager = tm.getSelectionManager();
boolean found = false;
if (selectionManager != null) {
for (Object ob : selectionManager.getSelectedObjects()) {
if (ob instanceof SpatialProcess) {
// a SpatialProcess selected
List<SpatialObject> soList = ((SpatialProcess) ob).getSpatialObjects();
for (SpatialObject theirs : soList) {
SpatialObject ours = tm.getValueAt(row);
if (ours == theirs) {
found = true;
break;
}
}
}
if (found == true) {
break;
}
}
}
return found;
}
Aggregations