KoolMoves AS3 API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class UIComponent

Package | km.core
Class | public class UIComponent
Inheritance | UIComponent flash.display.Sprite
Subclasses | Accordion, BaseButton, BitmapLabel, ColorPicker, ComboBox, DateChooser, DragContainer, Image, Knob, Label, MediaPlayer, MediaPlayerSlider, NumericStepper, RadioGroup, RichTextEditor, ScrollBar, ScrollPane, SpectrumAnalyzer, ToolTip, Tree

The UIComponent class is the base class of all components.

Public Properties

| Property | Defined by
--- | --- | ---
|  | duotone : Array The duotone property can be used to convert the colors of the component into duotone. | UIComponent
|  | enabled : Boolean Specifies if the component is enabled. If a component is disabled, it will be turned into grayscale and become partly transparent. | UIComponent
|  | height : Number | UIComponent
|  | toolTip : String Text to use as toolTip when ToolTip is enabled. | UIComponent
|  | width : Number | UIComponent
|  | x : Number | UIComponent
|  | y : Number | UIComponent

Public Methods

| Method | Defined by
--- | --- | ---
|  | UIComponent() | UIComponent
|  | clone():* Returns a clone of the component. The skin of the component is cloned but other things like the text of a label or the items of a list aren't. | UIComponent
|  | move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void Moves the component to the specified coordinates. | UIComponent
|  | setProperties(o:Object):void Sets a number of properties at once. | UIComponent
|  | setSize(w:int, h:int):void Sets the size width and height. | UIComponent

Events

| Event | Summary | Defined by
--- | --- | --- | ---
|  | animationComplete | The animationComplete event is broadcasted when an animated move is completed. | UIComponent

Property detail

duotone | property

`duotone:Array` [read-write]

The duotone property can be used to convert the colors of the component into duotone. The array has to contain two color values. The first one representing black, the second one representing white.

Implementation
`public function get duotone():Array`
`public function set duotone(value:Array):void`
Example

     myComponent.duotone = [0x604000, 0xfff0c0];

enabled | property |

`enabled:Boolean` [read-write]

Specifies if the component is enabled.
If a component is disabled, it will be turned into grayscale and become partly transparent.

Implementation
`public function get enabled():Boolean`
`public function set enabled(value:Boolean):void`

height | property |

`height:Number` [read-write]

Implementation
`public function get height():Number`
`public function set height(value:Number):void`

toolTip | property |

`public var toolTip:String`

Text to use as toolTip when ToolTip is enabled.

width | property |

`width:Number` [read-write]

Implementation
`public function get width():Number`
`public function set width(value:Number):void`

x | property |

`x:Number` [read-write]

Implementation
`public function get x():Number`
`public function set x(value:Number):void`

y | property |

`y:Number` [read-write]

Implementation
`public function get y():Number`
`public function set y(value:Number):void`
Constructor detail

UIComponent | () | constructor

`public function UIComponent()`
Method detail

clone | () | method

`public function clone():*`

Returns a clone of the component.
The skin of the component is cloned but other things like the text of a label or the items of a list aren't.

Returns

| `*` — A clone of the component.

move | () | method |

`public function move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void`

Moves the component to the specified coordinates.

Parameters

| `x:int`
| `y:int`
| `animationMode:int` (default = `0`)`` — 0 = instant move, 1 = animated, 2 = animatedXY, 3 = animatedYX .
| `animationFrames:int` (default = `12`)`` — the amount of frames the animation takes.
| `easeInOut:Boolean` (default = `false`)``

setProperties | () | method |

`public function setProperties(o:Object):void`

Sets a number of properties at once.

Parameters

| `o:Object` — Style object.

Example

     import km.components.*

     var lb:LabelButton = new LabelButton();
     lb.setProperties({x:50, y:50, effectSpeed:200});

setSize | () | method |

`public function setSize(w:int, h:int):void`

Sets the size width and height.

Parameters

| `w:int` — Width, in pixels.
| `h:int` — Height, in pixels.

Event detail

animationComplete | event

Event object type: `flash.events.Event`

The animationComplete event is broadcasted when an animated move is completed.

Last update : 04/05/2008