A centralized service for managing the global loading state through a thread-safe reference counter.
More...
|
| ReadOnlyBooleanProperty | loadingProperty () |
| | Returns a read-only observable property indicating whether a loading process is active.
|
| void | startLoading () |
| | Increments the active task counter and activates the loading state upon the first registration.
|
| void | stopLoading () |
| | Decrements the active task counter and deactivates the loading state only when no more tasks are pending.
|
|
| final ReadOnlyBooleanWrapper | loading = new ReadOnlyBooleanWrapper(false) |
| final AtomicInteger | taskCount = new AtomicInteger(0) |
A centralized service for managing the global loading state through a thread-safe reference counter.
This service ensures the UI spinner remains active as long as at least one background task is being processed.
◆ loadingProperty()
| ReadOnlyBooleanProperty fr.softsf.sudokufx.service.ui.SpinnerService.loadingProperty |
( |
| ) |
|
Returns a read-only observable property indicating whether a loading process is active.
- Returns
- The loading property
◆ startLoading()
| void fr.softsf.sudokufx.service.ui.SpinnerService.startLoading |
( |
| ) |
|
Increments the active task counter and activates the loading state upon the first registration.
Executed on the JavaFX Application Thread.
◆ stopLoading()
| void fr.softsf.sudokufx.service.ui.SpinnerService.stopLoading |
( |
| ) |
|
Decrements the active task counter and deactivates the loading state only when no more tasks are pending.
Executed on the JavaFX Application Thread.
◆ loading
| final ReadOnlyBooleanWrapper fr.softsf.sudokufx.service.ui.SpinnerService.loading = new ReadOnlyBooleanWrapper(false) |
|
private |
◆ taskCount
| final AtomicInteger fr.softsf.sudokufx.service.ui.SpinnerService.taskCount = new AtomicInteger(0) |
|
private |
The documentation for this class was generated from the following file: