Package masterinventory
Class JavaFXApplication
- java.lang.Object
-
- javafx.application.Application
-
- masterinventory.JavaFXApplication
-
public class JavaFXApplication extends javafx.application.Application
-
-
Field Summary
Fields Modifier and Type Field Description static int
partIndex
Variable to track the part index.static int
productIndex
Variable to track the product index.
-
Constructor Summary
Constructors Constructor Description JavaFXApplication()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
createpartIndex()
Maintains index for unique Part id's.static int
createProductIndex()
Maintains index for unique product id's Odd numbers are used for product indexesvoid
init()
Initializes programstatic void
main(java.lang.String[] args)
Main.void
start(javafx.stage.Stage primaryStage)
Loads the primary stage (ie main menu)void
stop()
Runs stop application command
-
-
-
Field Detail
-
partIndex
public static int partIndex
Variable to track the part index. Incremented by 2 with every added item. New items are added in ascending order. Even values only.
-
productIndex
public static int productIndex
Variable to track the product index. Incremented by 2 with every added item. New items are added in ascending order. Odd values only
-
-
Method Detail
-
createpartIndex
public static int createpartIndex()
Maintains index for unique Part id's. Even numbers are used for part indexes.- Returns:
- new unused part index
-
createProductIndex
public static int createProductIndex()
Maintains index for unique product id's Odd numbers are used for product indexes- Returns:
-
init
public void init()
Initializes program- Overrides:
init
in classjavafx.application.Application
-
start
public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception
Loads the primary stage (ie main menu)- Specified by:
start
in classjavafx.application.Application
- Parameters:
primaryStage
-- Throws:
java.lang.Exception
-
stop
public void stop()
Runs stop application command- Overrides:
stop
in classjavafx.application.Application
-
main
public static void main(java.lang.String[] args)
Main. Loads test data. FUTURE ENHANCEMENT - Would like to add the following enhancements: 1. Current error handling returns a error and dialogue when the user enters invalid data (that doesn't provide the correct data type. I would like to add additional feedback on what field needs to be corrected, and which data type is required. 2. The search currently meets the functionality required by this assignment in that hitting the enter button will clear the search. I also added a clear button to clarify how this works. But I think the search functionality could be made more clear for the user (more dialogues, maybe a description in the UI)- Parameters:
args
-
-
-