Package | org.spicefactory.parsley.core.view.impl |
Class | public class DefaultViewAutowireFilter |
Inheritance | DefaultViewAutowireFilter AbstractViewAutowireFilter Object |
<View>
tag in the MXML or XML
configuration for the Context.
Method | Defined By | ||
---|---|---|---|
DefaultViewAutowireFilter(settings:ViewSettings = null, excludedTypes:RegExp = null)
Creates a new instance. | DefaultViewAutowireFilter | ||
filter(object:DisplayObject):ViewAutowireMode [override]
Makes the final decision whether a view object should be wired to the Context. | DefaultViewAutowireFilter | ||
prefilter(object:DisplayObject):Boolean [override]
Prefilters the specified view object, deciding whether it should be further processed. | DefaultViewAutowireFilter |
DefaultViewAutowireFilter | () | Constructor |
public function DefaultViewAutowireFilter(settings:ViewSettings = null, excludedTypes:RegExp = null)
Creates a new instance.
Parameterssettings:ViewSettings (default = null ) — the types to exclude in the prefilter method
| |
excludedTypes:RegExp (default = null )
|
filter | () | method |
override public function filter(object:DisplayObject):ViewAutowireMode
Makes the final decision whether a view object should be wired to the Context.
This method will only be invoked for objects which passed the prefilter method. In a multi-Context scenario in a modular application this method may be invoked in a different filter instance than the prefilter method. The latter will be invoked in the root Context in most cases, this method however will often be invoked in a child Context.
The enumeration value returned by this method indicates how the framework should
deal with this view object. See the ViewAutowireMode
class for details.
Parameters
object:DisplayObject — the view object to filter
|
ViewAutowireMode — an enumeration value that indicates how the framework should
deal with this view object
|
prefilter | () | method |
override public function prefilter(object:DisplayObject):Boolean
Prefilters the specified view object, deciding whether it should be further processed. This is primarily for performance optimizations as the final decision whether a view gets wired or not will be made by the filter method. Only objects for which this method returns true will then dispatch a bubbling autowire event. This is necessary as we have to listen in the capture phase first to get a hold on every view object, but must then reroute the event from bottom to top to allow the Context with the lowest position in the view hierarchy to make the final decision.
Parameters
object:DisplayObject — the view object to be filtered
|
Boolean — true if the specified view object should be further processed.
|