*/
try {
int selectedRow = _activeCasesTable.getSelectedRow();
if (selectedRow >= 0) {
String caseIDStr = (String) _activeCasesTable.getValueAt(selectedRow, 1);
YIdentifier id = _engineManagement.getCaseID(caseIDStr);
if (id != null) {
_engineManagement.cancelCase(id);
_activeCasesTableModel.removeRow(id.toString());
}
}
} catch (YPersistenceException e2) {
logError("Failure to cancel case", e2);
}
} else if (command == _inspectStateCommand) {
/**
* Report the state of a case
*/
try {
int selectedRow = _activeCasesTable.getSelectedRow();
if (selectedRow >= 0) {
String caseIDStr = (String) _activeCasesTable.getValueAt(selectedRow, 1);
YIdentifier id = _engineManagement.getCaseID(caseIDStr);
if (id != null) {
String textToDisplay = _engineManagement.getStateTextForCase(id);
new YInspectStateDialog(_frame, textToDisplay);
}
}