Package com.everdro1d.libs.swing.dialogs
Class UpdateCheckerDialog
java.lang.Object
com.everdro1d.libs.swing.dialogs.UpdateCheckerDialog
The
UpdateCheckerDialog class provides functionality to check for application updates
and display a dialog prompting the user to update if a newer version is available.
This class integrates with GitHub release tags (formatted as "vX.Y.Z") to determine
the latest version and supports localization through the LocaleManager.
Features:
- Checks for updates using the GitHub releases page.
- Displays a localized dialog with options to update or skip.
- Supports "Do not ask again" functionality using
Preferences.
Example Usage:
UpdateCheckerDialog.showUpdateCheckerDialog(
"1.2.1", parentFrame, true,
"https://github.com/user/repo/releases/latest/",
"https://someurl.com/download", prefs, localeManager
);
Note: This class is not intended to be instantiated directly.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidshowUpdateCheckerDialog(String currentVersion, JFrame parentFrame, boolean printDebug, String githubURL, String downloadURL, Preferences prefs, LocaleManager localeManager) Check for updates and display a dialog if an update is available.
-
Method Details
-
showUpdateCheckerDialog
public static void showUpdateCheckerDialog(String currentVersion, JFrame parentFrame, boolean printDebug, String githubURL, String downloadURL, Preferences prefs, LocaleManager localeManager) Check for updates and display a dialog if an update is available.- Parameters:
currentVersion- the current version of the application - "1.2.1"parentFrame- the parent frame of the dialogprintDebug- whether to print debug informationgithubURL- the URL of the GitHub repository - "https://github.com/user/repo/releases/latest/"downloadURL- the URL of the download link - "https://someurl.com/download"prefs- the preferences object for saving do not ask againlocaleManager- locale manager obj for translations- See Also:
-