Class CategorieController
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
ajouteroeuvre
(javafx.event.ActionEvent event) Allows users to add a new category by validating input fields, saving the category to a service implementation class, and displaying an alert message upon successful save.(package private) boolean
Checks if the user has entered a non-empty string in the `descreptionF.getText()` field, and returns `true` if so, or `false` otherwise, along with a message to enter a valid description.(package private) boolean
Checks if the user has entered a non-empty string.private void
References an object called `ref`.private void
modifierCategorie
(Category categorie) Allows for the modification of a category's name and description through a dialogue box interface.(package private) void
Ocategories
(javafx.event.ActionEvent event) Loads a FXML file, creates a scene and sets it as the scene of a stage, and then shows the stage.(package private) void
Oepisode
(javafx.event.ActionEvent event) Loads an FXML file, creates a scene, and sets it as the scene of a Stage, displaying the content on the stage.(package private) void
Oseriess
(javafx.event.ActionEvent event) Loads and displays a FXML view named "Serie-view".private void
ref()
Updates the table view's contents by clearing its items and columns, then adding new columns for an "Edit" and "Delete" button, and finally adding the recovered categories from the database to the table view.private void
Creates an Alert object with an informational message and shows it to the user via the `showAndWait()` method.void
showcinema
(javafx.event.ActionEvent actionEvent) Does not have any discernible behavior or functionality as it is empty and lacks any statements or actions to perform.void
showevent
(javafx.event.ActionEvent actionEvent) Is invoked when an event occurs and has no discernible functionality as it only contains a blank implementation.void
showmovies
(javafx.event.ActionEvent actionEvent) Likely displays a list or movies or performs some other movie-related actions when an event is triggered.void
showproducts
(javafx.event.ActionEvent actionEvent) Displays a list of products.void
showseries
(javafx.event.ActionEvent actionEvent) Is triggered by an `ActionEvent`.void
showStatistics
(javafx.event.ActionEvent actionEvent) Loads a FXML view and replaces the current scene with it when an action event is triggered.
-
Field Details
-
LOGGER
-
checkdescreption
private javafx.scene.control.Label checkdescreption -
checkname
private javafx.scene.control.Label checkname -
nomF
private javafx.scene.control.TextField nomF -
descreptionF
private javafx.scene.control.TextField descreptionF -
tableView
-
-
Constructor Details
-
CategorieController
public CategorieController()
-
-
Method Details
-
ref
private void ref()Updates the table view's contents by clearing its items and columns, then adding new columns for an "Edit" and "Delete" button, and finally adding the recovered categories from the database to the table view. -
showAlert
Creates an Alert object with an informational message and shows it to the user via the `showAndWait()` method.- Parameters:
title
- title of an alert window that will be displayed when the `showAlert` method is called.message
- text to be displayed in the alert box.
-
modifierCategorie
Allows for the modification of a category's name and description through a dialogue box interface. The function calls the `iServiceCategorie.modifier()` method to update the category in the database after the user has entered the new details and confirmed the modifications.- Parameters:
categorie
- category object that is to be modified through the dialog box, and its properties (name and description) are editable and can be modified by the user through the dialog UI.- `nom`: The name of the category. - `description`: A brief description of the category.
-
initialize
private void initialize()References an object called `ref`. -
checkname
boolean checkname()Checks if the user has entered a non-empty string. If so, it returns `true`. Otherwise, it displays an error message and returns `false`. -
checkdescreption
boolean checkdescreption()Checks if the user has entered a non-empty string in the `descreptionF.getText()` field, and returns `true` if so, or `false` otherwise, along with a message to enter a valid description. -
ajouteroeuvre
void ajouteroeuvre(javafx.event.ActionEvent event) Allows users to add a new category by validating input fields, saving the category to a service implementation class, and displaying an alert message upon successful save.- Parameters:
event
- user's action of clicking the "Add Category" button, which triggers the execution of the code within the function.- Type: `ActionEvent` - Details: Contains information about the action that triggered the function, such as the source of the event and the identifier of the event.
-
Ocategories
Loads a FXML file, creates a scene and sets it as the scene of a stage, and then shows the stage.- Parameters:
event
- event that triggered the method, specifically the opening of the `Categorie-view.fxml` file.- `Event`: This is the class that represents an event in Java, containing information about the source and type of the event. - `Object`: The `event` parameter is an instance of the `Object` class, which provides no additional information beyond the fact that it is an event object.
- Throws:
IOException
-
Oseriess
Loads and displays a FXML view named "Serie-view".- Parameters:
event
- event object that triggered the function, providing information about the source of the event and other details.Event: An ActionEvent object representing an action triggered by the user.
Properties:
- `getSource()`: Returns the source of the event (i.e., the button or menu item that was clicked).
- Throws:
IOException
-
Oepisode
Loads an FXML file, creates a scene, and sets it as the scene of a Stage, displaying the content on the stage.- Parameters:
event
- source of the action that triggered the method, providing a reference to the object from which the event originated.Event: An instance of the `ActionEvent` class that contains information about the action performed by the user. Properties:
- `getSource()`: Returns the object that triggered the event. In this case, it is a `Node` representing the `Episode-view.fxml` stage.
- Throws:
IOException
-
showStatistics
public void showStatistics(javafx.event.ActionEvent actionEvent) Loads a FXML view and replaces the current scene with it when an action event is triggered.- Parameters:
actionEvent
- event that triggered the function, which is used to determine what action to take based on the event type.- If `actionEvent` is not null, it represents an action event triggered by the user.
-
showmovies
public void showmovies(javafx.event.ActionEvent actionEvent) Likely displays a list or movies or performs some other movie-related actions when an event is triggered.- Parameters:
actionEvent
- event that triggered the execution of the `showMovies` function.
-
showproducts
public void showproducts(javafx.event.ActionEvent actionEvent) Displays a list of products.- Parameters:
actionEvent
- event that triggered the function call.
-
showcinema
public void showcinema(javafx.event.ActionEvent actionEvent) Does not have any discernible behavior or functionality as it is empty and lacks any statements or actions to perform.- Parameters:
actionEvent
- event that triggered the function call.
-
showevent
public void showevent(javafx.event.ActionEvent actionEvent) Is invoked when an event occurs and has no discernible functionality as it only contains a blank implementation.- Parameters:
actionEvent
- event that triggered the function's execution.
-
showseries
public void showseries(javafx.event.ActionEvent actionEvent) Is triggered by an `ActionEvent`. It does not provide any information about the code author or licensing.- Parameters:
actionEvent
- event that triggered the `showseries()` function to be called, providing the necessary context for its execution.
-