コード例 #1
0
  /**
   * Called when one of the name, origin or destination text field changes value
   *
   * @param field the text field
   */
  protected void textFieldValueChanged(JTextField field) {
    // Check if we are in a quiescent state
    if (quiescent) {
      return;
    }

    if (field == nameTxT) {
      route.setName(nameTxT.getText());
    } else if (field == originTxT) {
      route.setDeparture(originTxT.getText());
    } else if (field == destinationTxT) {
      route.setDestination(destinationTxT.getText());
    }

    routeUpdated();
  }