Class AddProductController

  • All Implemented Interfaces:
    javafx.fxml.Initializable

    public class AddProductController
    extends java.lang.Object
    implements javafx.fxml.Initializable
    Class that provides the controller for the Add Product 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  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initialize​(java.net.URL url, java.util.ResourceBundle rb)
      Initialization method for AddProductController
      (package private) void onActionAddAssocProd​(javafx.event.ActionEvent event)
      Adds Associated Part to the product
      (package private) void onActionCancelProd​(javafx.event.ActionEvent event)
      Returns user to main menu when the "cancel" button is clicked
      (package private) void onActionProductSearch​(javafx.event.ActionEvent event)
      Allows user to search products by entering search terms in the search box and hitting enter.
      (package private) void onActionRemoveAssocProd​(javafx.event.ActionEvent event)
      Allows user to remove an associated part from a product.
      (package private) void onActionSaveProd​(javafx.event.ActionEvent event)
      Saves product after it is run through validation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • stage

        javafx.stage.Stage stage
      • scene

        javafx.scene.Parent scene
    • Constructor Detail

      • AddProductController

        public AddProductController()
    • Method Detail

      • onActionAddAssocProd

        void onActionAddAssocProd​(javafx.event.ActionEvent event)
                           throws java.lang.Exception
        Adds Associated Part to the product
        Parameters:
        event -
        Throws:
        java.lang.Exception
      • onActionCancelProd

        void onActionCancelProd​(javafx.event.ActionEvent event)
                         throws java.lang.Exception
        Returns user to main menu when the "cancel" button is clicked
        Parameters:
        event -
        Throws:
        java.lang.Exception
      • onActionProductSearch

        void onActionProductSearch​(javafx.event.ActionEvent event)
        Allows user to search products by entering search terms in the search box and hitting enter. Valid search optons include searching by product number and partial string match on name.
        Parameters:
        event -
      • onActionRemoveAssocProd

        void onActionRemoveAssocProd​(javafx.event.ActionEvent event)
        Allows user to remove an associated part from a product. Displays a confirmation dialogue before final deletion.
        Parameters:
        event -
      • onActionSaveProd

        void onActionSaveProd​(javafx.event.ActionEvent event)
                       throws java.lang.Exception
        Saves product after it is run through validation.
        Parameters:
        event -
        Throws:
        java.lang.Exception - dialogue displayed for NumberFormatException codes. If entered data is valid the product will be saved, and user returned to the main menu. If not, they will be allowed to fix their entry on the add product form.
      • initialize

        public void initialize​(java.net.URL url,
                               java.util.ResourceBundle rb)
        Initialization method for AddProductController
        Specified by:
        initialize in interface javafx.fxml.Initializable
        Parameters:
        url -
        rb -