Search in sources :

Example 1 with NumericProbeEditor

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);
}
Also used : InputNumericProbeEditor(artisynth.core.gui.probeEditor.InputNumericProbeEditor) NumericInputProbe(artisynth.core.probes.NumericInputProbe) OutputNumericProbeEditor(artisynth.core.gui.probeEditor.OutputNumericProbeEditor) NumericProbeEditor(artisynth.core.gui.probeEditor.NumericProbeEditor) InputNumericProbeEditor(artisynth.core.gui.probeEditor.InputNumericProbeEditor) NumericOutputProbe(artisynth.core.probes.NumericOutputProbe) Point(java.awt.Point) WayPoint(artisynth.core.probes.WayPoint) OutputNumericProbeEditor(artisynth.core.gui.probeEditor.OutputNumericProbeEditor)

Example 2 with NumericProbeEditor

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);
}
Also used : InputNumericProbeEditor(artisynth.core.gui.probeEditor.InputNumericProbeEditor) OutputNumericProbeEditor(artisynth.core.gui.probeEditor.OutputNumericProbeEditor) NumericProbeEditor(artisynth.core.gui.probeEditor.NumericProbeEditor) InputNumericProbeEditor(artisynth.core.gui.probeEditor.InputNumericProbeEditor) OutputNumericProbeEditor(artisynth.core.gui.probeEditor.OutputNumericProbeEditor)

Example 3 with NumericProbeEditor

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);
}
Also used : RootModel(artisynth.core.workspace.RootModel) NumericProbeEditor(artisynth.core.gui.probeEditor.NumericProbeEditor) WayPointProbe(artisynth.core.probes.WayPointProbe) Probe(artisynth.core.probes.Probe) WayPointProbe(artisynth.core.probes.WayPointProbe) WayPoint(artisynth.core.probes.WayPoint)

Aggregations

NumericProbeEditor (artisynth.core.gui.probeEditor.NumericProbeEditor)3 InputNumericProbeEditor (artisynth.core.gui.probeEditor.InputNumericProbeEditor)2 OutputNumericProbeEditor (artisynth.core.gui.probeEditor.OutputNumericProbeEditor)2 WayPoint (artisynth.core.probes.WayPoint)2 NumericInputProbe (artisynth.core.probes.NumericInputProbe)1 NumericOutputProbe (artisynth.core.probes.NumericOutputProbe)1 Probe (artisynth.core.probes.Probe)1 WayPointProbe (artisynth.core.probes.WayPointProbe)1 RootModel (artisynth.core.workspace.RootModel)1 Point (java.awt.Point)1