Skip to content
Snippets Groups Projects
Commit 6468bdc0 authored by Mitch Cumpstone (cmc408)'s avatar Mitch Cumpstone (cmc408)
Browse files

Commited

parent 5f95f391
No related branches found
No related tags found
1 merge request!3Added 'mysql-connector-java-8.0.28.jar.' This is the connector/j driver that...
...@@ -5,6 +5,7 @@ import javafx.fxml.FXMLLoader; ...@@ -5,6 +5,7 @@ import javafx.fxml.FXMLLoader;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.Parent; import javafx.scene.Parent;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.BorderPane; import javafx.scene.layout.BorderPane;
...@@ -152,7 +153,26 @@ public class Controller { ...@@ -152,7 +153,26 @@ public class Controller {
stage.show(); stage.show();
} }
// Switch to View Employees // Switch to View Employees
public void viewStaffSidePanelClicked(MouseEvent mouseEvent) { @FXML
TextArea employees = new TextArea();
public void viewStaffSidePanelClicked(MouseEvent mouseEvent) throws IOException {
BorderPane root = new BorderPane();
FXMLLoader gridLoader = new FXMLLoader(this.getClass().getResource("viewEmployees.fxml"));
Parent grid = gridLoader.load();
FXMLLoader headerLoader = new FXMLLoader(this.getClass().getResource("headerManager.fxml"));
Parent header = headerLoader.load();
FXMLLoader sideLoader = new FXMLLoader(this.getClass().getResource("staffManagerSidePanel.fxml"));
Parent sidePanel = sideLoader.load();
root.setTop(header);
root.setLeft(sidePanel);
root.setCenter(grid);
Stage stage = (Stage)((Node)mouseEvent.getSource()).getScene().getWindow();
Scene scene = new Scene(root, 800, 600);
stage.setTitle("Scheduler App");
stage.setScene(scene);
stage.show();
} }
// Add, Edit, Remove Functions // Add, Edit, Remove Functions
// Add Employee // Add Employee
...@@ -182,5 +202,7 @@ public class Controller { ...@@ -182,5 +202,7 @@ public class Controller {
model.staff.removeEmployee(id); model.staff.removeEmployee(id);
} }
// View Employees
} }
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.TextArea?>
<TextArea prefHeight="540.0" prefWidth="700.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" />
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment