Packageorg.springextensions.actionscript.stage.selectors
SVN browsingNameBasedObjectSelector.as
FisheyeNameBasedObjectSelector.as
Classpublic class NameBasedObjectSelector
ImplementsIObjectSelector

IObjectSelector approving or denying objects based on a String property (default property name: "name") to be matched against an array of Regexp (default behaviour approves objects whose name matches all passed regexp, approves all objects if no regexp is passed).

Author: Martino Piccinato
Version: $Revision:$, $Date:$, $Author:$
Since: 0.8

See also

String.match()


Documentation reference: how to determine which stage components are eligeble for configuration

Sample project: stagewiring (source)


Public Properties
 PropertyDefined by
  denyOnMatch : Boolean
[write-only]
NameBasedObjectSelector
  nameRegexpArray : Array
[write-only]
NameBasedObjectSelector
  propertyName : String
[write-only]
NameBasedObjectSelector
Public Methods
 MethodDefined by
  
NameBasedObjectSelector(regexpArray:Array = null, propertyName:String, denyOnMatch:Boolean = false)
Create a new NameBasedObjectSelector.
NameBasedObjectSelector
  
approve(object:Object):Boolean

NameBasedObjectSelector
Property detail
denyOnMatchproperty
denyOnMatch:Boolean  [write-only]

The default value is <code>false</code>.

Implementation
    public function set denyOnMatch(value:Boolean):void
nameRegexpArrayproperty 
nameRegexpArray:Array  [write-only]

Implementation
    public function set nameRegexpArray(value:Array):void
propertyNameproperty 
propertyName:String  [write-only]

Implementation
    public function set propertyName(value:String):void
Constructor detail
NameBasedObjectSelector()constructor
public function NameBasedObjectSelector(regexpArray:Array = null, propertyName:String, denyOnMatch:Boolean = false)

Create a new NameBasedObjectSelector.

Parameters
regexpArray:Array (default = null) — An array of String or Regexp to be used for object name pattern matching.
 
propertyName:String — The property name to be used as the object "name" to be matched against the regexp array.
 
denyOnMatch:Boolean (default = false) — set true to invert selection logic and DENY object whose name match the passed regexp array.
Method detail
approve()method
public function approve(object:Object):Boolean

Parameters
object:Object — The object to be approved (or not) for selection.

Returns
Booleantrue if the object is selected, false otherwise.