javax.swing.event

Class SwingPropertyChangeSupport

  • All Implemented Interfaces:
    Serializable

    public final class SwingPropertyChangeSupport
    extends PropertyChangeSupport
    This subclass of java.beans.PropertyChangeSupport is almost identical in functionality. The only difference is if constructed with SwingPropertyChangeSupport(sourceBean, true) it ensures listeners are only ever notified on the Event Dispatch Thread.
    • Constructor Detail

      • SwingPropertyChangeSupport

        public SwingPropertyChangeSupport(Object sourceBean)
        Constructs a SwingPropertyChangeSupport object.
        Parameters:
        sourceBean - The bean to be given as the source for any events.
        Throws:
        NullPointerException - if sourceBean is null
      • SwingPropertyChangeSupport

        public SwingPropertyChangeSupport(Object sourceBean,
                                  boolean notifyOnEDT)
        Constructs a SwingPropertyChangeSupport object.
        Parameters:
        sourceBean - the bean to be given as the source for any events
        notifyOnEDT - whether to notify listeners on the Event Dispatch Thread only
        Throws:
        NullPointerException - if sourceBean is null
        Since:
        1.6
    • Method Detail

      • firePropertyChange

        public void firePropertyChange(PropertyChangeEvent evt)
        Fires a property change event to listeners that have been registered to track updates of all properties or a property with the specified name.

        No event is fired if the given event's old and new values are equal and non-null.

        If isNotifyOnEDT() is true and called off the Event Dispatch Thread this implementation uses SwingUtilities.invokeLater to send out the notification on the Event Dispatch Thread. This ensures listeners are only ever notified on the Event Dispatch Thread.

        Overrides:
        firePropertyChange in class PropertyChangeSupport
        Parameters:
        evt - the PropertyChangeEvent to be fired
        Throws:
        NullPointerException - if evt is null
        Since:
        1.6

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 06/12/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/swing/event/swingpropertychangesupport.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, SwingPropertyChangeSupport

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut