Package masterinventory.controller
Class ModifyProductController
- java.lang.Object
-
- masterinventory.controller.ModifyProductController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class ModifyProductController extends java.lang.Object implements javafx.fxml.InitializableClass that provides the controller for the Modify Product 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 ModifyProductController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(java.net.URL url, java.util.ResourceBundle rb)(package private) voidonActionAddAssoc(javafx.event.ActionEvent event)Adds associated parts to the list of items to be associated with the product once save is clicked.(package private) voidonActionCancel(javafx.event.ActionEvent event)Returns user to the main menu when "Cancel" is clicked(package private) voidonActionRemoveAssoc(javafx.event.ActionEvent event)Removes part from the associated list(package private) voidonActionSaveAssoc(javafx.event.ActionEvent event)Saves product after passing validation(package private) voidonActionSearchByPart(javafx.event.ActionEvent event)Search for parts either by ID or partial String search on namestatic voidpassParameters(Product item)Passes saved product parameters from MainMenuController to ModifyProductController
-
-
-
Field Detail
-
stage
javafx.stage.Stage stage
-
scene
javafx.scene.Parent scene
-
error
ErrorHandling error
-
-
Method Detail
-
passParameters
public static void passParameters(Product item)
Passes saved product parameters from MainMenuController to ModifyProductController- Parameters:
item-
-
onActionAddAssoc
void onActionAddAssoc(javafx.event.ActionEvent event) throws java.lang.ExceptionAdds associated parts to the list of items to be associated with the product once save is clicked.- Parameters:
event-- Throws:
java.lang.Exception
-
onActionCancel
void onActionCancel(javafx.event.ActionEvent event) throws java.lang.ExceptionReturns user to the main menu when "Cancel" is clicked- Parameters:
event-- Throws:
java.lang.Exception
-
onActionRemoveAssoc
void onActionRemoveAssoc(javafx.event.ActionEvent event)
Removes part from the associated list- Parameters:
event-
-
onActionSaveAssoc
void onActionSaveAssoc(javafx.event.ActionEvent event) throws java.io.IOExceptionSaves product after passing validation- Parameters:
event-- Throws:
java.io.IOException- for NumberFormatException - displays error dialogue box
-
onActionSearchByPart
void onActionSearchByPart(javafx.event.ActionEvent event)
Search for parts either by ID or partial String search on name- Parameters:
event-
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle rb)- Specified by:
initializein interfacejavafx.fxml.Initializable
-
-