use of cbit.vcell.mapping.SimulationContext in project vcell by virtualcell.
the class SimulationWorkspaceModelInfo method getContextName.
/**
* Insert the method's description here.
* Creation date: (9/25/2005 11:04:29 AM)
* @return java.lang.String
*/
public java.lang.String getContextName() {
String results = null;
if (simulationOwner instanceof MathModel) {
MathModel mathModel = (MathModel) simulationOwner;
results = mathModel.getName();
} else if (simulationOwner instanceof SimulationContext) {
SimulationContext simContext = (SimulationContext) simulationOwner;
results = simContext.getBioModel().getName() + "::" + simContext.getName();
}
return results;
}
use of cbit.vcell.mapping.SimulationContext in project vcell by virtualcell.
the class InitialConditionsPanel method setSimulationContext.
/**
* Sets the simulationContext property (cbit.vcell.mapping.SimulationContext) value.
* @param simulationContext The new value for the property.
* @see #getSimulationContext
*/
public void setSimulationContext(SimulationContext newValue) {
SimulationContext oldValue = fieldSimulationContext;
if (oldValue != null) {
oldValue.removePropertyChangeListener(ivjEventHandler);
}
fieldSimulationContext = newValue;
if (newValue != null) {
newValue.addPropertyChangeListener(ivjEventHandler);
}
tableModel.setSimulationContext(fieldSimulationContext);
updateTopScrollPanel();
}
use of cbit.vcell.mapping.SimulationContext in project vcell by virtualcell.
the class MicroscopeMeasurementPanel method setSimulationContext.
public void setSimulationContext(SimulationContext newValue) {
if (this.simulationContext == newValue) {
return;
}
SimulationContext oldValue = newValue;
if (oldValue != null) {
oldValue.getModel().removePropertyChangeListener(internalEventHandler);
oldValue.getMicroscopeMeasurement().removePropertyChangeListener(internalEventHandler);
}
this.simulationContext = newValue;
if (newValue != null) {
newValue.getModel().addPropertyChangeListener(internalEventHandler);
newValue.getMicroscopeMeasurement().addPropertyChangeListener(internalEventHandler);
}
refreshInterface();
}
use of cbit.vcell.mapping.SimulationContext in project vcell by virtualcell.
the class ModelProcessSpecsTableModel method setSimulationContext.
/**
* Sets the simulationContext property (cbit.vcell.mapping.SimulationContext) value.
* @param simulationContext The new value for the property.
* @see #getSimulationContext
*/
public void setSimulationContext(SimulationContext simulationContext) {
SimulationContext oldValue = fieldSimulationContext;
if (oldValue != null) {
oldValue.removePropertyChangeListener(this);
ReactionContext reactionContext = oldValue.getReactionContext();
reactionContext.removePropertyChangeListener(this);
ReactionSpec[] oldReactionSpecs = reactionContext.getReactionSpecs();
for (int i = 0; i < oldReactionSpecs.length; i++) {
oldReactionSpecs[i].getReactionStep().removePropertyChangeListener(this);
oldReactionSpecs[i].removePropertyChangeListener(this);
}
ReactionRuleSpec[] oldReactionRuleSpecs = reactionContext.getReactionRuleSpecs();
for (int i = 0; i < oldReactionRuleSpecs.length; i++) {
oldReactionRuleSpecs[i].getReactionRule().removePropertyChangeListener(this);
oldReactionRuleSpecs[i].removePropertyChangeListener(this);
}
}
fieldSimulationContext = simulationContext;
refreshColumns();
if (simulationContext != null) {
simulationContext.addPropertyChangeListener(this);
ReactionContext reactionContext = fieldSimulationContext.getReactionContext();
reactionContext.addPropertyChangeListener(this);
ReactionSpec[] newReactionSpecs = reactionContext.getReactionSpecs();
for (int i = 0; i < newReactionSpecs.length; i++) {
newReactionSpecs[i].getReactionStep().addPropertyChangeListener(this);
newReactionSpecs[i].addPropertyChangeListener(this);
}
ReactionRuleSpec[] newReactionRuleSpecs = reactionContext.getReactionRuleSpecs();
for (int i = 0; i < newReactionRuleSpecs.length; i++) {
newReactionRuleSpecs[i].getReactionRule().addPropertyChangeListener(this);
newReactionRuleSpecs[i].addPropertyChangeListener(this);
}
}
firePropertyChange("simulationContext", oldValue, simulationContext);
}
use of cbit.vcell.mapping.SimulationContext in project vcell by virtualcell.
the class SpeciesContextSpecsTableModel method setSimulationContext.
/**
* Sets the simulationContext property (cbit.vcell.mapping.SimulationContext) value.
* @param simulationContext The new value for the property.
* @see #getSimulationContext
*/
public void setSimulationContext(SimulationContext simulationContext) {
SimulationContext oldValue = fieldSimulationContext;
int oldColumnCount = getColumnCount();
if (oldValue != null) {
oldValue.removePropertyChangeListener(this);
oldValue.getGeometryContext().removePropertyChangeListener(this);
updateListenersReactionContext(oldValue.getReactionContext(), true);
}
fieldSimulationContext = simulationContext;
refreshColumns();
int newColumnCount = getColumnCount();
if (oldColumnCount != newColumnCount) {
fireTableStructureChanged();
}
if (simulationContext != null) {
simulationContext.addPropertyChangeListener(this);
simulationContext.getGeometryContext().addPropertyChangeListener(this);
updateListenersReactionContext(simulationContext.getReactionContext(), false);
autoCompleteSymbolFilter = simulationContext.getAutoCompleteSymbolFilter();
refreshData();
}
}
Aggregations