Package sc.bind
Class AbstractListener
- java.lang.Object
-
- sc.bind.AbstractListener
-
- All Implemented Interfaces:
IListener
- Direct Known Subclasses:
ArraySelectorBinding
,DBChangeableListener
,DestinationListener
,RepeatListener
,STagBindingListener
,SyncManager.SyncChangeListener
public abstract class AbstractListener extends java.lang.Object implements IListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface sc.bind.IListener
IListener.SyncType
-
-
Field Summary
-
Fields inherited from interface sc.bind.IListener
ARRAY_ELEMENT_CHANGED, ARRAY_ELEMENT_INVALIDATED, ARRAY_ELEMENT_VALIDATED, LISTENER_ADDED, PENDING_VALUE_SENTINEL, UNSET_VALUE_SENTINEL, VALUE_CHANGED, VALUE_CHANGED_MASK, VALUE_INVALIDATED, VALUE_REQUESTED, VALUE_VALIDATED
-
-
Constructor Summary
Constructors Constructor Description AbstractListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(boolean state, java.lang.Object obj, boolean chained)
boolean
arrayElementChanged(java.lang.Object obj, java.lang.Object prop, java.lang.Object dims, boolean apply)
boolean
arrayElementInvalidated(java.lang.Object obj, java.lang.Object prop, java.lang.Object dims, boolean apply)
boolean
arrayElementValidated(java.lang.Object obj, java.lang.Object prop, java.lang.Object dims, boolean apply)
java.util.List<CurrentScopeContext>
getCurrentScopeContexts()
float
getPriority()
IListener.SyncType
getSync()
boolean
getTrace()
Override and return true if trace is enabled to get tracing of property-set for any property using this listenerboolean
getVerbose()
boolean
isCrossScope()
boolean
listenerAdded(java.lang.Object obj, java.lang.Object prop, java.lang.Object listener, int eventMask, int priority)
void
parentBindingChanged()
Remap Java bean style eventsjava.lang.Object
performCast(java.lang.Object value)
This is called by the parent binding before we apply a reverse binding.boolean
valueChanged(java.lang.Object obj, java.lang.Object prop, java.lang.Object eventDetail, boolean apply)
Called to notify the listener of a VALUE_CHANGED event on the property srcProp.boolean
valueInvalidated(java.lang.Object obj, java.lang.Object prop, java.lang.Object eventDetail, boolean apply)
void
valueRequested(java.lang.Object obj, java.lang.Object prop)
boolean
valueValidated(java.lang.Object obj, java.lang.Object prop, java.lang.Object eventDetail, boolean apply)
-
-
-
Method Detail
-
getSync
public IListener.SyncType getSync()
-
getPriority
public float getPriority()
- Specified by:
getPriority
in interfaceIListener
-
valueRequested
public void valueRequested(java.lang.Object obj, java.lang.Object prop)
- Specified by:
valueRequested
in interfaceIListener
-
valueInvalidated
public boolean valueInvalidated(java.lang.Object obj, java.lang.Object prop, java.lang.Object eventDetail, boolean apply)
- Specified by:
valueInvalidated
in interfaceIListener
-
valueValidated
public boolean valueValidated(java.lang.Object obj, java.lang.Object prop, java.lang.Object eventDetail, boolean apply)
- Specified by:
valueValidated
in interfaceIListener
-
valueChanged
public boolean valueChanged(java.lang.Object obj, java.lang.Object prop, java.lang.Object eventDetail, boolean apply)
Description copied from interface:IListener
Called to notify the listener of a VALUE_CHANGED event on the property srcProp. The eventDetail may include the new value but is mainly used for debug logging. Typically code using or implementing a binding will get the current property rather than rely on the value propagated in the event since it might have changed since the delivery started.This method returns true if the binding detected that the value had changed. False if it is detects the binding did not change. Since most listeners cache the old value, they can tell whether we need to keep processing this change. If you do not cache the old value, just return "true".
- Specified by:
valueChanged
in interfaceIListener
-
arrayElementChanged
public boolean arrayElementChanged(java.lang.Object obj, java.lang.Object prop, java.lang.Object dims, boolean apply)
- Specified by:
arrayElementChanged
in interfaceIListener
-
arrayElementValidated
public boolean arrayElementValidated(java.lang.Object obj, java.lang.Object prop, java.lang.Object dims, boolean apply)
- Specified by:
arrayElementValidated
in interfaceIListener
-
arrayElementInvalidated
public boolean arrayElementInvalidated(java.lang.Object obj, java.lang.Object prop, java.lang.Object dims, boolean apply)
- Specified by:
arrayElementInvalidated
in interfaceIListener
-
listenerAdded
public boolean listenerAdded(java.lang.Object obj, java.lang.Object prop, java.lang.Object listener, int eventMask, int priority)
- Specified by:
listenerAdded
in interfaceIListener
-
parentBindingChanged
public void parentBindingChanged()
Remap Java bean style events
-
performCast
public java.lang.Object performCast(java.lang.Object value)
This is called by the parent binding before we apply a reverse binding. It might need to do some conversion of the value before it can set it to the destination (i.e. like a float to int conversion).
-
activate
public void activate(boolean state, java.lang.Object obj, boolean chained)
-
getTrace
public boolean getTrace()
Description copied from interface:IListener
Override and return true if trace is enabled to get tracing of property-set for any property using this listener
-
getVerbose
public boolean getVerbose()
- Specified by:
getVerbose
in interfaceIListener
-
isCrossScope
public boolean isCrossScope()
- Specified by:
isCrossScope
in interfaceIListener
-
getCurrentScopeContexts
public java.util.List<CurrentScopeContext> getCurrentScopeContexts()
- Specified by:
getCurrentScopeContexts
in interfaceIListener
-
-