Class AddGenrePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AddGenrePanel extends JPanel
Represents the panel for adding a new genre in the application. This class extends javax.swing.JPanel and provides the UI for adding a new genre.
Since:
1.0
Author:
Cesar Bianchi
See Also:
  • Field Details

  • Constructor Details

    • AddGenrePanel

      public AddGenrePanel()
      Default constructor for the AddGenrePanel class. This constructor initializes the components of the panel.
      Since:
      1.0
  • Method Details

    • getLoadedData

      public static ConnectJellyfinAPI getLoadedData()
      Retrieves the instance of ConnectJellyfinAPI used by the AddGenrePanel. This method is used to get the instance of ConnectJellyfinAPI that contains the data loaded from the Jellyfin server.
      Returns:
      The instance of ConnectJellyfinAPI used by the AddGenrePanel.
      Since:
      1.0
    • setLoadedData

      public void setLoadedData(ConnectJellyfinAPI connData)
      Sets the instance of ConnectJellyfinAPI used by the AddGenrePanel and loads the existing genres.
      Parameters:
      connData - The instance of ConnectJellyfinAPI to be used.
      Since:
      1.0
    • loadExistingGenre

      public void loadExistingGenre()
      Loads the existing genres from the Jellyfin server and displays them in the genre table. This method requests the existing genres from the Jellyfin server and adds them to the genre table. If an error occurs during the request, it is logged and the method continues with the next genre. After all genres have been added, the method resizes the width of the columns in the table based on the content of the cells.
      Since:
      1.0
    • getjTextField1

      public JTextField getjTextField1()
    • setjTextField1

      public void setjTextField1(JTextField jTextField1)
    • getjTextField2

      public JTextField getjTextField2()
    • setjTextField2

      public void setjTextField2(JTextField jTextField2)