A centralized service for sending toast notifications to the UI.
More...
|
| ReadOnlyBooleanProperty | removeToastRequestProperty () |
| | Returns a read-only observable property that signals requests to remove a toast.
|
| |
| void | requestRemoveToast () |
| | Requests the removal of the currently displayed toast.
|
| |
| void | showError (String visibleText, String detailedText) throws NullPointerException |
| | Sends an error toast.
|
| |
| void | showInfo (String visibleText, String detailedText) throws NullPointerException |
| | Sends an informational toast.
|
| |
| void | showWarning (String visibleText, String detailedText) throws NullPointerException |
| | Sends a warning toast.
|
| |
| ReadOnlyObjectProperty< ToastData > | toastRequestProperty () |
| | Returns a read-only observable property for toast notifications.
|
| |
|
| void | sendToast (String visibleText, String detailedText, ToastLevels level) |
| | Publishes a ToastData to toastRequest, resetting it to null first to ensure listeners fire even if identical to the previous value.
|
| |
|
| final BooleanProperty | removeToastRequest = new SimpleBooleanProperty(false) |
| |
| final ObjectProperty< ToastData > | toastRequest = new SimpleObjectProperty<>() |
| |
A centralized service for sending toast notifications to the UI.
ViewModels can inject this service to trigger toasts.
◆ removeToastRequestProperty()
| ReadOnlyBooleanProperty fr.softsf.sudokufx.service.ui.ToasterService.removeToastRequestProperty |
( |
| ) |
|
Returns a read-only observable property that signals requests to remove a toast.
◆ requestRemoveToast()
| void fr.softsf.sudokufx.service.ui.ToasterService.requestRemoveToast |
( |
| ) |
|
Requests the removal of the currently displayed toast.
This triggers the removeToastRequestProperty() listener in the UI to remove the toast.
◆ sendToast()
| void fr.softsf.sudokufx.service.ui.ToasterService.sendToast |
( |
String | visibleText, |
|
|
String | detailedText, |
|
|
ToastLevels | level ) |
|
private |
Publishes a ToastData to toastRequest, resetting it to null first to ensure listeners fire even if identical to the previous value.
- Parameters
-
| visibleText | The text displayed in the toast |
| detailedText | The detailed text for clipboard copy |
| level | The severity level of the toast |
- Exceptions
-
| NullPointerException | if visibleText or detailedText is null |
◆ showError()
| void fr.softsf.sudokufx.service.ui.ToasterService.showError |
( |
String | visibleText, |
|
|
String | detailedText ) throws NullPointerException |
Sends an error toast.
- Exceptions
-
| NullPointerException | if visibleText or detailedText is null |
◆ showInfo()
| void fr.softsf.sudokufx.service.ui.ToasterService.showInfo |
( |
String | visibleText, |
|
|
String | detailedText ) throws NullPointerException |
Sends an informational toast.
- Exceptions
-
| NullPointerException | if visibleText or detailedText is null |
◆ showWarning()
| void fr.softsf.sudokufx.service.ui.ToasterService.showWarning |
( |
String | visibleText, |
|
|
String | detailedText ) throws NullPointerException |
Sends a warning toast.
- Exceptions
-
| NullPointerException | if visibleText or detailedText is null |
◆ toastRequestProperty()
| ReadOnlyObjectProperty< ToastData > fr.softsf.sudokufx.service.ui.ToasterService.toastRequestProperty |
( |
| ) |
|
Returns a read-only observable property for toast notifications.
◆ removeToastRequest
| final BooleanProperty fr.softsf.sudokufx.service.ui.ToasterService.removeToastRequest = new SimpleBooleanProperty(false) |
|
private |
◆ toastRequest
| final ObjectProperty<ToastData> fr.softsf.sudokufx.service.ui.ToasterService.toastRequest = new SimpleObjectProperty<>() |
|
private |
The documentation for this class was generated from the following file: