Packagecom.iwobanas.core
Interfacepublic interface ISearchable
ImplementorsMDataGrid

The ISearchable interface defines interface for components that can be searched.

This interface defines a way of passing searched wildcard to a component and how search result is returned. Because different component may return found data in different format this interface defines a result as boolean meaning that something was found true or not false. Implementing component have to expose found value using its own interface.



Public Properties
 PropertyDefined by
  found : Boolean
[read-only] Flag indicating if last search ended successfully true or not false.
ISearchable
  searchExpression : RegExp
[read-only] String wildcard converted to the regular expression (RegExp).
ISearchable
  searchString : String
[read-only] String wildcard used in last search.
ISearchable
Public Methods
 MethodDefined by
  
find(wildcard:String, caseInsensitive:Boolean = true):Boolean
Find the given wildcard in the component.
ISearchable
  
findNext():Boolean
Find next match using parameters specified in last call to found() function.
ISearchable
  
findPrevious():Boolean
Find previous match using parameters specified in last call to found() function.
ISearchable
Property detail
foundproperty
found:Boolean  [read-only]

Flag indicating if last search ended successfully true or not false.

This property can be used as the source for data binding.

Implementation
    public function get found():Boolean
searchExpressionproperty 
searchExpression:RegExp  [read-only]

String wildcard converted to the regular expression (RegExp).

This property can be used as the source for data binding.

Implementation
    public function get searchExpression():RegExp
searchStringproperty 
searchString:String  [read-only]

String wildcard used in last search.

This should equal to the string passed to the find() function.

This property can be used as the source for data binding.

Implementation
    public function get searchString():String
Method detail
find()method
public function find(wildcard:String, caseInsensitive:Boolean = true):Boolean

Find the given wildcard in the component.

Search the component for text wildcard passed wildcard and return boolean value determining if something was found. The wildcard should interpret " character as matching any string and "?" character as matching any single character.

Component may change its state after call to this function so that additional information about what was found can be accessed

Parameters
wildcard:String — text to search for
 
caseInsensitive:Boolean (default = true) — flag indicating whether search should be case insensitive

Returns
Booleantrue if text was fond or false if not
findNext()method 
public function findNext():Boolean

Find next match using parameters specified in last call to found() function.

Returns
Boolean
findPrevious()method 
public function findPrevious():Boolean

Find previous match using parameters specified in last call to found() function.

Returns
Boolean