@Nonnull public static Feedback8 feedback() { return new Feedback8(Callback.EMPTY, Callback.EMPTY); }
/******************************************************************************************************************* * ******************************************************************************************************************/ private void onButtonDialogOkCancelPressed() { presentation.notify(notificationWithFeedback() .withCaption("Notification") .withText("Now press the button") .withFeedback(feedback().withOnConfirm(() -> presentation.notify("Pressed ok")) .withOnCancel(() -> presentation.notify("Pressed cancel")))); }
/******************************************************************************************************************* * ******************************************************************************************************************/ private void onButtonDialogOkPressed() { presentation.notify(notificationWithFeedback() .withCaption("Notification") .withText("Now press the button") .withFeedback(feedback().withOnConfirm(() -> presentation.notify("Pressed ok")))); }
/******************************************************************************************************************* * * This method demonstrates how to pick a directory name by using the proper UI dialog. * ******************************************************************************************************************/ private void onButtonPickDirectoryPressed() { final BoundProperty<Path> selectedFolder = new BoundProperty<>(USER_HOME); presentation.pickDirectory(selectedFolder, notificationWithFeedback() .withCaption("Pick a directory") .withFeedback(feedback().withOnConfirm(() -> presentation.notify("Selected folder: " + selectedFolder.get())) .withOnCancel(() -> presentation.notify("Selection cancelled")))); }
private void askForOpeningSite() throws IOException { presentation.notifyInvitationToSelectAFolder(notificationWithFeedback() .withCaption("Select the site to open") .withFeedback(feedback() .withOnConfirm(() -> messageBus.publish(OpenSiteEvent.of(bindings.folderToOpen.get()))))); }
/******************************************************************************************************************* * * This method demonstrates how to pick a file name by using the proper UI dialog. * ******************************************************************************************************************/ private void onButtonPickFilePressed() { final BoundProperty<Path> selectedFile = new BoundProperty<>(USER_HOME); presentation.pickFile(selectedFile, notificationWithFeedback() .withCaption("Pick a file") .withFeedback(feedback().withOnConfirm(() -> presentation.notify("Selected file: " + selectedFile.get())) .withOnCancel(() -> presentation.notify("Selection cancelled")))); }