package de.thdeg.grademanager.gui; import de.thdeg.grademanager.model.Course; import de.thdeg.grademanager.model.CoursesOfStudy; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.ListView; import javafx.scene.control.TextField; import java.io.IOException; public class CoursesOfStudyDetailsController { @FXML protected TextField courses; @FXML protected ListView<Course> courseListView; static public ObservableList<Course> courseList = FXCollections.observableArrayList(); @FXML protected void initialize() { if (!courseList.isEmpty()) { courseListView.setItems(courseList); } } @FXML protected void switchToMain(ActionEvent event) throws IOException { SwitchWindowHelper.switchTo("Main", event); } @FXML protected void switchToCourseModification(ActionEvent event) throws IOException { SwitchWindowHelper.switchTo("Course Modification", event); } }