Module qupath.fx

Class LocaleSnapshot

java.lang.Object
qupath.fx.localization.LocaleSnapshot

public class LocaleSnapshot extends Object
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 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

      public Locale getMainLocale()
      Get the main locale, as stored in this snapshot.
      Returns:
    • getDisplayLocale

      public Locale getDisplayLocale()
      Get the display locale, as stored in this snapshot.
      Returns:
    • getFormatLocale

      public Locale 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: