Package Controller
Class EmployeeController
java.lang.Object
Controller.EmployeeController
Controller for the Employee Screen
- Since:
- 2023-03-07
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DatabaseConnectConnection to the databaseprivate javafx.scene.control.ButtonButtonButton to navigate to the data trends sceneprivate javafx.scene.control.ButtonButtonButton to navigate edit menu sceneprivate javafx.scene.control.TableColumn<EmployeeRow,String> TableColumndisplaying the name of all Employeesprivate javafx.scene.control.TableColumn<EmployeeRow,Integer> TableColumndisplaying the pin number of all Employeesprivate javafx.scene.control.ButtonButtonButton to navigate employees sceneprivate javafx.scene.control.TableView<EmployeeRow>TableViewofEmployeeRowto display the Employee databaseprivate javafx.scene.control.ButtonButtonButton to navigate inventory sceneprivate URLURLlocation of the FXML file that was given to the FXMLLoaderprivate javafx.scene.control.ButtonButtonButton to logoutprivate javafx.scene.control.ButtonButtonButton to navigate order sceneprivate javafx.scene.control.ButtonButtonButton to navigate order history sceneprivate javafx.scene.control.TableColumn<EmployeeRow,Long> TableColumndisplaying the identification number of all Employeesprivate ResourceBundleResourceBundlethe was given to the FXMLLoaderprivate javafx.scene.control.TableColumn<EmployeeRow,EmployeeRole> TableColumndisplaying the roles of all Employeesprivate SceneSwitchSwitches between scenes or tabsprivate SessionDataCurrent session data -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate javafx.collections.ObservableList<EmployeeRow>Gets all Employees in the databasevoidInitialize(package private) voidnavButtonClicked(javafx.event.ActionEvent event) Handles switching scenesprivate voidSet up columns in theemployeeTableprivate voidUpdateemployeeTablein 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
ResourceBundlethe was given to the FXMLLoader -
location
URLlocation of the FXML file that was given to the FXMLLoader -
orderButton
private javafx.scene.control.Button orderButtonButtonButton to navigate order scene -
orderHistoryButton
private javafx.scene.control.Button orderHistoryButtonButtonButton to navigate order history scene -
inventoryButton
private javafx.scene.control.Button inventoryButtonButtonButton to navigate inventory scene -
employeesButton
private javafx.scene.control.Button employeesButtonButtonButton to navigate employees scene -
editMenuButton
private javafx.scene.control.Button editMenuButtonButtonButton to navigate edit menu scene -
dataTrendsButton
private javafx.scene.control.Button dataTrendsButtonButtonButton to navigate to the data trends scene -
logoutButton
private javafx.scene.control.Button logoutButtonButtonButton to logout -
employeeTable
TableViewofEmployeeRowto display the Employee database -
randomID
TableColumndisplaying the identification number of all Employees -
employeeName
TableColumndisplaying the name of all Employees -
role
TableColumndisplaying the roles of all Employees -
employeePin
TableColumndisplaying the pin number of all Employees
-
-
Constructor Details
-
EmployeeController
Constructor- Parameters:
session-SessionDatapassed in fromSceneSwitch
-
-
Method Details
-
initialize
public void initialize()Initialize -
setUpTable
private void setUpTable()Set up columns in theemployeeTable -
updateTable
private void updateTable()UpdateemployeeTablein the Graphical User Interface -
getEmployees
Gets all Employees in the database- Returns:
ObservableListofEmployeeRow
-