Пример #1
0
  public OperationLimits getLimits() {
    if (minSpeedCheck.isSelected()) limits.setMinSpeed(Double.valueOf(minSpeedField.getText()));
    else limits.setMinSpeed(null);

    if (maxSpeedCheck.isSelected()) limits.setMaxSpeed(Double.valueOf(maxSpeedField.getText()));
    else limits.setMaxSpeed(null);

    if (minAltitudeCheck.isSelected())
      limits.setMinAltitude(Double.valueOf(minAltitudeField.getText()));
    else limits.setMinAltitude(null);

    if (maxAltitudeCheck.isSelected())
      limits.setMaxAltitude(Double.valueOf(maxAltitudeField.getText()));
    else limits.setMaxAltitude(null);

    if (maxVRateCheck.isSelected()) limits.setMaxVertRate(Double.valueOf(maxVRateField.getText()));
    else limits.setMaxVertRate(null);

    if (maxDepthCheck.isSelected()) limits.setMaxDepth(Double.valueOf(maxDepthField.getText()));
    else limits.setMaxDepth(null);

    if (!areaCheck.isSelected()) {
      limits.setOpAreaLat(null);
      limits.setOpAreaLon(null);
      limits.setOpAreaLength(null);
      limits.setOpAreaWidth(null);
      limits.setOpRotationRads(null);
    }

    return limits;
  }
Пример #2
0
  public static void main(String[] args) {
    GuiUtils.setLookAndFeel();
    OperationLimits limits = new OperationLimits();
    limits.setMaxSpeed(100d);
    OperationLimitsPanel panel = new OperationLimitsPanel(new MissionType(), true);
    panel.setLimits(limits);

    GuiUtils.testFrame(panel);
  }