Packagefeathers.core
Classpublic class TokenList
InheritanceTokenList Inheritance starling.events.EventDispatcher

Product Version : Feathers 1.0.0

A list of space-delimited tokens. Obviously, since they are delimited by spaces, tokens cannot contain spaces.



Public Properties
 PropertyDefined By
  length : int
[read-only] The number of tokens in the list.
TokenList
  value : String
The tokens formatted with space delimiters.
TokenList
Protected Properties
 PropertyDefined By
  _joinedNames : String = "null"
TokenList
Public Methods
 MethodDefined By
  
Constructor.
TokenList
  
add(name:String):void
Adds a token to the list.
TokenList
  
contains(name:String):Boolean
Determines if the specified token is in the list.
TokenList
  
item(index:int):String
Returns the token at the specified index, or null, if there is no token at that index.
TokenList
  
remove(name:String):void
Removes a token from the list, if the token is in the list.
TokenList
  
toggle(name:String):void
The token is added to the list if it doesn't appear in the list, or it is removed from the list if it is already in the list.
TokenList
Events
 Event Summary Defined By
  Dispatched when a token is added, removed, or toggled or if all tokens have been replaced by setting the value property.TokenList
Property Detail
_joinedNamesproperty
protected var _joinedNames:String = "null"

lengthproperty 
length:int  [read-only]

The number of tokens in the list.


Implementation
    public function get length():int
valueproperty 
value:String

The tokens formatted with space delimiters.

The default value is "".


Implementation
    public function get value():String
    public function set value(value:String):void
Constructor Detail
TokenList()Constructor
public function TokenList()

Constructor.

Method Detail
add()method
public function add(name:String):void

Adds a token to the list. If the token already appears in the list, it will not be added again.

Parameters

name:String

contains()method 
public function contains(name:String):Boolean

Determines if the specified token is in the list.

Parameters

name:String

Returns
Boolean
item()method 
public function item(index:int):String

Returns the token at the specified index, or null, if there is no token at that index.

Parameters

index:int

Returns
String
remove()method 
public function remove(name:String):void

Removes a token from the list, if the token is in the list. If the token doesn't appear in the list, this call does nothing.

Parameters

name:String

toggle()method 
public function toggle(name:String):void

The token is added to the list if it doesn't appear in the list, or it is removed from the list if it is already in the list.

Parameters

name:String

Event Detail
change Event
Event Object Type: starling.events.Event
Event.type property = starling.events.Event.CHANGE

Dispatched when a token is added, removed, or toggled or if all tokens have been replaced by setting the value property.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
datanull
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.