Package com.bit101.components
Class public class ListItem
Inheritance ListItem InheritanceComponent Inheritance flash.display.Sprite



Public Properties
  Property Defined By
    data : Object
Sets/gets the string that appears in this item.
ListItem
    defaultColor : uint
Sets/gets the default background color of list items.
ListItem
  Inherited enabled : Boolean
Sets/gets whether this component is enabled or not.
Component
  Inherited height : Number
[override] Sets/gets the height of the component.
Component
    rolloverColor : uint
Sets/gets the rollover background color of list items.
ListItem
    selected : Boolean
Sets/gets whether or not this item is selected.
ListItem
    selectedColor : uint
Sets/gets the selected background color of list items.
ListItem
  Inherited tag : int
Sets/gets in integer that can identify the component.
Component
  Inherited width : Number
[override] Sets/gets the width of the component.
Component
  Inherited x : Number
[override] [write-only] Overrides the setter for x to always place the component on a whole pixel.
Component
  Inherited y : Number
[override] [write-only] Overrides the setter for y to always place the component on a whole pixel.
Component
Protected Properties
  Property Defined By
    _data : Object
ListItem
    _defaultColor : uint = 0xffffff
ListItem
  Inherited _enabled : Boolean = true
Component
  Inherited _height : Number = 0
Component
    _label : Label
ListItem
    _mouseOver : Boolean = false
ListItem
    _rolloverColor : uint = 0xeeeeee
ListItem
  Inherited Ronda : Class
Component
    _selected : Boolean
ListItem
    _selectedColor : uint = 0xdddddd
ListItem
  Inherited _tag : int = -1
Component
  Inherited _width : Number = 0
Component
Public Methods
  Method Defined By
   
ListItem(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, data:Object = null)
Constructor
ListItem
   
draw():void
[override] Draws the visual ui of the component.
ListItem
  Inherited
initStage(stage:Stage):void
[static] Utility method to set up usual stage align and scaling.
Component
  Inherited
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
Component
  Inherited
setSize(w:Number, h:Number):void
Sets the size of the component.
Component
Protected Methods
  Method Defined By
   
addChildren():void
[override] Creates and adds the child display objects of this component.
ListItem
  Inherited
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
Component
   
init():void
[override] Initilizes the component.
ListItem
  Inherited
invalidate():void
Marks the component to be redrawn on the next frame.
Component
  Inherited
onInvalidate(event:Event):void
Called one frame after invalidate is called.
Component
   
onMouseOut(event:MouseEvent):void
Called when the user rolls the mouse off the item.
ListItem
   
onMouseOver(event:MouseEvent):void
Called when the user rolls the mouse over the item.
ListItem
Public Constants
  Constant Defined By
  Inherited DRAW : String = draw
[static]
Component
Property Detail
_data property
protected var _data:Object

_defaultColor property  
protected var _defaultColor:uint = 0xffffff

_label property  
protected var _label:Label

_mouseOver property  
protected var _mouseOver:Boolean = false

_rolloverColor property  
protected var _rolloverColor:uint = 0xeeeeee

_selected property  
protected var _selected:Boolean

_selectedColor property  
protected var _selectedColor:uint = 0xdddddd

data property  
data:Object

Sets/gets the string that appears in this item.


Implementation
    public function get data():Object
    public function set data(value:Object):void
defaultColor property  
defaultColor:uint

Sets/gets the default background color of list items.


Implementation
    public function get defaultColor():uint
    public function set defaultColor(value:uint):void
rolloverColor property  
rolloverColor:uint

Sets/gets the rollover background color of list items.


Implementation
    public function get rolloverColor():uint
    public function set rolloverColor(value:uint):void
selected property  
selected:Boolean

Sets/gets whether or not this item is selected.


Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void
selectedColor property  
selectedColor:uint

Sets/gets the selected background color of list items.


Implementation
    public function get selectedColor():uint
    public function set selectedColor(value:uint):void
Constructor Detail
ListItem () Constructor
public function ListItem(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, data:Object = null)

Constructor

Parameters
parent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this ListItem.
 
xpos:Number (default = 0) — The x position to place this component.
 
ypos:Number (default = 0) — The y position to place this component.
 
data:Object (default = null) — The text to show in this item.
Method Detail
addChildren () method
override protected function addChildren():void

Creates and adds the child display objects of this component.

draw () method  
override public function draw():void

Draws the visual ui of the component.

init () method  
override protected function init():void

Initilizes the component.

onMouseOut () method  
protected function onMouseOut(event:MouseEvent):void

Called when the user rolls the mouse off the item. Changes the background color.

Parameters

event:MouseEvent
onMouseOver () method  
protected function onMouseOver(event:MouseEvent):void

Called when the user rolls the mouse over the item. Changes the background color.

Parameters

event:MouseEvent