Class MutableIconProviderSupport

    • Constructor Detail

      • MutableIconProviderSupport

        public MutableIconProviderSupport()
    • Method Detail

      • addPropertyChangeListener

        public void addPropertyChangeListener​(@Nonnull
                                              java.beans.PropertyChangeListener listener)
        Registers a PropertyChangeListener.
        Specified by:
        addPropertyChangeListener in interface MutableIconProvider
        Parameters:
        listener - the listener
      • removePropertyChangeListener

        public void removePropertyChangeListener​(@Nonnull
                                                 java.beans.PropertyChangeListener listener)
        Unregisters a PropertyChangeListener.
        Specified by:
        removePropertyChangeListener in interface MutableIconProvider
        Parameters:
        listener - the listener
      • setIcon

        public void setIcon​(@Nonnull
                            javax.swing.Icon icon)
        Sets the icon. Note that implementations don't actually need to do something in this method: for instance, a valid MutableIconProvider can autonomously change icon in function of time (e.g. a blinking icon) or reacting to a change in the context. FIXME: this method does nothing. Probably this is inconsistent with DefaultMutableDisplayable? But that is a Default*, we're just a *Support...
        Specified by:
        setIcon in interface MutableIconProvider
        Parameters:
        icon - the icon
      • fireIconChange

        protected void fireIconChange​(@Nonnull
                                      javax.swing.Icon oldIcon,
                                      @Nonnull
                                      javax.swing.Icon newIcon)
        Fires the event notifying that MutableIconProvider.PROP_ICON has been changed.
        Parameters:
        oldIcon - the old value of the property
        newIcon - the new value of the property