use of artisynth.core.workspace.PullController in project artisynth_core by artisynth.
the class MenuBarHandler method showPullControllerRenderPropsDialog.
private void showPullControllerRenderPropsDialog() {
if (myPullControllerRenderPropsDialog == null) {
PullController pc = myMain.getPullController();
LinkedList<HasProperties> list = new LinkedList<HasProperties>();
list.add(pc);
RenderPropsDialog dialog = new RenderPropsDialog("Edit render properties", list);
dialog.locateRight(myMain.getFrame());
// dialog.setSynchronizeObject(myMain.getRootModel());
dialog.setTitle("RenderProps for PullController");
dialog.addWindowListener(new WindowAdapter() {
public void windowClosed(WindowEvent e) {
myPullControllerRenderPropsDialog = null;
}
});
myMain.registerWindow(dialog);
myPullControllerRenderPropsDialog = dialog;
dialog.pack();
dialog.setVisible(true);
}
}
use of artisynth.core.workspace.PullController in project artisynth_core by artisynth.
the class MenuBarHandler method showPullControllerPropertyDialog.
private void showPullControllerPropertyDialog() {
if (myPullControllerPropertyDialog == null) {
PullController pc = myMain.getPullController();
PropertyPanel panel = new PropertyPanel();
PropertyDialog dialog = new PropertyDialog("PullController properties", panel, "OK");
dialog.addWidget(pc, "stiffness");
dialog.locateRight(myMain.getFrame());
// dialog.setSynchronizeObject(myMain.getRootModel());
dialog.addWindowListener(new WindowAdapter() {
public void windowClosed(WindowEvent e) {
myPullControllerPropertyDialog = null;
}
});
myMain.registerWindow(dialog);
myPullControllerPropertyDialog = dialog;
dialog.pack();
dialog.setVisible(true);
}
}
use of artisynth.core.workspace.PullController in project artisynth_core by artisynth.
the class PointModel method addController.
@Override
public void addController(Controller controller, Model model) {
super.addController(controller, model);
if (controller instanceof PullController) {
PullController pc = ((PullController) controller);
pc.setStiffness(20);
RenderProps.setLineColor(pc, Color.RED.darker());
RenderProps.setPointColor(pc, Color.RED.darker());
RenderProps.setLineStyle(pc, LineStyle.SOLID_ARROW);
RenderProps.setLineRadius(pc, 0.25);
}
// mech.addForceEffector ((PullController)controller);
}
Aggregations