Search in sources :

Example 1 with DatabaseWindowManager

use of cbit.vcell.client.DatabaseWindowManager in project vcell by virtualcell.

the class MathModelEditor method setMathModelWindowManager.

/**
 * Insert the method's description here.
 * Creation date: (5/7/2004 5:40:13 PM)
 * @param newBioModelWindowManager cbit.vcell.client.desktop.BioModelWindowManager
 */
public void setMathModelWindowManager(MathModelWindowManager newValue) {
    if (this.mathModelWindowManager == newValue) {
        return;
    }
    this.mathModelWindowManager = newValue;
    geometryViewer.addActionListener(mathModelWindowManager);
    mathModelPropertiesPanel.setMathModelWindowManager(mathModelWindowManager);
    simulationListPanel.setSimulationWorkspace(mathModelWindowManager.getSimulationWorkspace());
    DatabaseWindowManager dbWindowManager = new DatabaseWindowManager(databaseWindowPanel, mathModelWindowManager.getRequestManager());
    databaseWindowPanel.setDatabaseWindowManager(dbWindowManager);
    DocumentManager documentManager = mathModelWindowManager.getRequestManager().getDocumentManager();
    databaseWindowPanel.setDocumentManager(documentManager);
    geometryMetaDataPanel.setDocumentManager(documentManager);
    updateGeometryViewerOwner();
}
Also used : DocumentManager(cbit.vcell.clientdb.DocumentManager) DatabaseWindowManager(cbit.vcell.client.DatabaseWindowManager)

Example 2 with DatabaseWindowManager

use of cbit.vcell.client.DatabaseWindowManager in project vcell by virtualcell.

the class BioModelEditor method setBioModelWindowManager.

/**
 * Insert the method's description here.
 * Creation date: (5/7/2004 5:40:13 PM)
 * @param newBioModelWindowManager cbit.vcell.client.desktop.BioModelWindowManager
 */
public void setBioModelWindowManager(BioModelWindowManager bioModelWindowManager) {
    if (this.bioModelWindowManager == bioModelWindowManager) {
        return;
    }
    this.bioModelWindowManager = bioModelWindowManager;
    bioModelsNetPanel.setDocumentWindowManager(bioModelWindowManager);
    getBioModelsNetPropertiesPanel().setDocumentWindowManager(bioModelWindowManager);
    bioModelPropertiesPanel.setBioModelWindowManager(bioModelWindowManager);
    bioModelParametersPanel.setBioModelWindowManager(bioModelWindowManager);
    DatabaseWindowManager dbWindowManager = new DatabaseWindowManager(databaseWindowPanel, bioModelWindowManager.getRequestManager());
    databaseWindowPanel.setDatabaseWindowManager(dbWindowManager);
    DocumentManager documentManager = bioModelWindowManager.getRequestManager().getDocumentManager();
    databaseWindowPanel.setDocumentManager(documentManager);
    bioModelEditorModelPanel.setDocumentManager(documentManager);
    geometryMetaDataPanel.setDocumentManager(documentManager);
    bioModelEditorApplicationPanel.setBioModelWindowManager(bioModelWindowManager);
}
Also used : DocumentManager(cbit.vcell.clientdb.DocumentManager) DatabaseWindowManager(cbit.vcell.client.DatabaseWindowManager)

Example 3 with DatabaseWindowManager

use of cbit.vcell.client.DatabaseWindowManager in project vcell by virtualcell.

the class DatabaseWindowPanel method setDatabaseWindowManager.

/**
 * Sets the databaseWindowManager property (cbit.vcell.client.DatabaseWindowManager) value.
 * @param databaseWindowManager The new value for the property.
 * @see #getDatabaseWindowManager
 */
public void setDatabaseWindowManager(DatabaseWindowManager databaseWindowManager) {
    DatabaseWindowManager oldValue = fieldDatabaseWindowManager;
    fieldDatabaseWindowManager = databaseWindowManager;
    firePropertyChange("databaseWindowManager", oldValue, databaseWindowManager);
}
Also used : DatabaseWindowManager(cbit.vcell.client.DatabaseWindowManager)

Example 4 with DatabaseWindowManager

use of cbit.vcell.client.DatabaseWindowManager in project vcell by virtualcell.

the class DocumentToExport method run.

/**
 * Insert the method's description here. Creation date: (5/31/2004 6:04:14
 * PM)
 *
 * @param hashTable
 *            java.util.Hashtable
 * @param clientWorker
 *            cbit.vcell.desktop.controls.ClientWorker
 */
@Override
public void run(Hashtable<String, Object> hashTable) throws java.lang.Exception {
    TopLevelWindowManager topLevelWindowManager = extractRequired(hashTable, TopLevelWindowManager.class, "topLevelWindowManager");
    VCDocument doc = null;
    if (topLevelWindowManager instanceof DocumentWindowManager) {
        doc = ((DocumentWindowManager) topLevelWindowManager).getVCDocument();
    } else if (topLevelWindowManager instanceof DatabaseWindowManager) {
        DocumentManager documentManager = extractRequired(hashTable, DocumentManager.class, CommonTask.DOCUMENT_MANAGER.name);
        VCDocumentInfo documentInfo = ((DatabaseWindowManager) topLevelWindowManager).getPanelSelection();
        if (documentInfo instanceof BioModelInfo) {
            BioModelInfo bmi = (BioModelInfo) documentInfo;
            doc = documentManager.getBioModel(bmi);
        } else if (documentInfo instanceof MathModelInfo) {
            MathModelInfo mmi = (MathModelInfo) documentInfo;
            doc = documentManager.getMathModel(mmi);
        } else if (documentInfo instanceof GeometryInfo) {
            GeometryInfo gmi = (GeometryInfo) documentInfo;
            doc = documentManager.getGeometry(gmi);
        }
        if (doc == null) {
            throw new IllegalStateException("export called on DatabaseWindowManager with selection " + documentInfo);
        }
    }
    if (doc != null) {
        hashTable.put(EXPORT_DOCUMENT, doc);
    } else {
        throw new UnsupportedOperationException("TopLevelWindowManager subclass " + topLevelWindowManager.getClass().getName() + " does not support exporting to document");
    }
}
Also used : VCDocument(org.vcell.util.document.VCDocument) TopLevelWindowManager(cbit.vcell.client.TopLevelWindowManager) DocumentWindowManager(cbit.vcell.client.DocumentWindowManager) VCDocumentInfo(org.vcell.util.document.VCDocumentInfo) DocumentManager(cbit.vcell.clientdb.DocumentManager) BioModelInfo(org.vcell.util.document.BioModelInfo) GeometryInfo(cbit.vcell.geometry.GeometryInfo) MathModelInfo(org.vcell.util.document.MathModelInfo) DatabaseWindowManager(cbit.vcell.client.DatabaseWindowManager)

Aggregations

DatabaseWindowManager (cbit.vcell.client.DatabaseWindowManager)4 DocumentManager (cbit.vcell.clientdb.DocumentManager)3 DocumentWindowManager (cbit.vcell.client.DocumentWindowManager)1 TopLevelWindowManager (cbit.vcell.client.TopLevelWindowManager)1 GeometryInfo (cbit.vcell.geometry.GeometryInfo)1 BioModelInfo (org.vcell.util.document.BioModelInfo)1 MathModelInfo (org.vcell.util.document.MathModelInfo)1 VCDocument (org.vcell.util.document.VCDocument)1 VCDocumentInfo (org.vcell.util.document.VCDocumentInfo)1