use of artisynth.core.probes.NumericProbeBase in project artisynth_core by artisynth.
the class ProbeInfo method expandProbe.
public void expandProbe() {
int width = myDisplayArea.getWidth();
int height = GuiStorage.PROBE_DETAIL_HEIGHT;
if (getProbe() instanceof Displayable) {
Displayable dispProbe = (Displayable) getProbe();
JPanel display = dispProbe.getDisplay(width, height, false);
if (display instanceof NumericProbePanel && getProbe() instanceof NumericProbeBase) {
smallDisplay = (NumericProbePanel) display;
}
myDisplayArea.add(display);
}
myLabel.setBorder(BorderFactory.createMatteBorder(0, 1, 1, 1, Color.BLACK));
myController.updateComponentSizes();
updateProbeDisplays();
}
use of artisynth.core.probes.NumericProbeBase in project artisynth_core by artisynth.
the class ProbeInfo method saveToMatlab.
private void saveToMatlab(Probe probe) {
// connection should exist or this method shouldn't be called
MatlabInterface mi = getMain().getMatlabConnection();
NumericProbeBase np = (NumericProbeBase) probe;
ProbeEditor.saveToMatlab(np, mi, myController);
}
use of artisynth.core.probes.NumericProbeBase in project artisynth_core by artisynth.
the class ProbeInfo method clearProbeData.
private void clearProbeData() {
if (NumericProbeBase.class.isAssignableFrom(getProbe().getClass())) {
NumericProbeBase numericProbe = (NumericProbeBase) getProbe();
numericProbe.getNumericList().clear();
// add empty data, using set if settable
if (getProbe().isSettable()) {
getProbe().setData(getProbe().getStartTime());
getProbe().setData(getProbe().getStopTime());
} else if (NumericInputProbe.class.isAssignableFrom(getProbe().getClass())) {
((NumericInputProbe) getProbe()).loadEmpty();
}
} else
System.out.println("probe is not numeric, cannot clear");
}
use of artisynth.core.probes.NumericProbeBase in project artisynth_core by artisynth.
the class ProbeInfo method setLargeDisplayVisible.
public NumericProbeDisplayLarge setLargeDisplayVisible(boolean visible) {
Probe probe = getProbe();
if (!(probe instanceof NumericProbeBase)) {
return null;
}
// display large probe display
if (visible) {
if (largeDisplay == null) {
largeDisplay = new NumericProbeDisplayLarge(probe, Integer.toString(getTrackNumber()));
;
largeDisplay.addWindowListener(new WindowHandler());
// position the large probe window to the left of the timeline window
Point timelineLocation = myController.getLocation();
Dimension timelineSize = myController.getSize();
Point newLargeProbePosition = new Point(timelineLocation.x + timelineSize.width, timelineLocation.y);
largeDisplay.setLocation(newLargeProbePosition);
}
largeDisplay.setVisible(true);
} else {
if (largeDisplay == null) {
largeDisplay.setVisible(false);
}
}
return largeDisplay;
}
use of artisynth.core.probes.NumericProbeBase in project artisynth_core by artisynth.
the class ProbeInfo method loadFromMatlab.
// load a probe from a MATLAB variable
public void loadFromMatlab(Probe probe) {
// connection should exist or this method shouldn't be called
MatlabInterface mi = getMain().getMatlabConnection();
NumericProbeBase np = (NumericProbeBase) probe;
ProbeEditor.loadFromMatlab(np, mi, myController);
}
Aggregations