예제 #1
0
    public void actionPerformed(ActionEvent event) {
      String historyText = "";
      if (systemLocked == false) {
        // addRouteCount = 1;
        String[]
            airportsArray; // create empty array that will be used for the method that finds the
                           // airports list
        String[] routesArray;
        routesArray = routeNumArray(routesInfo);
        airportsArray =
            convertAirportArrayListToArray(
                airportsInfo); // call airportsArrayList method to get list of airports

        Route_addroute_dialogue routeDialog =
            new Route_addroute_dialogue(airportsArray, routesArray);
        routeDialog.showDialogue(airportsArray, routesArray); // show the add route dialog box.
      } else {
        historyText = "You must open a valid file to be able to perform this action.\n";
        historyArea.append(historyText);
      }
    }