Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
UIBase

Package | org.apache.flex.core
Class | public class UIBase
Inheritance | UIBase HTMLElementWrapper flash.display.Sprite
Implements | IStrandWithModel, IEventDispatcher, IParentIUIBase, IStyleableObject, ILayoutChild, org.apache.flex.core.IFlexJSElement
Subclasses | Alert, Border, ChartAxisGroup, ComboBox, ContainerBase, ContainerContentArea, CreateJSBase, DataGrid, DateChooser, DateField, DatePicker, FilledRectangle, GoogleMap, GraphicShape, HRule, Image, Label, ListBase, ManagerBase, NumericStepper, RangeStepper, ScrollBar, SimpleAlert, Slider, Spacer, Spinner, TextArea, TextInput, ToggleSwitch, UIBase, UIItemRendererBase, ViewManagerBase, VRule, WebBrowser

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The UIBase class is the base class for most composite user interface components. For the Flash Player, Buttons and Text controls may have a different base class and therefore may not extend UIBase. However all user interface components should implement IUIBase.

Public Properties

| Property | Defined By
--- | --- | ---
|  | $height : Number [read-only] Retrieve the low-level bounding box height. | UIBase
|  | $width : Number [read-only] Retrieve the low-level bounding box width. | UIBase
|  | beads : Array The array property that is used to add additional beads to an MXML tag. | UIBase
|  | className : String The classname. | UIBase
|  | element : IFlexJSElement [read-only] Each IUIBase has an element that is actually added to the platform's display list DOM. | UIBase
|  | explicitHeight : Number The explicitly set width (as opposed to measured width or percentage width). | UIBase
|  | explicitWidth : Number The explicitly set width (as opposed to measured width or percentage width). | UIBase
|  | height : Number [override] The height of the component. | UIBase
|  | id : String An id property for MXML documents. | UIBase
|  | measurementBead : IMeasurementBead [read-only] A measurement bead, if one exists. | UIBase
|  | model : Object An IBeadModel that serves as the data model for the component. | UIBase
|  | numElements : int [read-only] The number of elements in the parent. | UIBase
|  | percentHeight : Number The requested percentage height this component should have in the parent container. | UIBase
|  | percentWidth : Number The requested percentage width this component should have in the parent container. | UIBase
|  | style : Object The object that contains "styles" and other associated name-value pairs. | UIBase
|  | topMostEventDispatcher : IEventDispatcher [read-only] The top most event dispatcher. | UIBase
|  | typeNames : String A list of type names. | UIBase
|  | view : IBeadView An IBeadView that serves as the view for the component. | UIBase
|  | width : Number [override] The width of the component. | UIBase

Public Methods

| Method | Defined By
--- | --- | ---
|  | UIBase() Constructor. | UIBase
|  | addBead(bead:IBead):void [override] Add a bead to the strand. | UIBase
|  | addedToParent():void The method called when added to a parent. | UIBase
|  | addElement(c:Object, dispatchEvent:Boolean = true):void Add a component to the parent. | UIBase
|  | addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void Add a component to the parent. | UIBase
|  | getBeadByType(classOrInterface:Class):IBead Find a bead on the strand. | UIBase
|  | getElementAt(index:int):Object Get a component from the parent. | UIBase
|  | getElementIndex(c:Object):int Gets the index of this subcomponent. | UIBase
|  | isHeightSizedToContent():Boolean | UIBase
|  | isWidthSizedToContent():Boolean | UIBase
|  | removeBead(value:IBead):IBead Remove a bead from the strand. | UIBase
|  | removeElement(c:Object, dispatchEvent:Boolean = true):void Remove a component from the parent. | UIBase
|  | setHeight(value:Number, noEvent:Boolean = false):void | UIBase
|  | setWidth(value:Number, noEvent:Boolean = false):void | UIBase
|  | setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void | UIBase
|  | setX(value:Number):void | UIBase
|  | setY(value:Number):void | UIBase

Protected Methods

| Method | Defined By
--- | --- | ---
|  | repeaterListener(event:Event):void Rebroadcast an event from a sub component from the component. | UIBase

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | click | Set a different class for click events so that there aren't dependencies on the flash classes on the JS side. | UIBase
|  | mouseDown | Set a different class for mouseDown events so that there aren't dependencies on the flash classes on the JS side. | UIBase
|  | mouseMove | Set a different class for mouseMove events so that there aren't dependencies on the flash classes on the JS side. | UIBase
|  | mouseOut | Set a different class for mouseOut events so that there aren't dependencies on the flash classes on the JS side. | UIBase
|  | mouseOver | Set a different class for mouseOver events so that there aren't dependencies on the flash classes on the JS side. | UIBase
|  | mouseUp | Set a different class for mouseUp events so that there aren't dependencies on the flash classes on the JS side. | UIBase
|  | rollOut | Set a different class for rollOut events so that there aren't dependencies on the flash classes on the JS side. | UIBase
|  | rollOver | Set a different class for rollOver events so that there aren't dependencies on the flash classes on the JS side. | UIBase

Property Detail

$height | property

`$height:Number` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Retrieve the low-level bounding box height. Not implemented in JS.

Implementation
`public function get $height():Number`

$width | property |

`$width:Number` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Retrieve the low-level bounding box width. Not implemented in JS.

Implementation
`public function get $width():Number`

beads | property |

`public var beads:Array`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The array property that is used to add additional beads to an MXML tag. From ActionScript, just call addBead directly.

className | property |

`className:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The classname. Often used for CSS class selector lookups.

Implementation
`public function get className():String`
`public function set className(value:String):void`

element | property |

`element:IFlexJSElement` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Each IUIBase has an element that is actually added to the platform's display list DOM. It may not be the actual component itself.

Implementation
`public function get element():IFlexJSElement`

explicitHeight | property |

`explicitHeight:Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The explicitly set width (as opposed to measured width or percentage width).

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

explicitWidth | property |

`explicitWidth:Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The explicitly set width (as opposed to measured width or percentage width).

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

height | property |

`height:Number`[override]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The height of the component. If no height has been previously set the default height may be specified in the IValuesImpl or determined as the bounding box around all child components and graphics.

This property can be used as the source for data binding.

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

id | property |

`id:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

An id property for MXML documents.

Implementation
`public function get id():String`
`public function set id(value:String):void`

measurementBead | property |

`measurementBead:IMeasurementBead` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

A measurement bead, if one exists.

Implementation
`public function get measurementBead():IMeasurementBead`

model | property |

`model:Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

An IBeadModel that serves as the data model for the component.

Implementation
`public function get model():Object`
`public function set model(value:Object):void`

numElements | property |

`numElements:int` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The number of elements in the parent.

Implementation
`public function get numElements():int`

percentHeight | property |

`percentHeight:Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The requested percentage height this component should have in the parent container. Note that the actual percentage may be different if the total is more than 100% or if there are other components with explicitly set heights.

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

percentWidth | property |

`percentWidth:Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The requested percentage width this component should have in the parent container. Note that the actual percentage may be different if the total is more than 100% or if there are other components with explicitly set widths.

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

style | property |

`style:Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The object that contains "styles" and other associated name-value pairs. You can also specify a string in HTML style attribute format.

Implementation
`public function get style():Object`
`public function set style(value:Object):void`

topMostEventDispatcher | property |

`topMostEventDispatcher:IEventDispatcher` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The top most event dispatcher. Good for trying to capture all input events.

Implementation
`public function get topMostEventDispatcher():IEventDispatcher`

typeNames | property |

`public var typeNames:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

A list of type names. Often used for CSS type selector lookups.

view | property |

`view:IBeadView`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

An IBeadView that serves as the view for the component.

Implementation
`public function get view():IBeadView`
`public function set view(value:IBeadView):void`

width | property |

`width:Number`[override]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The width of the component. If no width has been previously set the default width may be specified in the IValuesImpl or determined as the bounding box around all child components and graphics.

This property can be used as the source for data binding.

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

UIBase | () | Constructor

`public function UIBase()`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Constructor.

Method Detail

addBead | () | method

`override public function addBead(bead:IBead):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Add a bead to the strand.

Parameters

| `bead:IBead` — The bead to be added.

addedToParent | () | method |

`public function addedToParent():void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The method called when added to a parent. This is a good time to set up beads.

addElement | () | method |

`public function addElement(c:Object, dispatchEvent:Boolean = true):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Add a component to the parent.

Parameters

| `c:Object` — The subcomponent to add.
| `dispatchEvent:Boolean` (default = `true`)`` — Whether to dispatch an event after adding the child.

addElementAt | () | method |

`public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Add a component to the parent.

Parameters

| `c:Object` — The subcomponent to add.
| `index:int` — The index where the subcomponent should be added.
| `dispatchEvent:Boolean` (default = `true`)`` — Whether to dispatch an event after adding the child.

getBeadByType | () | method |

`public function getBeadByType(classOrInterface:Class):IBead`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Find a bead on the strand.

Parameters

| `classOrInterface:Class` — The class or interface to use to search for the bead

Returns

| `IBead` — The bead.

getElementAt | () | method |

`public function getElementAt(index:int):Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Get a component from the parent.

Parameters

| `index:int` — The index of the subcomponent.

Returns

| `Object`

getElementIndex | () | method |

`public function getElementIndex(c:Object):int`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Gets the index of this subcomponent.

Parameters

| `c:Object` — The subcomponent to add.

Returns

| `int` — The index (zero-based).

isHeightSizedToContent | () | method |

`public function isHeightSizedToContent():Boolean`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Returns

| `Boolean`

isWidthSizedToContent | () | method |

`public function isWidthSizedToContent():Boolean`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Returns

| `Boolean`

removeBead | () | method |

`public function removeBead(value:IBead):IBead`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Remove a bead from the strand.

Parameters

| `value:IBead` — bead The bead to be removed.

Returns

| `IBead`

removeElement | () | method |

`public function removeElement(c:Object, dispatchEvent:Boolean = true):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Remove a component from the parent.

Parameters

| `c:Object` — The subcomponent to remove.
| `dispatchEvent:Boolean` (default = `true`)`` — Whether to dispatch an event after removing the child.

repeaterListener | () | method |

`protected function repeaterListener(event:Event):void`

Rebroadcast an event from a sub component from the component.

Parameters

| `event:Event`

setHeight | () | method |

`public function setHeight(value:Number, noEvent:Boolean = false):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Parameters

| `value:Number`
| `noEvent:Boolean` (default = `false`)``

setWidth | () | method |

`public function setWidth(value:Number, noEvent:Boolean = false):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Parameters

| `value:Number`
| `noEvent:Boolean` (default = `false`)``

setWidthAndHeight | () | method |

`public function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Parameters

| `newWidth:Number`
| `newHeight:Number`
| `noEvent:Boolean` (default = `false`)``

setX | () | method |

`public function setX(value:Number):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Parameters

| `value:Number`

setY | () | method |

`public function setY(value:Number):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Parameters

| `value:Number`

Event Detail

click | Event

Event Object Type: `org.apache.flex.events.MouseEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Set a different class for click events so that there aren't dependencies on the flash classes on the JS side.

mouseDown | Event |

Event Object Type: `org.apache.flex.events.MouseEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Set a different class for mouseDown events so that there aren't dependencies on the flash classes on the JS side.

mouseMove | Event |

Event Object Type: `org.apache.flex.events.MouseEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Set a different class for mouseMove events so that there aren't dependencies on the flash classes on the JS side.

mouseOut | Event |

Event Object Type: `org.apache.flex.events.MouseEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Set a different class for mouseOut events so that there aren't dependencies on the flash classes on the JS side.

mouseOver | Event |

Event Object Type: `org.apache.flex.events.MouseEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Set a different class for mouseOver events so that there aren't dependencies on the flash classes on the JS side.

mouseUp | Event |

Event Object Type: `org.apache.flex.events.MouseEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Set a different class for mouseUp events so that there aren't dependencies on the flash classes on the JS side.

rollOut | Event |

Event Object Type: `org.apache.flex.events.MouseEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Set a different class for rollOut events so that there aren't dependencies on the flash classes on the JS side.

rollOver | Event |

Event Object Type: `org.apache.flex.events.MouseEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Set a different class for rollOver events so that there aren't dependencies on the flash classes on the JS side.

Mon Sep 5 2016, 07:19 AM -07:00