Package FLOTF
Class NSNController
- java.lang.Object
-
- FLOTF.NSNController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class NSNController extends java.lang.Object implements javafx.fxml.Initializable
This class controls the table display of webscraped National Stock Numbers that match the user's chosen part- Author:
- Bernard Chan, Sonali Loomba
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javafx.scene.text.Text
cage
fx id of Text displaying chosen part's cage(package private) javafx.scene.control.Button
cancel
fx id of Button to exit chosen part's matching NSNs and return to MainController.fxml window with TO part table(package private) javafx.scene.text.Text
partDescription
fx id of Text displaying chosen part's description(package private) javafx.scene.text.Text
partNumber
fx id of Text displaying chosen part number(package private) javafx.scene.control.TableView<NSN>
tableView
fx id of TableView with row objects of type NSN
-
Constructor Summary
Constructors Constructor Description NSNController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel(javafx.event.ActionEvent e)
Returns to MainController.fxml window with TO part table and clears chosen part informationjavafx.collections.ObservableList<NSN>
getNSNInfo()
Creates a displayable list of all NSNs for chosen part fromNSNScrape.getScrapedNSNs()
void
initialize(java.net.URL url, java.util.ResourceBundle rb)
Initializes NSNController.fxml window Sets part number, description and cage from chosen part's relevant fields Creates hoverable rows with columns displaying NSN, Description, Cage, Confirmation Button, and Link Button for each NSNvoid
openUserWindow(NSN nsn, javafx.event.ActionEvent e)
Opens UserEntryWindow.fxmlvoid
openWeb(java.lang.String url)
Opens user's browser for specified NSN's webpage
-
-
-
Field Detail
-
tableView
javafx.scene.control.TableView<NSN> tableView
fx id of TableView with row objects of type NSN
-
partNumber
javafx.scene.text.Text partNumber
fx id of Text displaying chosen part number
-
partDescription
javafx.scene.text.Text partDescription
fx id of Text displaying chosen part's description
-
cage
javafx.scene.text.Text cage
fx id of Text displaying chosen part's cage
-
cancel
javafx.scene.control.Button cancel
fx id of Button to exit chosen part's matching NSNs and return to MainController.fxml window with TO part table
-
-
Method Detail
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle rb)
Initializes NSNController.fxml window Sets part number, description and cage from chosen part's relevant fields Creates hoverable rows with columns displaying NSN, Description, Cage, Confirmation Button, and Link Button for each NSN- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
-rb
-
-
getNSNInfo
public javafx.collections.ObservableList<NSN> getNSNInfo()
Creates a displayable list of all NSNs for chosen part fromNSNScrape.getScrapedNSNs()
- Returns:
- an ObservableList of type NSN
-
openUserWindow
public void openUserWindow(NSN nsn, javafx.event.ActionEvent e) throws java.lang.Exception
Opens UserEntryWindow.fxml- Parameters:
nsn
- NSN user chosee
- button clicked- Throws:
java.lang.Exception
- if UserEntry window is unable to load
-
openWeb
public void openWeb(java.lang.String url)
Opens user's browser for specified NSN's webpage- Parameters:
url
- specified NSN's link to nsncenter.com
-
cancel
public void cancel(javafx.event.ActionEvent e) throws java.lang.Exception
Returns to MainController.fxml window with TO part table and clears chosen part information- Parameters:
e
- button clicked- Throws:
java.lang.Exception
- if MainController.fxml is unable to load
-
-