Package com.lariflix.jemm.forms
Class AddGenreWindow
java.lang.Object
com.lariflix.jemm.forms.AddGenreWindow
This class represents a window for adding genres in the application.
It provides the necessary interface and methods to handle user interactions for adding new genres.
- Since:
- 1.0
- Author:
- Cesar Bianchi
-
Constructor Summary
ConstructorsConstructorDescriptionAddGenreWindow
(ConnectJellyfinAPI connData) Constructs a new AddGenreWindow. -
Method Summary
Modifier and TypeMethodDescriptionLoad the classes but down show the window.Displays the dialog to the user and returns the new genre defined by the user.
-
Constructor Details
-
AddGenreWindow
Constructs a new AddGenreWindow. This constructor sets the instance of ConnectJellyfinAPI used by the AddGenrePanel and initializes the dialog. If the dialog has not been initialized yet, it creates a new JDialog with the title "JEMM - Add Genre", sets its size, adds the panel to it, packs it, and centers it on the screen.- Parameters:
connData
- The instance of ConnectJellyfinAPI to be used.- Since:
- 1.0
-
-
Method Details
-
showDialog
Displays the dialog to the user and returns the new genre defined by the user. This method makes the dialog visible to the user and waits for the user to define a new genre. After the user has defined a new genre, it creates a new JellyfinGenreItem, sets its id and name based on the text in the text fields, and returns it.- Returns:
- The new genre defined by the user.
- Since:
- 1.0
-
justLoadWithoutShow
Load the classes but down show the window. This method was created just to perform Test Case. Please don't apply in other cases. After the test has defined a new genre, it creates a new JellyfinGenreItem, sets its id and name based on the text in the text fields, and returns it.- Returns:
- The new genre defined by the user.
- Since:
- 1.0
-