Packageardisia.components.autoComplete
Classpublic class AutoComplete
InheritanceAutoComplete Inheritance spark.components.ComboBox

AutoComplete ComboBox. Will filter and display results as the user enters text into the combo.

Note, the selectedIndex refers to the index in the filtered store. Use the "selectedItem" property to extract selections, not the selectedIndex.

Searching is case-insensitive.

View the technical documentation on the Ardisia Labs website for more information.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
  dataProvider : IList
[override] [write-only]
AutoComplete
  emptySetMessage : String
When the matched set is empty, this is the message that will be displayed.
AutoComplete
  hideClearButtonFocusOut : Boolean
When true, on focusOut, even if text is still displayed in this control, the optional clear button will be hidden.
AutoComplete
Public Methods
 MethodDefined By
  
Apply a filter to the results based on the string entered by the user.
AutoComplete
  
Moves the caret to the right of the textInput.
AutoComplete
Protected Methods
 MethodDefined By
  
Sets the visibility of the emptySet label.
AutoComplete
  
eventHandler(event:Event):void
Handles events on the component.
AutoComplete
  
filterFunction(item:Object):Boolean
Filter to use.
AutoComplete
  
matchingFunction(comboBox:ComboBox, inputText:String):Vector.<int>
The matching function.
AutoComplete
  
textInputHandler(event:Event):void
AutoComplete
  
Update the empty label skin part.
AutoComplete
  
Update the text input skin part.
AutoComplete
Events
 Event Summary Defined By
  Dispatched when the optional clear button part is clicked.AutoComplete
Styles
 Style Description Defined By
  
iconClass
Type: Class CSS Inheritance: no
Embedded graphics class for the icon. Expects the data in a format that a BitmapImage element will understand. The default value is see defaults.css.
AutoComplete
  
iconPaddingBottom
Type: Number CSS Inheritance: no
Icon bottom padding. The default value is 0.
AutoComplete
  
iconPaddingLeft
Type: Number CSS Inheritance: no
Icon left padding. The default value is 2.
AutoComplete
  
iconPaddingRight
Type: Number CSS Inheritance: no
Icon right padding. The default value is 0.
AutoComplete
  
iconPaddingTop
Type: Number CSS Inheritance: no
Icon top padding. The default value is 1.
AutoComplete
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
emptyLabelPart:spark.components.Label
Required: false Part Type: Static
Displays a message when the filtered set is empty.
AutoComplete
Property Detail
dataProviderproperty
dataProvider:IList  [write-only] [override]


Implementation
    public function set dataProvider(value:IList):void
emptySetMessageproperty 
emptySetMessage:String

When the matched set is empty, this is the message that will be displayed.

The default value is "No Results".


Implementation
    public function get emptySetMessage():String
    public function set emptySetMessage(value:String):void
hideClearButtonFocusOutproperty 
hideClearButtonFocusOut:Boolean

When true, on focusOut, even if text is still displayed in this control, the optional clear button will be hidden.

In other words, the clear button part can be displayed only if this control has focus. Only relevant if the textDisplay skin part is of type TextInput.

The default value is true.


Implementation
    public function get hideClearButtonFocusOut():Boolean
    public function set hideClearButtonFocusOut(value:Boolean):void
Method Detail
applyFilter()method
public function applyFilter():void

Apply a filter to the results based on the string entered by the user.

checkEmptySet()method 
protected function checkEmptySet():void

Sets the visibility of the emptySet label.

eventHandler()method 
protected function eventHandler(event:Event):void

Handles events on the component.

Parameters

event:Event — the Event that triggered the handler

filterFunction()method 
protected function filterFunction(item:Object):Boolean

Filter to use. Simple needle in haystack search.

Parameters

item:Object — the object to test

Returns
Boolean — boolean for inclusion in filter
matchingFunction()method 
protected function matchingFunction(comboBox:ComboBox, inputText:String):Vector.<int>

The matching function. Returns a null set.

Parameters

comboBox:ComboBox — this control
 
inputText:String — the String entered by the user in the control

Returns
Vector.<int> — vector of indices
moveCaretToEnd()method 
public function moveCaretToEnd():void

Moves the caret to the right of the textInput.

textInputHandler()method 
protected function textInputHandler(event:Event):void

Parameters

event:Event

updateEmptyLabelPart()method 
protected function updateEmptyLabelPart():void

Update the empty label skin part.

updateTextInput()method 
protected function updateTextInput():void

Update the text input skin part.

Event Detail
clear Event
Event Object Type: ardisia.components.textInput.events.TextInputEvent
TextInputEvent.type property = ardisia.components.textInput.events.TextInputEvent

Dispatched when the optional clear button part is clicked. Only dispatched if the "textInput" skin part is an Ardisia TextInput component.