Package | com.bit101.components |
Class | public class List |
Inheritance | List ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
alternateColor : uint
Sets / gets the color for alternate rows if alternateRows is set to true.
|
List | ||
alternateRows : Boolean
Sets / gets whether or not every other row will be colored with the alternate color.
|
List | ||
defaultColor : uint
Sets/gets the default background color of list items.
|
List | ||
![]() |
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | |
![]() |
height : Number [override]
Sets/gets the height of the component.
|
Component | |
items : Array
Sets / gets the list of items to be shown.
|
List | ||
listItemClass : Class
Sets / gets the class used to render list items.
|
List | ||
listItemHeight : Number
Sets the height of each list item.
|
List | ||
rolloverColor : uint
Sets/gets the rollover background color of list items.
|
List | ||
selectedColor : uint
Sets/gets the selected background color of list items.
|
List | ||
selectedIndex : int
Sets / gets the index of the selected list item.
|
List | ||
selectedItem : Object
Sets / gets the item in the list, if it exists.
|
List | ||
![]() |
tag : int
Sets/gets in integer that can identify the component.
|
Component | |
![]() |
width : Number [override]
Sets/gets the width of the component.
|
Component | |
![]() |
x : Number [override] [write-only]
Overrides the setter for x to always place the component on a whole pixel.
|
Component | |
![]() |
y : Number [override] [write-only]
Overrides the setter for y to always place the component on a whole pixel.
|
Component |
Property | Defined By | ||
---|---|---|---|
_alternateColor : uint = 0xf3f3f3 | List | ||
_alternateRows : Boolean = false | List | ||
_defaultColor : uint = 0xffffff | List | ||
![]() |
_enabled : Boolean = true | Component | |
![]() |
_height : Number = 0 | Component | |
_itemHolder : Sprite | List | ||
_items : Array | List | ||
_listItemClass : Class | List | ||
_listItemHeight : Number = 20 | List | ||
_panel : Panel | List | ||
_rolloverColor : uint = 0xdddddd | List | ||
![]() |
Ronda : Class | Component | |
_scrollbar : VScrollBar | List | ||
_selectedColor : uint = 0xcccccc | List | ||
_selectedIndex : int = -1 | List | ||
![]() |
_tag : int = -1 | Component | |
![]() |
_width : Number = 0 | Component |
Method | Defined By | ||
---|---|---|---|
List(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, items:Array = null)
Constructor
|
List | ||
addItem(item:Object):void
Adds an item to the list.
|
List | ||
addItemAt(item:Object, index:int):void
Adds an item to the list at the specified index.
|
List | ||
draw():void
[override]
Draws the visual ui of the component.
|
List | ||
![]() |
initStage(stage:Stage):void
[static]
Utility method to set up usual stage align and scaling.
|
Component | |
![]() |
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
|
Component | |
removeAll():void
Removes all items from the list.
|
List | ||
removeItem(item:Object):void
Removes the referenced item from the list.
|
List | ||
removeItemAt(index:int):void
Removes the item from the list at the specified index
|
List | ||
![]() |
setSize(w:Number, h:Number):void
Sets the size of the component.
|
Component |
Method | Defined By | ||
---|---|---|---|
addChildren():void
[override]
Creates and adds the child display objects of this component.
|
List | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
|
Component | |
init():void
[override]
Initilizes the component.
|
List | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | |
makeListItems():void
Creates all the list items based on data.
|
List | ||
![]() |
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component | |
onMouseWheel(event:MouseEvent):void
Called when the mouse wheel is scrolled over the component.
|
List | ||
onScroll(event:Event):void
Called when the user scrolls the scroll bar.
|
List | ||
onSelect(event:Event):void
Called when a user selects an item in the list.
|
List | ||
scrollToSelection():void
If the selected item is not in view, scrolls the list to make the selected item appear in the view.
|
List |
_alternateColor | property |
protected var _alternateColor:uint = 0xf3f3f3
_alternateRows | property |
protected var _alternateRows:Boolean = false
_defaultColor | property |
protected var _defaultColor:uint = 0xffffff
_itemHolder | property |
protected var _itemHolder:Sprite
_items | property |
protected var _items:Array
_listItemClass | property |
protected var _listItemClass:Class
_listItemHeight | property |
protected var _listItemHeight:Number = 20
_panel | property |
protected var _panel:Panel
_rolloverColor | property |
protected var _rolloverColor:uint = 0xdddddd
_scrollbar | property |
protected var _scrollbar:VScrollBar
_selectedColor | property |
protected var _selectedColor:uint = 0xcccccc
_selectedIndex | property |
protected var _selectedIndex:int = -1
alternateColor | property |
alternateColor:uint
Sets / gets the color for alternate rows if alternateRows is set to true.
public function get alternateColor():uint
public function set alternateColor(value:uint):void
alternateRows | property |
alternateRows:Boolean
Sets / gets whether or not every other row will be colored with the alternate color.
public function get alternateRows():Boolean
public function set alternateRows(value:Boolean):void
defaultColor | property |
defaultColor:uint
Sets/gets the default background color of list items.
public function get defaultColor():uint
public function set defaultColor(value:uint):void
items | property |
items:Array
Sets / gets the list of items to be shown.
public function get items():Array
public function set items(value:Array):void
listItemClass | property |
listItemClass:Class
Sets / gets the class used to render list items. Must extend ListItem.
public function get listItemClass():Class
public function set listItemClass(value:Class):void
listItemHeight | property |
listItemHeight:Number
Sets the height of each list item.
public function get listItemHeight():Number
public function set listItemHeight(value:Number):void
rolloverColor | property |
rolloverColor:uint
Sets/gets the rollover background color of list items.
public function get rolloverColor():uint
public function set rolloverColor(value:uint):void
selectedColor | property |
selectedColor:uint
Sets/gets the selected background color of list items.
public function get selectedColor():uint
public function set selectedColor(value:uint):void
selectedIndex | property |
selectedIndex:int
Sets / gets the index of the selected list item.
public function get selectedIndex():int
public function set selectedIndex(value:int):void
selectedItem | property |
selectedItem:Object
Sets / gets the item in the list, if it exists.
public function get selectedItem():Object
public function set selectedItem(value:Object):void
List | () | Constructor |
public function List(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, items:Array = null)
Constructor
Parameters
parent:DisplayObjectContainer (default = null ) — The parent DisplayObjectContainer on which to add this List.
|
|
xpos:Number (default = 0 ) — The x position to place this component.
|
|
ypos:Number (default = 0 ) — The y position to place this component.
|
|
items:Array (default = null ) — An array of items to display in the list. Either strings or objects with label property.
|
addChildren | () | method |
override protected function addChildren():void
Creates and adds the child display objects of this component.
addItem | () | method |
public function addItem(item:Object):void
Adds an item to the list.
Parameters
item:Object — The item to add. Can be a string or an object containing a string property named label.
|
addItemAt | () | method |
public function addItemAt(item:Object, index:int):void
Adds an item to the list at the specified index.
Parameters
item:Object — The item to add. Can be a string or an object containing a string property named label.
|
|
index:int — The index at which to add the item.
|
draw | () | method |
override public function draw():void
Draws the visual ui of the component.
init | () | method |
override protected function init():void
Initilizes the component.
makeListItems | () | method |
protected function makeListItems():void
Creates all the list items based on data.
onMouseWheel | () | method |
protected function onMouseWheel(event:MouseEvent):void
Called when the mouse wheel is scrolled over the component.
Parameters
event:MouseEvent |
onScroll | () | method |
protected function onScroll(event:Event):void
Called when the user scrolls the scroll bar.
Parameters
event:Event |
onSelect | () | method |
protected function onSelect(event:Event):void
Called when a user selects an item in the list.
Parameters
event:Event |
removeAll | () | method |
public function removeAll():void
Removes all items from the list.
removeItem | () | method |
public function removeItem(item:Object):void
Removes the referenced item from the list.
Parameters
item:Object — The item to remove. If a string, must match the item containing that string. If an object, must be a reference to the exact same object.
|
removeItemAt | () | method |
public function removeItemAt(index:int):void
Removes the item from the list at the specified index
Parameters
index:int — The index of the item to remove.
|
scrollToSelection | () | method |
protected function scrollToSelection():void
If the selected item is not in view, scrolls the list to make the selected item appear in the view.