package scheduler.view;

import javafx.fxml.FXML;
import scheduler.Main;

public class RootController {
	
	   // Reference to the main application.
	   private Main mainApp;

	   /**
	    * The constructor.
	    * The constructor is called before the initialize() method.
	    */
	   public RootController() {
	   }
	   
	   @FXML
	   private void handleAttributes() {
		   mainApp.showAttributes();
	   }
	   
	   @FXML
	   private void handleResourcesInstructors() {
	      mainApp.showResourcesInstructors();
	   }
	   
	   @FXML
	   private void handleResourcesCourses() {
	      mainApp.showResourcesCourses();
	   }
	   
	   @FXML
	   private void handleResourcesRooms() {
	      mainApp.showResourcesRooms();
	   }
	   
	   @FXML
	   private void handleCreate() {
	      mainApp.showGenerateOverview();
	   }
	   
	   @FXML
	   private void handleViewTable() {
	      mainApp.showViewTable();
	   }
	   
	   @FXML
	   private void handleViewFilter() {
		   mainApp.showViewFilter();
	   }
	   
	   @FXML
	   private void handleViewCalender() {
		   mainApp.showViewCalendar();
	   }
	   
	   @FXML
	   private void handlePrefCourse() {
		   mainApp.showPreferencesCourses();
	   }
	   
	   @FXML
	   private void handlePrefInstr() {
		   mainApp.showPreferencesInstructors();
	   }
	   
	   @FXML
	   private void handleAdminMain() {
		   mainApp.showAdminMain();
	   }
	   
	   
	   @FXML
	   private void handleAdminAdd() {
		   mainApp.showAdminAdd();
	   }
	   
	   /**
	    * Is called by the main application to give a reference back to itself.
	    * 
	    * @param mainApp
	    */
	   public void setMainApp(Main mainApp) {
	       this.mainApp = mainApp;
	   }

}