Class AddGenreWindow

java.lang.Object
com.lariflix.jemm.forms.AddGenreWindow

public class AddGenreWindow extends Object
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 Details

    • AddGenreWindow

      public AddGenreWindow(ConnectJellyfinAPI connData)
      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

      public JellyfinGenreItem 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

      public JellyfinGenreItem 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