Interface MutableDisplayable

  • All Superinterfaces:
    Displayable
    All Known Subinterfaces:
    MutableLocalizedDisplayable

    public interface MutableDisplayable
    extends Displayable
    A specialized Displayable which is mutable (that is, its display name can be changed) and fires PropertyChangeEvents.
    Author:
    Fabrizio Giudici
    Status: stable API
    Stereotype:
    Role
    • Field Detail

      • _MutableDisplayable_

        static final java.lang.Class<MutableDisplayable> _MutableDisplayable_
      • PROP_DISPLAY_NAME

        static final java.lang.String PROP_DISPLAY_NAME
        The property name for displayName
        See Also:
        Constant Field Values
      • PROP_DISPLAY_NAMES

        static final java.lang.String PROP_DISPLAY_NAMES
        The property name for displayNames
        See Also:
        Constant Field Values
    • Method Detail

      • setDisplayName

        void setDisplayName​(@Nonnull
                            java.lang.String displayName)
        Sets the display name in Locale.ENGLISH.
        Parameters:
        displayName - the display name
      • setDisplayName

        void setDisplayName​(@Nonnull
                            java.lang.String displayName,
                            @Nonnull
                            java.util.Locale locale)
        Sets the display name in the given Locale.
        Parameters:
        displayName - the display name
        locale - the locale
      • setDisplayNames

        void setDisplayNames​(@Nonnull
                             java.util.Map<java.util.Locale,​java.lang.String> displayNames)
        Sets a bag of display names for a number of Locales.
        Parameters:
        displayNames - the display names
      • addPropertyChangeListener

        void addPropertyChangeListener​(@Nonnull
                                       java.beans.PropertyChangeListener listener)
        Registers a PropertyChangeListener.
        Parameters:
        listener - the listener
      • removePropertyChangeListener

        void removePropertyChangeListener​(@Nonnull
                                          java.beans.PropertyChangeListener listener)
        Unregisters a PropertyChangeListener.
        Parameters:
        listener - the listener
      • of

        @Nonnull
        static MutableDisplayable of​(@Nonnull
                                     java.lang.String displayName)
        Creates an instance with an initial given display name in Locale.ENGLISH.
        Parameters:
        displayName - the display name
        Returns:
        the new instance
        Since:
        3.2-ALPHA-1
      • of

        @Nonnull
        static MutableDisplayable of​(@Nonnull
                                     java.lang.String displayName,
                                     @Nonnull
                                     java.lang.String toStringName)
        Creates an instance with an initial given display name in Locale.ENGLISH and an explicit identifier for toString().
        Parameters:
        displayName - the display name
        toStringName - the name to be rendered when toString() is called
        Returns:
        the new instance
        Since:
        3.2-ALPHA-1