![]() |
SudokuFX
|
ViewModel for managing the "New" menu UI state, accessibility labels, and update status. More...
Collaboration diagram for fr.softsf.sudokufx.viewmodel.MenuNewViewModel:Public Member Functions | |
| MenuNewViewModel (VersionService versionService) | |
| BooleanProperty | isOutOfDateProperty () |
| Indicates whether the application is out-of-date. | |
| StringBinding | maxiNewAccessibleTextProperty () |
| StringBinding | maxiNewTextProperty () |
| StringBinding | maxiNewTooltipProperty () |
| StringBinding | newAccessibleTextProperty () |
| StringBinding | newTooltipProperty () |
| StringProperty | statusMessageProperty () |
| Provides the current status message from the version check. | |
Private Member Functions | |
| void | checkVersion () |
| Starts an async version check, updating isOutOfDate and statusMessage. | |
| StringBinding | createStringBinding (String key) |
| Creates a localized StringBinding for the given key. | |
Private Attributes | |
| Task< Boolean > | currentTask |
| final BooleanProperty | isOutOfDate = new SimpleBooleanProperty(false) |
| final StringBinding | maxiNewAccessibleText |
| final StringBinding | maxiNewText |
| final StringBinding | maxiNewTooltip |
| final StringBinding | newAccessibleText |
| final StringBinding | newTooltip |
| final StringProperty | statusMessage = new SimpleStringProperty() |
| ChangeListener< Boolean > | versionListener |
| final VersionService | versionService |
ViewModel for managing the "New" menu UI state, accessibility labels, and update status.
Provides localized StringBindings for button texts, accessible texts, and tooltips for both maxi and mini "New" buttons.
Checks asynchronously via VersionService if the application is up-to-date, exposing update status and related messages to the view.
Uses the I18n singleton for localization with automatic updates on locale changes.
| fr.softsf.sudokufx.viewmodel.MenuNewViewModel.MenuNewViewModel | ( | VersionService | versionService | ) |
Here is the call graph for this function:
|
private |
Starts an async version check, updating isOutOfDate and statusMessage.
Safely removes previous listeners and bindings to avoid memory leaks. Runs the check in a daemon thread.
|
private |
Creates a localized StringBinding for the given key.
Automatically updates when the locale changes.
| key | the localization key |
| BooleanProperty fr.softsf.sudokufx.viewmodel.MenuNewViewModel.isOutOfDateProperty | ( | ) |
Indicates whether the application is out-of-date.
This property is useful for binding visibility of update notifications.
| StringBinding fr.softsf.sudokufx.viewmodel.MenuNewViewModel.maxiNewAccessibleTextProperty | ( | ) |
| StringBinding fr.softsf.sudokufx.viewmodel.MenuNewViewModel.maxiNewTextProperty | ( | ) |
| StringBinding fr.softsf.sudokufx.viewmodel.MenuNewViewModel.maxiNewTooltipProperty | ( | ) |
| StringBinding fr.softsf.sudokufx.viewmodel.MenuNewViewModel.newAccessibleTextProperty | ( | ) |
| StringBinding fr.softsf.sudokufx.viewmodel.MenuNewViewModel.newTooltipProperty | ( | ) |
| StringProperty fr.softsf.sudokufx.viewmodel.MenuNewViewModel.statusMessageProperty | ( | ) |
Provides the current status message from the version check.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |