mirror of
https://github.com/Akomry/sae302_applicom.git
synced 2025-12-06 03:33:54 +00:00
feat(aboutMenuItem): ajout d'une callback et d'une alerte lors d'une interaction avec le menu À propos
This commit is contained in:
parent
7b69328707
commit
c9fa2bda42
1 changed files with 7 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ import javafx.collections.ObservableList;
|
|||
import javafx.embed.swing.SwingFXUtils;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.Event;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.Scene;
|
||||
|
|
@ -169,6 +170,12 @@ public class ChatController implements Initializable {
|
|||
avatarImageView.setOnMouseClicked(this::handleAvatarChange);
|
||||
sendButton.setOnAction(this::onActionSend);
|
||||
messageTextField.setOnAction(this::onActionSend);
|
||||
aboutMenuItem.setOnAction((ActionEvent) -> {
|
||||
Alert alert = new Alert(Alert.AlertType.INFORMATION, i18nBundle.getString("welcomeText"));
|
||||
alert.setTitle(i18nBundle.getString("welcomeTitle"));
|
||||
alert.setHeaderText(null);
|
||||
alert.show();
|
||||
});
|
||||
|
||||
initContextMenu();
|
||||
postListView.setOnContextMenuRequested(this::handleContextMenu);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue