Packageorg.apache.flex.core
Classpublic class UIButtonBase
InheritanceUIButtonBase Inheritance flash.display.SimpleButton
Implements IStrandWithModel, IEventDispatcher, IUIBase, IStyleableObject, ILayoutChild, org.apache.flex.core.IFlexJSElement
Subclasses Button, CheckBox, RadioButton

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The UIButtonBase class is the base class for most Buttons in a FlexJS application. In Flash, these buttons extend SimpleButton and therefore do not support all of the Sprite APIs.



Public Properties
 PropertyDefined By
  $height : Number
[read-only] Retrieve the low-level bounding box height.
UIButtonBase
  $width : Number
[read-only] Retrieve the low-level bounding box width.
UIButtonBase
  beads : Array
The array property that is used to add additional beads to an MXML tag.
UIButtonBase
  className : String
The classname.
UIButtonBase
  element : IFlexJSElement
[read-only] Each IUIBase has an element that is actually added to the platform's display list DOM.
UIButtonBase
  explicitHeight : Number
The explicitly set width (as opposed to measured width or percentage width).
UIButtonBase
  explicitWidth : Number
The explicitly set width (as opposed to measured width or percentage width).
UIButtonBase
  height : Number
[override] The width of the component.
UIButtonBase
  id : String
An id property for MXML documents.
UIButtonBase
  measurementBead : IMeasurementBead
[read-only] A measurement bead, if one exists.
UIButtonBase
  model : Object
An IBeadModel that serves as the data model for the component.
UIButtonBase
  percentHeight : Number
The requested percentage height this component should have in the parent container.
UIButtonBase
  percentWidth : Number
The requested percentage width this component should have in the parent container.
UIButtonBase
  style : Object
The object that contains "styles" and other associated name-value pairs.
UIButtonBase
  styleString : String
[write-only] The styles for this object formatted as an HTML style attribute.
UIButtonBase
  topMostEventDispatcher : IEventDispatcher
[read-only] The top most event dispatcher.
UIButtonBase
  typeNames : String
A list of type names.
UIButtonBase
  view : IBeadView
An IBeadView that serves as the view for the component.
UIButtonBase
  width : Number
[override] The width of the component.
UIButtonBase
Protected Properties
 PropertyDefined By
  $y : Number
[read-only] Retrieve the low-level bounding box y.
UIButtonBase
Public Methods
 MethodDefined By
  
UIButtonBase(upState:DisplayObject = null, overState:DisplayObject = null, downState:DisplayObject = null, hitTestState:DisplayObject = null)
Constructor.
UIButtonBase
  
addBead(bead:IBead):void
Add a bead to the strand.
UIButtonBase
  
UIButtonBase
  
getBeadByType(classOrInterface:Class):IBead
Find a bead on the strand.
UIButtonBase
  
UIButtonBase
  
UIButtonBase
  
Remove a bead from the strand.
UIButtonBase
  
setHeight(value:Number, noEvent:Boolean = false):void
UIButtonBase
  
setWidth(value:Number, noEvent:Boolean = false):void
UIButtonBase
  
setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
UIButtonBase
  
setX(value:Number):void
UIButtonBase
  
setY(value:Number):void
UIButtonBase
Events
 Event Summary Defined By
  Set a different class for click events so that there aren't dependencies on the flash classes on the JS side.UIButtonBase
Property Detail
$heightproperty
$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
$widthproperty 
$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
$yproperty 
$y: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 y.


Implementation
    protected function get $y():Number
beadsproperty 
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.

classNameproperty 
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
elementproperty 
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
explicitHeightproperty 
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
explicitWidthproperty 
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
heightproperty 
height: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 height():Number
    public function set height(value:Number):void
idproperty 
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
measurementBeadproperty 
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
modelproperty 
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
percentHeightproperty 
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
percentWidthproperty 
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
styleproperty 
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
styleStringproperty 
styleString:String  [write-only]

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The styles for this object formatted as an HTML style attribute. While this may be a convenient and less verbose way of specifying styles than using the style object, you run the risk of having a typo.


Implementation
    public function set styleString(value:String):void
topMostEventDispatcherproperty 
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
typeNamesproperty 
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.

viewproperty 
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
widthproperty 
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
UIButtonBase()Constructor
public function UIButtonBase(upState:DisplayObject = null, overState:DisplayObject = null, downState:DisplayObject = null, hitTestState:DisplayObject = null)

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Constructor.

Parameters
upState:DisplayObject (default = null)
 
overState:DisplayObject (default = null)
 
downState:DisplayObject (default = null)
 
hitTestState:DisplayObject (default = null)
Method Detail
addBead()method
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

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.
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
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.