use of artisynth.core.gui.probeEditor.NumericProbeEditor in project artisynth_core by artisynth.
the class ProbeInfo method editProbe.
// edit the probe
private void editProbe() {
NumericProbeEditor dialog;
if (getProbe().isInput()) {
dialog = new InputNumericProbeEditor((NumericInputProbe) getProbe());
} else {
dialog = new OutputNumericProbeEditor((NumericOutputProbe) getProbe());
}
dialog.setVisible(true);
Point loc = getMain().getFrame().getLocation();
dialog.setLocation(loc.x + getMain().getFrame().getWidth(), getMain().getFrame().getHeight());
myController.addProbeEditor(dialog);
}
use of artisynth.core.gui.probeEditor.NumericProbeEditor in project artisynth_core by artisynth.
the class MenuBarHandler method addProbe.
/**
* this function opens up a dialog that allows the adding of probes
*/
private void addProbe(boolean isInput) {
NumericProbeEditor dialog;
if (isInput) {
dialog = new InputNumericProbeEditor();
} else {
dialog = new OutputNumericProbeEditor();
}
dialog.setVisible(true);
java.awt.Point loc = myMain.getFrame().getLocation();
dialog.setLocation(loc.x + myMain.getFrame().getWidth() / 2, myMain.getFrame().getHeight() / 2);
myMain.getTimeline().addProbeEditor(dialog);
}
use of artisynth.core.gui.probeEditor.NumericProbeEditor in project artisynth_core by artisynth.
the class TimelineController method resetAll.
// /**
// * Called internally when the step time is set by the GUI
// */
// void setStepTime (double newStep) {
// myScheduler.setStepTime (newStep);
// }
/**
* Resets the timeline. Called when it is first created and when new
* models are loaded.
*/
public void resetAll() {
// Assume that caller has ensured the scheduler is not running
// myScheduler.stopRequest();
// myScheduler.waitForPlayingToStop();
RootModel rootModel = myMain.getRootModel();
int count = myInTracks.size();
for (int i = 0; i < count; i++) {
deleteTrack(Track.TYPE_INPUT, 0, false);
}
count = myOutTracks.size();
for (int j = 0; j < count; j++) {
deleteTrack(Track.TYPE_OUTPUT, 0, false);
}
myProbeMap.clear();
// Add the root model on timeline
Track suitableTrack;
// Process all the input probes into proper places
for (Probe p : rootModel.getInputProbes()) {
addProbe(p);
}
// Process all the output probes into proper places
for (Probe p : rootModel.getOutputProbes()) {
if (!(p instanceof WayPointProbe)) {
addProbe(p);
}
}
// Process the waypoints
refreshWayPoints(rootModel);
// for (WayPoint wayPoint : getWayPoints().getPoints ()) {
// addWayPointFromRoot (wayPoint);
// }
// setAppropriateVirtualWaypoint (false);
// timescale.updateTimeCursor (0);
myToolBar.updateToolbarState(rootModel);
closeProbeEditors();
myProbeEditors = new ArrayList<NumericProbeEditor>();
selectedProbes = new ArrayList<ProbeInfo>();
expandToggle.setSelected(false);
muteToggle.setSelected(false);
updateWidgets(rootModel, /*refreshCursor=*/
true);
updateDisplay();
// requestUpdate (UPDATE_WIDGETS | REFRESH_CURSOR);
}
Aggregations