use of artisynth.core.renderables.IsRenderableHolder in project artisynth_core by artisynth.
the class IsRenderableEditor method applyAction.
public void applyAction(String actionCommand, LinkedList<ModelComponent> selection, Rectangle popupBounds) {
if (glEditCmd.equals(actionCommand)) {
ArrayList<HasProperties> contained = new ArrayList<HasProperties>(selection.size());
for (ModelComponent mc : selection) {
if (mc instanceof IsRenderableHolder) {
IsRenderableHolder holder = (IsRenderableHolder) mc;
IsRenderable glr = holder.getRenderable();
if (glr instanceof HasProperties) {
contained.add((HasProperties) glr);
}
}
}
if (contained.size() > 0) {
createPropertyDialog(contained, true, popupBounds);
} else {
JOptionPane.showMessageDialog(null, "No properties for selected components", "No properties", JOptionPane.INFORMATION_MESSAGE);
}
}
}
use of artisynth.core.renderables.IsRenderableHolder in project artisynth_core by artisynth.
the class RootModel method addRenderable.
public IsRenderableHolder addRenderable(Renderable renderable) {
IsRenderableHolder holder = new IsRenderableHolder(renderable);
addRenderable(holder);
return holder;
}
Aggregations