| Package | com.bit101.components |
| Class | public class ColorChooser |
| Inheritance | ColorChooser Component flash.display.Sprite |
| Property | Defined By | ||
|---|---|---|---|
![]() |
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | |
![]() |
height : Number [override]
Sets/gets the height of the component.
|
Component | |
| model : DisplayObject | ColorChooser | ||
| popupAlign : String | ColorChooser | ||
![]() |
tag : int
Sets/gets in integer that can identify the component.
|
Component | |
| usePopup : Boolean | ColorChooser | ||
|
value : uint
Gets / sets the color value of this ColorChooser.
|
ColorChooser | ||
![]() |
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 | ||
|---|---|---|---|
| _colors : BitmapData | ColorChooser | ||
| _colorsContainer : Sprite | ColorChooser | ||
| _defaultModelColors : Array | ColorChooser | ||
![]() |
_enabled : Boolean = true | Component | |
![]() |
_height : Number = 0 | Component | |
| _input : InputText | ColorChooser | ||
| _model : DisplayObject | ColorChooser | ||
| _oldColorChoice : uint | ColorChooser | ||
| _popupAlign : String = bottom | ColorChooser | ||
![]() |
Ronda : Class | Component | |
| _stage : Stage | ColorChooser | ||
| _swatch : Sprite | ColorChooser | ||
![]() |
_tag : int = -1 | Component | |
| _tmpColorChoice : uint | ColorChooser | ||
| _usePopup : Boolean = false | ColorChooser | ||
| _value : uint = 0xff0000 | ColorChooser | ||
![]() |
_width : Number = 0 | Component | |
| Method | Defined By | ||
|---|---|---|---|
|
ColorChooser(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, value:uint = 0xff0000, defaultHandler:Function = null)
Constructor
|
ColorChooser | ||
|
draw():void
[override]
Draws the visual ui of the component.
|
ColorChooser | ||
![]() |
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 | |
![]() |
setSize(w:Number, h:Number):void
Sets the size of the component.
|
Component | |
| Method | Defined By | ||
|---|---|---|---|
|
addChildren():void
[override]
|
ColorChooser | ||
|
backToColorChoice(e:MouseEvent):void
|
ColorChooser | ||
|
browseColorChoice(e:MouseEvent):void
|
ColorChooser | ||
|
displayColors():void
The color picker mode Display functions
|
ColorChooser | ||
|
drawColors(d:DisplayObject):void
|
ColorChooser | ||
|
getDefaultModel():Sprite
Create the default gradient Model
|
ColorChooser | ||
|
getGradientSprite(w:Number, h:Number, ca:Array):Sprite
|
ColorChooser | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
|
Component | |
|
init():void
[override]
Initializes the component.
|
ColorChooser | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | |
|
onChange(event:Event):void
Internal change handler.
|
ColorChooser | ||
|
onColorsAddedToStage(e:Event):void
|
ColorChooser | ||
|
onColorsRemovedFromStage(e:Event):void
The color picker mode Handlers
|
ColorChooser | ||
![]() |
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component | |
|
onStageClick(e:MouseEvent):void
|
ColorChooser | ||
|
onSwatchClick(event:MouseEvent):void
|
ColorChooser | ||
|
placeColors():void
|
ColorChooser | ||
|
setColorChoice(e:MouseEvent):void
|
ColorChooser | ||
| Constant | Defined By | ||
|---|---|---|---|
|
BOTTOM : String = bottom [static]
|
ColorChooser | ||
![]() |
DRAW : String = draw [static]
|
Component | |
|
TOP : String = top [static]
|
ColorChooser | ||
| _colors | property |
protected var _colors:BitmapData
| _colorsContainer | property |
protected var _colorsContainer:Sprite
| _defaultModelColors | property |
protected var _defaultModelColors:Array
| _input | property |
protected var _input:InputText
| _model | property |
protected var _model:DisplayObject
| _oldColorChoice | property |
protected var _oldColorChoice:uint
| _popupAlign | property |
protected var _popupAlign:String = bottom
| _stage | property |
protected var _stage:Stage
| _swatch | property |
protected var _swatch:Sprite
| _tmpColorChoice | property |
protected var _tmpColorChoice:uint
| _usePopup | property |
protected var _usePopup:Boolean = false
| _value | property |
protected var _value:uint = 0xff0000
| model | property |
model:DisplayObject
public function get model():DisplayObject public function set model(value:DisplayObject):void| popupAlign | property |
popupAlign:String
public function get popupAlign():String public function set popupAlign(value:String):void| usePopup | property |
usePopup:Boolean
public function get usePopup():Boolean public function set usePopup(value:Boolean):void| value | property |
value:uint
Gets / sets the color value of this ColorChooser.
public function get value():uint public function set value(value:uint):void| ColorChooser | () | Constructor |
public function ColorChooser(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, value:uint = 0xff0000, defaultHandler:Function = null)
Constructor
Parameters
parent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this ColorChooser.
|
|
xpos:Number (default = 0) — The x position to place this component.
|
|
ypos:Number (default = 0) — The y position to place this component.
|
|
value:uint (default = 0xff0000) — The initial color value of this component.
|
|
defaultHandler:Function (default = null) — The event handling function to handle the default event for this component (change in this case).
|
| addChildren | () | method |
override protected function addChildren():void
| backToColorChoice | () | method |
protected function backToColorChoice(e:MouseEvent):void
Parameters
e:MouseEvent |
| browseColorChoice | () | method |
protected function browseColorChoice(e:MouseEvent):void
Parameters
e:MouseEvent |
| displayColors | () | method |
protected function displayColors():void
The color picker mode Display functions
| draw | () | method |
override public function draw():void
Draws the visual ui of the component.
| drawColors | () | method |
protected function drawColors(d:DisplayObject):void
Parameters
d:DisplayObject |
| getDefaultModel | () | method |
protected function getDefaultModel():Sprite
Create the default gradient Model
ReturnsSprite |
| getGradientSprite | () | method |
protected function getGradientSprite(w:Number, h:Number, ca:Array):Sprite
Parameters
w:Number |
|
h:Number |
|
ca:Array |
Sprite |
| init | () | method |
override protected function init():void
Initializes the component.
| onChange | () | method |
protected function onChange(event:Event):void
Internal change handler.
Parameters
event:Event — The Event passed by the system.
|
| onColorsAddedToStage | () | method |
protected function onColorsAddedToStage(e:Event):void
Parameters
e:Event |
| onColorsRemovedFromStage | () | method |
protected function onColorsRemovedFromStage(e:Event):void
The color picker mode Handlers
Parameters
e:Event |
| onStageClick | () | method |
protected function onStageClick(e:MouseEvent):void
Parameters
e:MouseEvent |
| onSwatchClick | () | method |
protected function onSwatchClick(event:MouseEvent):void
Parameters
event:MouseEvent |
| placeColors | () | method |
protected function placeColors():void
| setColorChoice | () | method |
protected function setColorChoice(e:MouseEvent):void
Parameters
e:MouseEvent |
| BOTTOM | Constant |
public static const BOTTOM:String = bottom
| TOP | Constant |
public static const TOP:String = top