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.InitializableClass that provides the controller for the Main Menu UI view.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ErrorHandlingerror(package private) javafx.scene.Parentscene(package private) javafx.stage.Stagestage
-
Constructor Summary
Constructors Constructor Description MainMenuController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(java.net.URL url, java.util.ResourceBundle rb)Initializes the main menu controller class(package private) voidonActionAddPart(javafx.event.ActionEvent event)Launches add part screen(package private) voidonActionAddProduct(javafx.event.ActionEvent event)Launches "Add Product" screen(package private) voidonActionClearSearchParts(javafx.event.ActionEvent event)Restores the all Parts table view after a search to search all parts.(package private) voidonActionClickClearSearch(javafx.event.ActionEvent event)Restores the All Products table view after a search to show all products(package private) voidonActionDeletePart(javafx.event.ActionEvent event)Allows deletion of a product, by clicking on desired object in table view, and clicking de(package private) voidonActionDeleteProduct(javafx.event.ActionEvent event)Allows deletion of a product, by clicking on desired object in table view, and clicking delete.(package private) voidonActionExit(javafx.event.ActionEvent event)Closes the application when the exit button is clicked.(package private) voidonActionModifyPart(javafx.event.ActionEvent event)Allows user to modify existing part.(package private) voidonActionModifyProduct(javafx.event.ActionEvent event)Allows the user to modify products(package private) voidonActionPartSearch(javafx.event.ActionEvent event)Searches parts based on either Part ID or partial String match on name(package private) voidonActionSearchProducts(javafx.event.ActionEvent event)Searches products based on either Product ID or partial String match on namevoidreturnToMainMenu()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.IOExceptionReturns the user to the main menu- Throws:
java.io.IOException
-
onActionAddPart
void onActionAddPart(javafx.event.ActionEvent event) throws java.lang.ExceptionLaunches add part screen- Parameters:
event-- Throws:
java.lang.Exception
-
onActionAddProduct
void onActionAddProduct(javafx.event.ActionEvent event) throws java.lang.ExceptionLaunches "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.ExceptionAllows 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.ExceptionAllows 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.ExceptionAllows 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:
initializein interfacejavafx.fxml.Initializable- Parameters:
url-rb-
-
-