Class LocaleProperty

  • All Implemented Interfaces:
    PropertyVisitorAcceptor, java.lang.Cloneable

    @OpenApiAll
    public class LocaleProperty
    extends ChoiceProperty
    The property for storing and editing some java.util.Locale value.
    See Also:
    Locale
    • Field Detail

      • mLocale

        private java.util.Locale mLocale
        The sett locale.
    • Constructor Detail

      • LocaleProperty

        public LocaleProperty()
        Default constructor. Value of the property will be null. ID will be empty string.
      • LocaleProperty

        public LocaleProperty​(java.lang.String id,
                              java.lang.Object value,
                              java.util.List choice)
        The constructor.
        Parameters:
        id - the ID of property.
        value - the value of the property.
        choice - the list of possible values.
      • LocaleProperty

        public LocaleProperty​(java.lang.String id,
                              int index,
                              java.util.List choice)
        The constructor.
        Parameters:
        id - the ID of property.
        index - the index in choice of selected value.
        choice - the list of possible values.
    • Method Detail

      • getLocale

        public java.util.Locale getLocale()
        Return the locale.
        Returns:
        a locale from property.
      • setLocale

        public void setLocale​(java.util.Locale locale)
        Sets a new locale for property.
        Parameters:
        locale - a new locale.
      • updateLocaleByValue

        public void updateLocaleByValue()
        Updates locale by current value. Also updates available language list for this property from ResourceManager languages.
      • updateLocaleByString

        public void updateLocaleByString​(java.lang.String locale)
        Update Locale By String
        Parameters:
        locale - Locale String.
      • clone

        public LocaleProperty clone()
        Description copied from class: Property
        Clones the property. Clone is not deep, the clone will have the same instance of value. The clone will not have registered PropertyChangeListeners.
        Overrides:
        clone in class ChoiceProperty
        Returns:
        the cloned property.