Search in sources :

Example 1 with SuppressRemote

use of org.vcell.util.VCellThreadChecker.SuppressRemote in project vcell by virtualcell.

the class TestingFrameworkWindowManager method viewResults.

/**
 * Insert the method's description here.
 * Creation date: (1/20/2003 11:52:18 AM)
 * @return boolean
 * @param mathDesc cbit.vcell.math.MathDescription
 */
public void viewResults(TestCriteriaNew testCriteria) {
    VCDataIdentifier vcdID = new VCSimulationDataIdentifier(testCriteria.getSimInfo().getAuthoritativeVCSimulationIdentifier(), 0);
    // get the data manager and wire it up
    try (SuppressRemote sr = new VCellThreadChecker.SuppressRemote()) {
        // okay to call remote from Swing for testing
        Simulation sim = ((ClientDocumentManager) getRequestManager().getDocumentManager()).getSimulation(testCriteria.getSimInfo());
        DataViewerController dataViewerCtr = getRequestManager().getDataViewerController(null, sim, 0);
        addDataListener(dataViewerCtr);
        // make the viewer
        DataViewer viewer = dataViewerCtr.createViewer();
        viewer.setDataViewerManager(this);
        addExportListener(viewer);
        // create the simCompareWindow - this is just a lightweight window to display the simResults.
        // It was created originally to compare 2 sims, it can also be used here instead of creating the more heavy-weight SimWindow.
        ChildWindowManager childWindowManager = TFWFinder.findChildWindowManager(getComponent());
        ChildWindow childWindow = childWindowManager.addChildWindow(viewer, vcdID, "Comparing ... " + vcdID, true);
        childWindow.setIsCenteredOnParent();
        childWindow.pack();
        childWindow.show();
    } catch (Throwable e) {
        PopupGenerator.showErrorDialog(TestingFrameworkWindowManager.this, e.getMessage());
    }
}
Also used : DataViewerController(cbit.vcell.client.data.DataViewerController) DataViewer(cbit.vcell.client.data.DataViewer) SuppressRemote(org.vcell.util.VCellThreadChecker.SuppressRemote) Simulation(cbit.vcell.solver.Simulation) ClientDocumentManager(cbit.vcell.clientdb.ClientDocumentManager) VCDataIdentifier(org.vcell.util.document.VCDataIdentifier) VCSimulationDataIdentifier(cbit.vcell.solver.VCSimulationDataIdentifier) ChildWindow(cbit.vcell.client.ChildWindowManager.ChildWindow)

Aggregations

ChildWindow (cbit.vcell.client.ChildWindowManager.ChildWindow)1 DataViewer (cbit.vcell.client.data.DataViewer)1 DataViewerController (cbit.vcell.client.data.DataViewerController)1 ClientDocumentManager (cbit.vcell.clientdb.ClientDocumentManager)1 Simulation (cbit.vcell.solver.Simulation)1 VCSimulationDataIdentifier (cbit.vcell.solver.VCSimulationDataIdentifier)1 SuppressRemote (org.vcell.util.VCellThreadChecker.SuppressRemote)1 VCDataIdentifier (org.vcell.util.document.VCDataIdentifier)1