Package com.lariflix.jemm.forms
Class AddPeopleWindow
java.lang.Object
com.lariflix.jemm.forms.AddPeopleWindow
This class represents a window for adding people in the application.
It provides the necessary interface and methods to handle user interactions for adding new people.
- Since:
- 1.0
- Author:
- Cesar Bianchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the dialog associated with this AddPeopleWindow.getPanel()
Retrieves the instance of AddPeoplePanel used by the AddPeopleWindow.void
Sets the dialog associated with this AddPeopleWindow.void
setPanel
(AddPeoplePanel panel) Sets the instance of AddPeoplePanel used by the AddPeopleWindow.Displays the dialog to the user and returns the new person defined by the user.
-
Constructor Details
-
AddPeopleWindow
Constructs a new AddPeopleWindow. This constructor sets the instance of ConnectJellyfinAPI used by the AddPeoplePanel and initializes the dialog. If the dialog has not been initialized yet, it creates a new JDialog with the title "JEMM - Add People", sets its size, adds the panel to it, packs it, and centers it on the screen.- Parameters:
lData
- The instance of ConnectJellyfinAPI to be used.- Since:
- 1.0
-
-
Method Details
-
showDialog
Displays the dialog to the user and returns the new person defined by the user. This method makes the dialog visible to the user and waits for the user to define a new person. After the user has defined a new person, it creates a new JellyfinPeopleItem, sets its id, name, type, and role based on the text in the text fields and the selected item in the combo box, and returns it.- Returns:
- The new person defined by the user.
- Since:
- 1.0
-
getDialog
Returns the dialog associated with this AddPeopleWindow.- Returns:
- the JDialog object representing the dialog associated with this AddPeopleWindow object
- Since:
- 1.0
- See Also:
-
setDialog
Sets the dialog associated with this AddPeopleWindow.- Parameters:
dialog
- the JDialog object representing the dialog associated with this AddPeopleWindow object- Since:
- 1.0
- See Also:
-
getPanel
Retrieves the instance of AddPeoplePanel used by the AddPeopleWindow.- Returns:
- The instance of AddPeoplePanel used by the AddPeopleWindow.
- Since:
- 1.0
-
setPanel
Sets the instance of AddPeoplePanel used by the AddPeopleWindow.- Parameters:
panel
- The instance of AddPeoplePanel to be used by the AddPeopleWindow.- See Also:
-