Class NativePropertyListener<S,D extends IDiff>

java.lang.Object
org.eclipse.core.databinding.property.NativePropertyListener<S,D>
Type Parameters:
S - type of the source object
D - type of the diff handled by this listener
All Implemented Interfaces:
INativePropertyListener<S>

public abstract class NativePropertyListener<S,D extends IDiff> extends Object implements INativePropertyListener<S>
Abstract INativePropertyListener implementation
Since:
1.2
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a NativePropertyListener with the specified arguments
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    addTo(S source)
    Adds the receiver as a listener for property events on the specified property source.
    protected abstract void
    doAddTo(S source)
     
    protected abstract void
    doRemoveFrom(S source)
     
    protected void
    fireChange(S source, D diff)
    Notifies the listener that a property change occurred on the source object.
    protected void
    fireStale(S source)
    Notifies the listener that the property became stale on the source object.
    final void
    removeFrom(S source)
    Removes the receiver as a listener for property events on the specified property source.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NativePropertyListener

      public NativePropertyListener(IProperty property, ISimplePropertyListener<S,D> listener)
      Constructs a NativePropertyListener with the specified arguments
      Parameters:
      property - the property that this listener listens to
      listener - the listener to receive property change notifications
  • Method Details

    • addTo

      public final void addTo(S source)
      Description copied from interface: INativePropertyListener
      Adds the receiver as a listener for property events on the specified property source.
      Specified by:
      addTo in interface INativePropertyListener<S>
      Parameters:
      source - the property source (may be null)
    • doAddTo

      protected abstract void doAddTo(S source)
    • removeFrom

      public final void removeFrom(S source)
      Description copied from interface: INativePropertyListener
      Removes the receiver as a listener for property events on the specified property source.
      Specified by:
      removeFrom in interface INativePropertyListener<S>
      Parameters:
      source - the property source (may be null)
    • doRemoveFrom

      protected abstract void doRemoveFrom(S source)
    • fireChange

      protected void fireChange(S source, D diff)
      Notifies the listener that a property change occurred on the source object.
      Parameters:
      source - the source object whose property changed
      diff - a diff describing the change in state, or null for an auto-generated diff
    • fireStale

      protected void fireStale(S source)
      Notifies the listener that the property became stale on the source object.
      Parameters:
      source - the source object whose property became stale