Package com.esprit.controllers.series
Class EpisodeClientController
java.lang.Object
com.esprit.controllers.series.EpisodeClientController
- All Implemented Interfaces:
javafx.fxml.Initializable
Provides functionality for uploading and viewing episodes of a series, as
well as adding feedback to the series. It also initializes a list of episodes
and displays them in a ListView. Additionally, it provides methods for
playing, pausing, and stopping media players for each episode.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate javafx.scene.control.Button
private javafx.scene.control.Button
private Long
private javafx.scene.image.ImageView
private final IServiceEpisodeImpl
private javafx.scene.control.Button
private javafx.scene.control.ListView<Episode>
private static final Logger
private javafx.scene.media.MediaView
private javafx.scene.control.Label
private javafx.scene.control.Button
private javafx.scene.control.Label
private javafx.scene.control.Label
private org.kordamp.ikonli.javafx.FontIcon
private javafx.scene.control.Label
private Series
private javafx.scene.control.TextArea
private javafx.scene.control.Button
private javafx.scene.control.Label
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afficherserie
(javafx.scene.input.MouseEvent event) Loads a FXML file, creates a scene, and displays it on a stage, when a mouse event occurs.(package private) void
ajouterFeedBack
(javafx.event.ActionEvent event) Takes a `txtDescriptionFeedBack` text input and adds it to an instance of `IServiceFeedbackImpl`.void
initialize
(Series selectedSerie) Sets up the user interface for a media player, initializing buttons and setting listeners for media playback.void
initialize
(URL url, ResourceBundle resourceBundle) Is called when an instance of a class is created and initializes an object's resources, such as loading data from a URL or database, by calling the appropriate methods.
-
Field Details
-
LOGGER
-
iServiceEpisode
-
uploadButton
private javafx.scene.control.Button uploadButton -
retour
private org.kordamp.ikonli.javafx.FontIcon retour -
uploadSuccessLabel
private javafx.scene.control.Label uploadSuccessLabel -
ListEpisode
-
imgsrie
private javafx.scene.image.ImageView imgsrie -
midiavideo
private javafx.scene.media.MediaView midiavideo -
nomlbl
private javafx.scene.control.Label nomlbl -
payslbl
private javafx.scene.control.Label payslbl -
resumelbl
private javafx.scene.control.Label resumelbl -
rirecteurslbl
private javafx.scene.control.Label rirecteurslbl -
arreterbtn
private javafx.scene.control.Button arreterbtn -
jouerbtn
private javafx.scene.control.Button jouerbtn -
pausebtn
private javafx.scene.control.Button pausebtn -
txtDescriptionFeedBack
private javafx.scene.control.TextArea txtDescriptionFeedBack -
btnSend
private javafx.scene.control.Button btnSend -
selectedSerie
-
idep
-
episodes
-
-
Constructor Details
-
EpisodeClientController
public EpisodeClientController()
-
-
Method Details
-
initialize
Sets up the user interface for a media player, initializing buttons and setting listeners for media playback. It also retrieves episode information from a database and displays it in a list view.- Parameters:
selectedSerie
- selected series for which the functions initializes the image and video components.- `getImage()`: String representing the image file path - `getName()`: String representing the series name - `getResume()`: String representing the series summary - `getDirecteur()`: String representing the director's name - `getPays()`: String representing the country of origin
These properties are used to display the series information in various parts of the user interface.
-
initialize
Is called when an instance of a class is created and initializes an object's resources, such as loading data from a URL or database, by calling the appropriate methods.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
url
- URL of the web application being initialized.resourceBundle
- resource bundle that contains localized data for the component being initialized.
-
ajouterFeedBack
void ajouterFeedBack(javafx.event.ActionEvent event) Takes a `txtDescriptionFeedBack` text input and adds it to an instance of `IServiceFeedbackImpl`. The date is calculated using the `LocalDate.now()` method, and the `idep` parameter is included in the feedback object.- Parameters:
event
- user's action of clicking the "Add Feedback" button and triggers the execution of the function.- `txtDescriptionFeedBack`: The text field where the user has entered the feedback description.
-
afficherserie
Loads a FXML file, creates a scene, and displays it on a stage, when a mouse event occurs.- Parameters:
event
- mouse event that triggered the function execution, providing information about the location and type of the event on the user interface.- `event`: A `javafx.scene.input.MouseEvent` object representing the mouse event that triggered the function.
- Throws:
IOException
-