Class Preferences.PropertyChangeEvent

    • Constructor Detail

      • PropertyChangeEvent

        protected PropertyChangeEvent​(Object source,
                                      String property,
                                      Object oldValue,
                                      Object newValue)
        Creates a new property change event.
        Parameters:
        source - the object whose property has changed
        property - the property that has changed (must not be null)
        oldValue - the old value of the property, or null if none
        newValue - the new value of the property, or null if none
    • Method Detail

      • getProperty

        public String getProperty()
        Returns the name of the property that changed.

        Warning: there is no guarantee that the property name returned is a constant string. Callers must compare property names using equals, not ==.

        Returns:
        the name of the property that changed
      • getNewValue

        public Object getNewValue()
        Returns the new value of the property.
        Returns:
        the new value, or null if not known or not relevant
      • getOldValue

        public Object getOldValue()
        Returns the old value of the property.
        Returns:
        the old value, or null if not known or not relevant