Package Controller
Class EmployeeController
java.lang.Object
Controller.EmployeeController
Controller for the Employee Screen
- Since:
- 2023-03-07
-
Field Summary
Modifier and TypeFieldDescriptionprivate DatabaseConnect
Connection to the databaseprivate javafx.scene.control.Button
Button
Button to navigate to the data trends sceneprivate javafx.scene.control.Button
Button
Button to navigate edit menu sceneprivate javafx.scene.control.TableColumn<EmployeeRow,
String> TableColumn
displaying the name of all Employeesprivate javafx.scene.control.TableColumn<EmployeeRow,
Integer> TableColumn
displaying the pin number of all Employeesprivate javafx.scene.control.Button
Button
Button to navigate employees sceneprivate javafx.scene.control.TableView<EmployeeRow>
TableView
ofEmployeeRow
to display the Employee databaseprivate javafx.scene.control.Button
Button
Button to navigate inventory sceneprivate URL
URL
location of the FXML file that was given to the FXMLLoaderprivate javafx.scene.control.Button
Button
Button to logoutprivate javafx.scene.control.Button
Button
Button to navigate order sceneprivate javafx.scene.control.Button
Button
Button to navigate order history sceneprivate javafx.scene.control.TableColumn<EmployeeRow,
Long> TableColumn
displaying the identification number of all Employeesprivate ResourceBundle
ResourceBundle
the was given to the FXMLLoaderprivate javafx.scene.control.TableColumn<EmployeeRow,
EmployeeRole> TableColumn
displaying the roles of all Employeesprivate SceneSwitch
Switches between scenes or tabsprivate SessionData
Current session data -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate javafx.collections.ObservableList<EmployeeRow>
Gets all Employees in the databasevoid
Initialize(package private) void
navButtonClicked
(javafx.event.ActionEvent event) Handles switching scenesprivate void
Set up columns in theemployeeTable
private void
UpdateemployeeTable
in the Graphical User Interface
-
Field Details
-
session
Current session data- See Also:
-
database
Connection to the database- See Also:
-
sceneSwitch
Switches between scenes or tabs- See Also:
-
resources
ResourceBundle
the was given to the FXMLLoader -
location
URL
location of the FXML file that was given to the FXMLLoader -
orderButton
private javafx.scene.control.Button orderButtonButton
Button to navigate order scene -
orderHistoryButton
private javafx.scene.control.Button orderHistoryButtonButton
Button to navigate order history scene -
inventoryButton
private javafx.scene.control.Button inventoryButtonButton
Button to navigate inventory scene -
employeesButton
private javafx.scene.control.Button employeesButtonButton
Button to navigate employees scene -
editMenuButton
private javafx.scene.control.Button editMenuButtonButton
Button to navigate edit menu scene -
dataTrendsButton
private javafx.scene.control.Button dataTrendsButtonButton
Button to navigate to the data trends scene -
logoutButton
private javafx.scene.control.Button logoutButtonButton
Button to logout -
employeeTable
TableView
ofEmployeeRow
to display the Employee database -
randomID
TableColumn
displaying the identification number of all Employees -
employeeName
TableColumn
displaying the name of all Employees -
role
TableColumn
displaying the roles of all Employees -
employeePin
TableColumn
displaying the pin number of all Employees
-
-
Constructor Details
-
EmployeeController
Constructor- Parameters:
session
-SessionData
passed in fromSceneSwitch
-
-
Method Details
-
initialize
public void initialize()Initialize -
setUpTable
private void setUpTable()Set up columns in theemployeeTable
-
updateTable
private void updateTable()UpdateemployeeTable
in the Graphical User Interface -
getEmployees
Gets all Employees in the database- Returns:
ObservableList
ofEmployeeRow
-