Class AdminSideBarController
- All Implemented Interfaces:
javafx.fxml.Initializable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Admin
private javafx.scene.control.Button
private javafx.scene.control.Button
private static final Logger
private javafx.scene.control.Button
private javafx.scene.control.Button
private javafx.scene.control.Button
private javafx.scene.control.Button
private javafx.scene.control.Button
javafx.scene.control.Button
private javafx.scene.web.WebView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(URL location, ResourceBundle resources) Is called when an instance of a class is created and initializes some resources.(package private) void
switchtcinema
(javafx.event.ActionEvent event) Loads a new FXML file `DashboardAdminCinema.fxml` when the `cinemaButton` is clicked.(package private) void
switchToEvent
(javafx.event.ActionEvent event) Is called when an action event occurs, indicating a change in the state of the application.(package private) void
switchToLogout
(javafx.event.ActionEvent event) Loads a new scene with a FXML file when the logout button is clicked, replacing the current stage's scene with the new one.(package private) void
switchToMovies
(javafx.event.ActionEvent event) Loads an fxml file named `ListeOrder.fxml` and sets the stage scene to display its root element.(package private) void
switchToProducts
(javafx.event.ActionEvent event) Loads an FXML file and sets the stage scene to display the contents of the file.(package private) void
switchToProfile
(javafx.event.ActionEvent event) Loads and displays the `Profile.fxml` stage when the `profileButton` is clicked.(package private) void
switchToSeries
(javafx.event.ActionEvent event) Loads a FXML file named "/ui/series/Categorie-view.fxml" into a Stage using the `FXMLLoader`.void
switchToUsers
(javafx.event.ActionEvent event) Loads a new user interface using the FXMLLoader and replaces the existing stage with the new scene.
-
Field Details
-
LOGGER
-
usersButton
public javafx.scene.control.Button usersButton -
admin
Admin admin -
webView
private javafx.scene.web.WebView webView -
cinemaButton
private javafx.scene.control.Button cinemaButton -
eventButton
private javafx.scene.control.Button eventButton -
movieButton
private javafx.scene.control.Button movieButton -
productButton
private javafx.scene.control.Button productButton -
serieButton
private javafx.scene.control.Button serieButton -
logoutButton
private javafx.scene.control.Button logoutButton -
profileButton
private javafx.scene.control.Button profileButton
-
-
Constructor Details
-
AdminSideBarController
public AdminSideBarController()
-
-
Method Details
-
switchToEvent
void switchToEvent(javafx.event.ActionEvent event) Is called when an action event occurs, indicating a change in the state of the application. It performs no additional actions and does not modify any variables.- Parameters:
event
- occurrence of an action that triggered the `switchToEvent` method to be called.
-
switchToMovies
void switchToMovies(javafx.event.ActionEvent event) Loads an fxml file named `ListeOrder.fxml` and sets the stage scene to display its root element.- Parameters:
event
- triggered action that initiated the code execution in the `switchToMovies()` method.- Event type: `ActionEvent` - Target: `movieButton` (a button object)
-
switchToProducts
void switchToProducts(javafx.event.ActionEvent event) Loads an FXML file and sets the stage scene to display the contents of the file.- Parameters:
event
- click event of a button, which triggers the execution of the `switchToProducts()` method.Event: An event object representing a button press.
Properties:
- `getSource()`: Returns the source of the event (in this case, the `ProductButton`). - `getButton()`: Returns the button that was pressed (e.g., "Product").
-
switchToSeries
void switchToSeries(javafx.event.ActionEvent event) Loads a FXML file named "/ui/series/Categorie-view.fxml" into a Stage using the `FXMLLoader`. It sets the data for the controller and then sets the scene of the Stage to the loaded root node.- Parameters:
event
- click event of the `switchToSeries` button, triggering the execution of the code inside the function.- `event`: An `ActionEvent` object representing a user-initiated action.
-
switchtcinema
void switchtcinema(javafx.event.ActionEvent event) Loads a new FXML file `DashboardAdminCinema.fxml` when the `cinemaButton` is clicked. It creates a new stage and sets its scene to the loaded root element.- Parameters:
event
- click event on the cinema button that triggered the function execution.- `event`: An `ActionEvent` object representing the user's action of switching to the cinema view.
-
switchToUsers
public void switchToUsers(javafx.event.ActionEvent event) Loads a new user interface using the FXMLLoader and replaces the existing stage with the new scene.- Parameters:
event
- user action that triggered the call to the `switchToUsers()` method.- Event type: ActionEvent
-
initialize
Is called when an instance of a class is created and initializes some resources.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
location
- URL of the application's resource bundle, which is used to load the appropriate resources for the application.resources
- resource bundle for the current application.
-
switchToLogout
void switchToLogout(javafx.event.ActionEvent event) Loads a new scene with a FXML file when the logout button is clicked, replacing the current stage's scene with the new one.- Parameters:
event
- click event on the logout button that triggers the function execution.- Event type: `ActionEvent`, indicating that the event was triggered by a user action. - Target object: `logoutButton`, indicating the button that was clicked to trigger the event.
-
switchToProfile
void switchToProfile(javafx.event.ActionEvent event) Loads and displays the `Profile.fxml` stage when the `profileButton` is clicked.- Parameters:
event
- mouse click event that triggered the function execution.- `event`: An `ActionEvent` object representing the user's action of clicking on the "Switch to Profile" button.
-