use of artisynth.core.workspace.RootModel in project artisynth_core by artisynth.
the class FemModel3dAgent method getPrototypeMap.
protected Map<Class, ModelComponent> getPrototypeMap() {
RootModel root = myMain.getRootModel();
if (root != null && root != myLastRootModel) {
myPrototypeMap = new HashMap<Class, ModelComponent>();
myLastRootModel = root;
}
return myPrototypeMap;
}
use of artisynth.core.workspace.RootModel in project artisynth_core by artisynth.
the class AddPropertyPane method readComponentField.
/**
* called when the component string field changes
*/
private void readComponentField() {
isComplete = false;
clearDimensionLabel();
// System.out.println("SET FALSE");
myParent.actionPerformed(new ActionEvent(this, 0, "Invalidate"));
// System.out.println("new value "+compNameField.getText());
Object compOrProp = myPropField.getValue();
RootModel root = Main.getMain().getRootModel();
if (compOrProp instanceof ModelComponent) {
propertyPath = ComponentUtils.getPathName(root, (ModelComponent) compOrProp);
myParent.actionPerformed(new ActionEvent(this, 0, "blank"));
} else if (compOrProp instanceof Property) {
Property prop = (Property) compOrProp;
propertyPath = ComponentUtils.getPropertyPathName(prop, root, /*excludeLeaf=*/
false);
if (!HasProperties.class.isAssignableFrom(prop.get().getClass())) {
isComplete = true;
int dim = NumericProbeEditor.GetPropDim(propertyPath);
setDimensionLabel(dim);
myParent.actionPerformed(new ActionEvent(this, 0, "PropSelected"));
normalColor = NumericProbeEditor.completedColor;
} else {
myParent.actionPerformed(new ActionEvent(this, 0, "blank"));
}
} else {
propertyPath = "";
myParent.actionPerformed(new ActionEvent(this, 0, "blank"));
}
updateAppearance();
// readFullPath(compNameField.getText());
}
use of artisynth.core.workspace.RootModel in project artisynth_core by artisynth.
the class FrameMarkerAgent method getPrototypeMap.
protected HashMap<Class, ModelComponent> getPrototypeMap() {
RootModel root = myMain.getRootModel();
if (root != null && root != myLastRootModel) {
myPrototypeMap = new HashMap<Class, ModelComponent>();
myLastRootModel = root;
}
return myPrototypeMap;
}
use of artisynth.core.workspace.RootModel in project artisynth_core by artisynth.
the class MechModelAgent method getPrototypeMap.
protected HashMap<Class, ModelComponent> getPrototypeMap() {
RootModel root = myMain.getRootModel();
if (root != null && root != myLastRootModel) {
myPrototypeMap = new HashMap<Class, ModelComponent>();
myLastRootModel = root;
}
return myPrototypeMap;
}
use of artisynth.core.workspace.RootModel in project artisynth_core by artisynth.
the class ParticleAgent method getPrototypeMap.
protected HashMap<Class, ModelComponent> getPrototypeMap() {
RootModel root = myMain.getRootModel();
if (root != null && root != myLastRootModel) {
myPrototypeMap = new HashMap<Class, ModelComponent>();
myLastRootModel = root;
}
return myPrototypeMap;
}
Aggregations