use of cbit.vcell.mapping.spatial.processes.SpatialProcess in project vcell by virtualcell.
the class SpatialProcessDisplayPanel method getFreeSurfaceRegionObject.
private SurfaceRegionObject getFreeSurfaceRegionObject() {
for (SpatialObject spatialObject : simulationContext.getSpatialObjects()) {
if (spatialObject instanceof SurfaceRegionObject) {
SurfaceRegionObject surfaceRegionObject = (SurfaceRegionObject) spatialObject;
boolean bSurfaceRegionObjectFree = true;
for (SpatialProcess spatialProcess : simulationContext.getSpatialProcesses()) {
if (spatialProcess.getSpatialObjects().contains(surfaceRegionObject)) {
bSurfaceRegionObjectFree = false;
break;
}
}
if (bSurfaceRegionObjectFree) {
return surfaceRegionObject;
}
}
}
return null;
}
use of cbit.vcell.mapping.spatial.processes.SpatialProcess in project vcell by virtualcell.
the class SpatialProcessDisplayPanel method getOrCreateNextPointObject.
private PointObject getOrCreateNextPointObject() {
for (SpatialObject spatialObject : simulationContext.getSpatialObjects()) {
if (spatialObject instanceof PointObject) {
PointObject pointObject = (PointObject) spatialObject;
boolean bPointObjectFree = true;
for (SpatialProcess spatialProcess : simulationContext.getSpatialProcesses()) {
if (spatialProcess.getSpatialObjects().contains(pointObject)) {
bPointObjectFree = false;
break;
}
}
if (bPointObjectFree) {
return pointObject;
}
}
}
return simulationContext.createPointObject();
}
use of cbit.vcell.mapping.spatial.processes.SpatialProcess in project vcell by virtualcell.
the class SpatialProcessDisplayPanel method getFreeVolumeRegionObject.
private VolumeRegionObject getFreeVolumeRegionObject() {
for (SpatialObject spatialObject : simulationContext.getSpatialObjects()) {
if (spatialObject instanceof VolumeRegionObject) {
VolumeRegionObject volumeRegionObject = (VolumeRegionObject) spatialObject;
boolean bVolumeRegionObjectFree = true;
for (SpatialProcess spatialProcess : simulationContext.getSpatialProcesses()) {
if (spatialProcess.getSpatialObjects().contains(volumeRegionObject)) {
bVolumeRegionObjectFree = false;
break;
}
}
if (bVolumeRegionObjectFree) {
return volumeRegionObject;
}
}
}
return null;
}
use of cbit.vcell.mapping.spatial.processes.SpatialProcess in project vcell by virtualcell.
the class BioModelEditor method setRightBottomPanelOnSelection.
@Override
protected void setRightBottomPanelOnSelection(Object[] selections) {
if (selections == null) {
return;
}
JComponent bottomComponent = rightBottomEmptyPanel;
int destComponentIndex = DocumentEditorTabID.object_properties.ordinal();
boolean bShowInDatabaseProperties = false;
boolean bShowPathway = false;
if (selections.length == 1) {
Object singleSelection = selections[0];
if (singleSelection instanceof ReactionStep) {
bottomComponent = getReactionPropertiesPanel();
} else if (singleSelection instanceof ReactionRule) {
bottomComponent = getReactionRulePropertiesPanel();
} else if (singleSelection instanceof SpeciesContext) {
bottomComponent = getSpeciesPropertiesPanel();
} else if (singleSelection instanceof MolecularType) {
bottomComponent = getMolecularTypePropertiesPanel();
} else if (singleSelection instanceof RbmObservable) {
bottomComponent = getObservablePropertiesPanel();
} else if (singleSelection instanceof Structure) {
bottomComponent = getStructurePropertiesPanel();
getStructurePropertiesPanel().setModel(bioModel.getModel());
} else if (singleSelection instanceof Parameter) {
bottomComponent = getParameterPropertiesPanel();
} else if (singleSelection instanceof SimulationContext) {
bottomComponent = getApplicationPropertiesPanel();
} else if (singleSelection instanceof ParameterEstimationTask) {
bottomComponent = parameterEstimationTaskPropertiesPanel;
} else if (singleSelection instanceof Product || singleSelection instanceof Reactant) {
bottomComponent = getReactionParticipantPropertiesPanel();
} else if (singleSelection instanceof BioModelInfo) {
bShowInDatabaseProperties = true;
bottomComponent = bioModelMetaDataPanel;
} else if (singleSelection instanceof MathModelInfo) {
bShowInDatabaseProperties = true;
bottomComponent = mathModelMetaDataPanel;
} else if (singleSelection instanceof GeometryInfo) {
bShowInDatabaseProperties = true;
bottomComponent = geometryMetaDataPanel;
} else if (singleSelection instanceof SpeciesContextSpec) {
bottomComponent = getSpeciesContextSpecPanel();
} else if (singleSelection instanceof ReactionSpec) {
bottomComponent = getKineticsTypeTemplatePanel();
} else if (singleSelection instanceof ReactionRuleSpec) {
//
bottomComponent = getReactionRuleSpecPropertiesPanel();
} else if (singleSelection instanceof BioModelsNetModelInfo) {
bShowInDatabaseProperties = true;
bottomComponent = getBioModelsNetPropertiesPanel();
} else if (singleSelection instanceof Simulation) {
bottomComponent = getSimulationSummaryPanel();
} else if (singleSelection instanceof DataSymbol) {
bottomComponent = getDataSymbolsSpecPanel();
} else if (singleSelection instanceof BioEvent) {
bottomComponent = getEventPanel();
} else if (singleSelection instanceof SpatialObject) {
bottomComponent = getSpatialObjectPropertyPanel();
} else if (singleSelection instanceof SpatialProcess) {
bottomComponent = getSpatialProcessPropertyPanel();
} else if (singleSelection instanceof BioPaxObject) {
bottomComponent = bioPaxObjectPropertiesPanel;
} else if (singleSelection instanceof BioModel || singleSelection instanceof VCMetaData) {
bottomComponent = bioModelEditorAnnotationPanel;
} else if (singleSelection instanceof PathwayData) {
bShowPathway = true;
bottomComponent = getBioModelEditorPathwayPanel();
} else if (singleSelection instanceof Model) {
} else if (singleSelection instanceof RuleParticipantSignature) {
bottomComponent = getReactionRuleParticipantSignaturePropertiesPanel();
} else if (singleSelection instanceof CSGObject) {
bottomComponent = csgObjectPropertiesPanel;
csgObjectPropertiesPanel.setSimulationContext(getSelectedSimulationContext());
} else if (singleSelection instanceof DocumentEditorTreeFolderNode) {
DocumentEditorTreeFolderClass folderClass = ((DocumentEditorTreeFolderNode) singleSelection).getFolderClass();
if ((folderClass == DocumentEditorTreeFolderClass.REACTIONS_NODE) && !(singleSelection instanceof ReactionRule)) {
bottomComponent = getReactionPropertiesPanel();
} else if ((folderClass == DocumentEditorTreeFolderClass.REACTIONS_NODE) && (singleSelection instanceof ReactionRule)) {
bottomComponent = getReactionRulePropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.STRUCTURES_NODE) {
bottomComponent = getStructurePropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.SPECIES_NODE) {
bottomComponent = getSpeciesPropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.MOLECULAR_TYPES_NODE) {
bottomComponent = getMolecularTypePropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.OBSERVABLES_NODE) {
bottomComponent = getObservablePropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.APPLICATIONS_NODE) {
bottomComponent = getApplicationsPropertiesPanel();
getApplicationsPropertiesPanel().setBioModel(bioModel);
} else if (folderClass == DocumentEditorTreeFolderClass.PARAMETER_ESTIMATION_NODE) {
bottomComponent = parameterEstimationTaskPropertiesPanel;
}
}
}
if (bShowPathway) {
for (destComponentIndex = 0; destComponentIndex < rightBottomTabbedPane.getTabCount(); destComponentIndex++) {
if (rightBottomTabbedPane.getComponentAt(destComponentIndex) == bottomComponent) {
break;
}
}
String tabTitle = "Pathway Preview";
if (rightBottomTabbedPane.getTabCount() == destComponentIndex) {
rightBottomTabbedPane.addTab(tabTitle, new TabCloseIcon(), bottomComponent);
}
} else if (bShowInDatabaseProperties) {
for (destComponentIndex = 0; destComponentIndex < rightBottomTabbedPane.getTabCount(); destComponentIndex++) {
Component c = rightBottomTabbedPane.getComponentAt(destComponentIndex);
if (c == bioModelMetaDataPanel || c == mathModelMetaDataPanel || c == geometryMetaDataPanel || c == getBioModelsNetPropertiesPanel()) {
break;
}
}
if (rightBottomTabbedPane.getTabCount() == destComponentIndex) {
rightBottomTabbedPane.addTab(DATABASE_PROPERTIES_TAB_TITLE, new TabCloseIcon(), bottomComponent);
}
}
if (rightBottomTabbedPane.getComponentAt(destComponentIndex) != bottomComponent) {
bottomComponent.setBorder(GuiConstants.TAB_PANEL_BORDER);
rightBottomTabbedPane.setComponentAt(destComponentIndex, bottomComponent);
rightSplitPane.repaint();
}
if (rightBottomTabbedPane.getSelectedComponent() != bottomComponent) {
rightBottomTabbedPane.setSelectedComponent(bottomComponent);
}
}
use of cbit.vcell.mapping.spatial.processes.SpatialProcess in project vcell by virtualcell.
the class SpatialProcessParameterTableModel method setSpatialProcess.
/**
* Sets the speciesContextSpec property (cbit.vcell.mapping.SpeciesContextSpec) value.
* @param speciesContextSpec The new value for the property.
* @see #getSpeciesContextSpec
*/
public void setSpatialProcess(SpatialProcess spatialProcess) {
SpatialProcess oldValue = this.spatialProcess;
this.spatialProcess = spatialProcess;
firePropertyChange(PROPERTY_NAME_SPATIALPROCESS, oldValue, spatialProcess);
}
Aggregations