Class 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  
    • 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 name
      void returnToMainMenu()
      Returns the user to the main menu
      • 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

      • MainMenuController

        public MainMenuController()
    • 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 interface javafx.fxml.Initializable
        Parameters:
        url -
        rb -