Package masterinventory.controller
Class MainMenuController
- java.lang.Object
-
- masterinventory.controller.MainMenuController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class MainMenuController extends java.lang.Object implements javafx.fxml.Initializable
Class that provides the controller for the Main Menu UI view.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ErrorHandling
error
(package private) javafx.scene.Parent
scene
(package private) javafx.stage.Stage
stage
-
Constructor Summary
Constructors Constructor Description MainMenuController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(java.net.URL url, java.util.ResourceBundle rb)
Initializes the main menu controller class(package private) void
onActionAddPart(javafx.event.ActionEvent event)
Launches add part screen(package private) void
onActionAddProduct(javafx.event.ActionEvent event)
Launches "Add Product" screen(package private) void
onActionClearSearchParts(javafx.event.ActionEvent event)
Restores the all Parts table view after a search to search all parts.(package private) void
onActionClickClearSearch(javafx.event.ActionEvent event)
Restores the All Products table view after a search to show all products(package private) void
onActionDeletePart(javafx.event.ActionEvent event)
Allows deletion of a product, by clicking on desired object in table view, and clicking de(package private) void
onActionDeleteProduct(javafx.event.ActionEvent event)
Allows deletion of a product, by clicking on desired object in table view, and clicking delete.(package private) void
onActionExit(javafx.event.ActionEvent event)
Closes the application when the exit button is clicked.(package private) void
onActionModifyPart(javafx.event.ActionEvent event)
Allows user to modify existing part.(package private) void
onActionModifyProduct(javafx.event.ActionEvent event)
Allows the user to modify products(package private) void
onActionPartSearch(javafx.event.ActionEvent event)
Searches parts based on either Part ID or partial String match on name(package private) void
onActionSearchProducts(javafx.event.ActionEvent event)
Searches products based on either Product ID or partial String match on namevoid
returnToMainMenu()
Returns the user to the main menu
-
-
-
Field Detail
-
stage
javafx.stage.Stage stage
-
scene
javafx.scene.Parent scene
-
error
ErrorHandling error
-
-
Method Detail
-
returnToMainMenu
public void returnToMainMenu() throws java.io.IOException
Returns the user to the main menu- Throws:
java.io.IOException
-
onActionAddPart
void onActionAddPart(javafx.event.ActionEvent event) throws java.lang.Exception
Launches add part screen- Parameters:
event
-- Throws:
java.lang.Exception
-
onActionAddProduct
void onActionAddProduct(javafx.event.ActionEvent event) throws java.lang.Exception
Launches "Add Product" screen- Parameters:
event
-- Throws:
java.lang.Exception
-
onActionDeletePart
void onActionDeletePart(javafx.event.ActionEvent event)
Allows deletion of a product, by clicking on desired object in table view, and clicking de- Parameters:
event
-
-
onActionDeleteProduct
void onActionDeleteProduct(javafx.event.ActionEvent event) throws java.lang.Exception
Allows deletion of a product, by clicking on desired object in table view, and clicking delete.- Parameters:
event
-- Throws:
java.lang.Exception
- if user attempts to delete a product that has associated parts.
-
onActionModifyPart
void onActionModifyPart(javafx.event.ActionEvent event) throws java.lang.Exception
Allows user to modify existing part. Part must exist in the table view in order to be modified.- Parameters:
event
-- Throws:
java.lang.Exception
-
onActionModifyProduct
void onActionModifyProduct(javafx.event.ActionEvent event) throws java.lang.Exception
Allows the user to modify products- Parameters:
event
-- Throws:
java.lang.Exception
-
onActionPartSearch
void onActionPartSearch(javafx.event.ActionEvent event)
Searches parts based on either Part ID or partial String match on name- Parameters:
event
-
-
onActionClearSearchParts
void onActionClearSearchParts(javafx.event.ActionEvent event)
Restores the all Parts table view after a search to search all parts.- Parameters:
event
-
-
onActionClickClearSearch
void onActionClickClearSearch(javafx.event.ActionEvent event)
Restores the All Products table view after a search to show all products- Parameters:
event
-
-
onActionSearchProducts
void onActionSearchProducts(javafx.event.ActionEvent event)
Searches products based on either Product ID or partial String match on name- Parameters:
event
-
-
onActionExit
void onActionExit(javafx.event.ActionEvent event)
Closes the application when the exit button is clicked. Confirms before close.- Parameters:
event
-
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle rb)
Initializes the main menu controller class- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
-rb
-
-
-