Package | feathers.core |
Class | public class TokenList |
Inheritance | TokenList starling.events.EventDispatcher |
Product Version : | Feathers 1.0.0 |
Property | Defined By | ||
---|---|---|---|
length : int [read-only]
The number of tokens in the list. | TokenList | ||
value : String
The tokens formatted with space delimiters. | TokenList |
Property | Defined By | ||
---|---|---|---|
_joinedNames : String = "null" | TokenList |
Method | Defined 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 |
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 |
_joinedNames | property |
protected var _joinedNames:String = "null"
length | property |
length:int
[read-only] The number of tokens in the list.
public function get length():int
value | property |
value:String
The tokens formatted with space delimiters.
The default value is ""
.
public function get value():String
public function set value(value:String):void
TokenList | () | Constructor |
public function TokenList()
Constructor.
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 |
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 |
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 |
change | Event |
starling.events.Event
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:
Property | Value |
---|---|
bubbles | false |
currentTarget | The 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 . |
data | null |
target | The 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. |