Ejemplo n.º 1
0
  /** clear the display */
  public void clear() {
    PLOT_PANEL.removeAllCurveData();
    PLOT_PANEL.removeAllGraphData();

    final Color toleranceColor = Color.BLUE;
    drawBoxAboutCenter(0.0, 0.0, X_TOLERANCE, Y_TOLERANCE, toleranceColor);

    // since curve data doesn't appear in the legend, we can trick it by adding graph data which
    // does
    final BasicGraphData toleranceData = new BasicGraphData();
    toleranceData.setGraphColor(toleranceColor);
    toleranceData.addPoint(0.0, 0.0);
    toleranceData.setGraphProperty(PLOT_PANEL.getLegendKeyString(), "Position Tolerance");
    PLOT_PANEL.addGraphData(toleranceData);

    PLOT_PANEL.refreshGraphJPanel();
  }
Ejemplo n.º 2
0
  /** display the beam position */
  public void displayBeamPosition(
      final double x, final double y, final double xError, final double yError) {
    clear();

    final Color positionColor = Color.ORANGE;
    drawBoxAboutCenter(x, y, xError, yError, positionColor);

    // since curve data doesn't appear in the legend, we can trick it by adding graph data which
    // does
    final BasicGraphData positionData = new BasicGraphData();
    positionData.setGraphColor(positionColor);
    positionData.addPoint(x, y);
    positionData.setGraphProperty(PLOT_PANEL.getLegendKeyString(), "Measured Position");
    PLOT_PANEL.addGraphData(positionData);

    PLOT_PANEL.refreshGraphJPanel();
  }