public void actionPerformed(ActionEvent e) {
        switch (e.getActionCommand()) {
        case "calc": {
            Airport from = (Airport) leftList.getSelectedItem();
            Airport to = (Airport) rightList.getSelectedItem();

            Vector<Vector<Object>> tableData = Controller.INSTANCE.getModel()
                    .getRoute(from, to);

            new ConnectionTableWindow(tableData).draw();
            break;
        }
        
        case "visualization": {
            controller.drawView("ConnectionVisualization");
            break;
        }

        case "loadFile": {
            chooser.setDialogType(JFileChooser.OPEN_DIALOG);
            if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
                connectionFile = new File(chooser.getSelectedFile()
                        .getAbsolutePath()); // set the new file to parse before
                                             // redrawing the gui with new
                                             // data
                file_changed = true;
                draw(); // repaint the gui!
            }
            break;
        }

        case "editFile": {
            EditorWindow ew = new EditorWindow(controller);            
            ew.draw();
            break;
        }

        case "saveFile": {
            File oldFile = connectionFile;
            chooser.setDialogType(JFileChooser.SAVE_DIALOG);
            if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {

                String path = chooser.getSelectedFile().getAbsolutePath();

                // Add file ending if missing
                if (!Pattern.matches(".*\\.json", path)) {
                    path = path.concat(".json");
                }

                connectionFile = new File(path);

                try {
                    Controller.INSTANCE.writeFile(connectionFile);
                    file_changed = true;
                }
                catch (Exception ex) {
                    // TODO Show an error message depending on the thrown
                    // exception
                    connectionFile = oldFile;
                    JOptionPane.showMessageDialog(this,
                            "Die Datei konnte nicht gespeichert werden",
                            "Fehler", JOptionPane.ERROR_MESSAGE);
                }
            }
            break;
        }
        }

    }