java.lang.Object
qupath.fx.localization.LocaleSnapshot
Snapshot of the current locale settings, including the main, display and format locales.
Because locale settings via Locale
are not observable, it is not straightfoward to pick up when they have
been changed.
This class makes it possible to snapshot the current status, and then check whether it has changed on demand.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the display locale, as stored in this snapshot.Get the format locale, as stored in this snapshot.Get the main locale, as stored in this snapshot.boolean
Check whether this snapshot corresponds to the current locale settings.void
refresh()
Refresh the snapshot to the current locale settings.
-
Constructor Details
-
LocaleSnapshot
public LocaleSnapshot()Create a new snapshot of the current locale settings.
-
-
Method Details
-
refresh
public void refresh()Refresh the snapshot to the current locale settings. -
getMainLocale
Get the main locale, as stored in this snapshot.- Returns:
-
getDisplayLocale
Get the display locale, as stored in this snapshot.- Returns:
-
getFormatLocale
Get the format locale, as stored in this snapshot.- Returns:
-
hasChanged
public boolean hasChanged()Check whether this snapshot corresponds to the current locale settings.- Returns:
-