Class NativePropertyListener<S,D extends IDiff>
- java.lang.Object
-
- org.eclipse.core.databinding.property.NativePropertyListener<S,D>
-
- Type Parameters:
S- type of the source objectD- 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 NativePropertyListener(IProperty property, ISimplePropertyListener<S,D> listener)Constructs a NativePropertyListener with the specified arguments
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddTo(S source)Adds the receiver as a listener for property events on the specified property source.protected abstract voiddoAddTo(S source)protected abstract voiddoRemoveFrom(S source)protected voidfireChange(S source, D diff)Notifies the listener that a property change occurred on the source object.protected voidfireStale(S source)Notifies the listener that the property became stale on the source object.voidremoveFrom(S source)Removes the receiver as a listener for property events on the specified property source.
-
-
-
Constructor Detail
-
NativePropertyListener
public NativePropertyListener(IProperty property, ISimplePropertyListener<S,D> listener)
Constructs a NativePropertyListener with the specified arguments- Parameters:
property- the property that this listener listens tolistener- the listener to receive property change notifications
-
-
Method Detail
-
addTo
public final void addTo(S source)
Description copied from interface:INativePropertyListenerAdds the receiver as a listener for property events on the specified property source.- Specified by:
addToin interfaceINativePropertyListener<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:INativePropertyListenerRemoves the receiver as a listener for property events on the specified property source.- Specified by:
removeFromin interfaceINativePropertyListener<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 changeddiff- a diff describing the change in state
-
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
-
-