Package | feathers.core |
Class | public class TokenList |
Inheritance | TokenList ![]() ![]() |
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 | ||
![]() | addEventListener(type:String, listener:Function):void Registers an event listener at a certain object. | EventDispatcher | |
contains(name:String):Boolean
Determines if the specified token is in the list. | TokenList | ||
![]() | dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher | |
![]() | dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void Dispatches an event with the given parameters to all objects that have registered
listeners for the given type. | EventDispatcher | |
![]() | hasEventListener(type:String, listener:Function = null):Boolean If called with one argument, figures out if there are any listeners registered for
the given event type. | EventDispatcher | |
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 | ||
![]() | removeEventListener(type:String, listener:Function):void Removes an event listener from the object. | EventDispatcher | |
![]() | removeEventListeners(type:String = null):void Removes all event listeners with a certain type, or all of them if type is null. | EventDispatcher | |
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. |