Main Page | Packages | Class Tree | Index | Help

xp.system

class UIControl

MovieClip
  |
  +--xp.system.UIControl

Implemented Interfaces: IFocusable, IUIComponent
All Known Subclasses: AxisChart, ButtonList, Container, DateSelector, Frame, Frameset, Legend, Menu, PanelBevelled, PanelGrid, PieChart, ProgressBar, Rule, ScrollBar, ScrollSelectView, ScrollView, Spacer, TabBase, TextBase, Timer, TrendLineTool

class UIControl
extends MovieClip

Base class for all controls in the xpcomponent framework


Event summary for the UIControl class
The following table lists events of the UIControl class.




EventTypeDescription
xp.events.LoadEventloadBroadcast when subobjects are being created.
xp.events.UnloadEventunloadBroadcast when the subobjects are being unloaded.
xp.events.PropertyChangedEventpropertyChangedBroadcast when an a state property changes.

Events if enableMouseEvents:








EventTypeDescription
xp.events.RolloverEventrolloverBroadcast when the mouse rolls over the control.
xp.events.RolloutEventrolloutBroadcast when the mouse rolls over and out of a control.
xp.events.ClickEventclickBroadcast when a control is clicked.
xp.events.DblClickEventdblclickBroadcast when a control is double clicked.
xp.events.PressEventpressBroadcast when the mouse button is down over the control.
xp.events.ReleaseEventreleaseBroadcast the mouse button is pressed and then released.
xp.events.DragoutEventdragoutBroadcast the mouse rolls over a control with the buttton down.
xp.events.DragoverEventdragoverBroadcast when the mouse rolls over and then out of a control with the buttton down

Events if enableKeyEvents:


EventTypeDescription
xp.events.KeyUpEventkeyUpBroadcast when a key is released.
xp.events.KeyDownEventkeyDownBroadcast when a key is pressed.

Events if focusEnabled:


EventTypeDescription
xp.events.EventfocusInBroadcast when an object loses focus.
xp.events.EventfocusOutBroadcast when an object receives focus.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
__layout: Object


public
allowDrop: Boolean
Gets or sets a value indicating whether this element can be used as the target of a drag-and-drop operation

public
autoLayout: Boolean
Controls whether the control is layed out by the layout system *

public
bindingDefaultValue
The default value if the data value is null

public
bindingFormatter: Object


public
bindingPath: String
The path in the dataSource this control will bind to

public
bindingSource: String
A string refence to a datasource this contol should bind to

public
bindingType: String
The type of data binding required

public
bindingValidator: Object


public
border: IBorder
the border delegate

public
causesValidation: Boolean
Does this control cause a validation

public static
classInfo: Object
A static class information object

public
clickOnENTER: Boolean
Fire click event when return is pressed

public
clickOnSPACE: Boolean
Fire click event when spacebar is pressed

public
container: Object
The container element for this instance

public
context: Object
The controls context object.

public
data: Object
A user defined data object associated with this control

public
disableAcceptButton: Boolean
Disables the default accept button action

public
disableCancelButton: Boolean
Disables the default cancel button action

public
enableBGMouseEvents: Boolean
Controls whether mouse events are set on the background or foreground.

public
enableDblClickEvent: Boolean
Enable or disable click events

public
enableKeyDownEvents: Boolean
Enable or disable keyDown events dispatching - enableKeyEvents must be true as well

public
enableKeyEvents: Boolean
Enable or disable keyprocessing

public
enableKeyUpEvents: Boolean
Enable or disable keyUp events dispatching - enableKeyEvents must be true as well

public
enableMouseWheelEvents: Boolean
Enable or disable mouse wheel handling


formatterOptions: String


public
horizontalAlignment: String
Describes the means by which a child element is vertically positioned or stretched within a parent's layout slot.

public
index: Number
An item index for this instance

public
isBinding: Number
Are we currently executing a binding*

public
itemId: Object
An item identifier

public
logEnabled: Boolean
Are we in debug logging mode-for internal use only

public
parent: Object
The parent element for this instance

public
parentContainer: Object
The parent container element for this instance

public
parentForm: Object
The parent form element for this instance

public
percentageHeight: Number
the percentage height *

public
percentageWidth: Number
the percentage width *

public
styleClass: String
The name of the style class this instance will use.

public
tabIndex: Number
Sets the tabIndex of this control.

public
tabStop: Boolean
Gets or sets whether a control should be included in tab navigation.

public
tooltip: String
The tooltip text.

public
tree: Object
Our stylesheet object for child controls

public
verticalAlignment: String
Declares the vertical alignment characteristics applied this element when it is composed within a parent element such as a panel or items control.

Property Summary

public
alpha: Number (read, write)
Gets or sets the alpha value of the control *

public
autosize (read, write)
Controls how this component will resize itslef when its content changes

public
background: Object (read, write)
A Brush object used to paint the controls background.

public
backgroundVisible: Boolean (read, write)
Indicates whether the background is visible or not

public
bindings (read)
An array of bindings for this control

public
bindings: Object (write)


public
borderBrush: Object (read, write)
A Brush object used to paint the controls border.

public
borderRadius (read, write)
Sets or get the radius of the border

public
borderShadow: Boolean (read, write)
Controls whether there is a shadow drawn round the border

public
borderStyle (read, write)
The type of border that should be drawn

public
borderThickness: Thickness (read, write)
A Thickness object used set the dimensions of the border.

public
bottom (read)
Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

public
bottom: Number (write)


public
dataSource: Object (read, write)
The dataSource this control is bound to.

public
enableMouseEvents: Boolean (read, write)
Enable or disable mouse events

public
focusManager: Object (read-only)
for compatibility with MM Framework actually an instance of SystemManager

public
height: Number (read, write)
Gets or sets the height of the control.

public
id: String (read, write)


public
isEnabled: Boolean (read, write)
Controls whether the control is enable or not

public
isFocused: Boolean (read, write)
Is the control focused

public
isMouseOver: Boolean (read, write)
Is the mouse currently over this control

public
isPressed: Boolean (read, write)
Is the mouse button currently pressed over this control

public
isSelected: Boolean (read, write)
Controls whether the control is selected or not

public
isValid: Boolean (read-only)
Is the component in a valid state returns true only if all regions are valid

public
layout (read, write)
Controls the layout attributes of a control

public
left (read)
Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.

public
left: Number (write)


public
margin: Thickness (read, write)
Controls the space between the controls bounds and it border

public
maxHeight: Number (read, write)
Sets the max height

public
maxWidth: Number (read, write)
Sets the max width.

public
measuredHeight: Number (read-only)
returns the preferred height of the control*

public
measuredMinHeight: Number (read-only)
The minimum size of the component

public
measuredMinWidth: Number (read-only)
The minimum size of the component

public
measuredWidth: Number (read-only)
returns the preferred width of the control*

public
minHeight: Number (read, write)
Sets the min height

public
minWidth: Number (read, write)
Sets the min width

public
padding: Thickness (read, write)
Gets or sets padding within the control.

public
readOnly: Boolean (read, write)
Specifies whether the component is read only or not

public
resources: ResourceDictionary (read-only)
A hierarchichal store of user defined objects

public
right (read)
Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area.

public
right: Number (write)


public
styleName: String (read, write)
Alias for the styleClass property*

public
top (read)
Gets or sets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

public
top: Number (write)


public
triggers (read)
Set or get the array of property triggers for this object

public
triggers: Object (write)


public
visible: Boolean (read, write)
Controls whether the control is visible or not

public
width: Number (read, write)
Gets or sets the width of the control.

public
x (read)
Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.

public
x: Number (write)


public
y (read)
Gets or sets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

public
y: Number (write)


Constructor

public
UIControl ( )
Constructor - This should not be called directly.


Method Summary

public
addBinding ( bind: Object, isDataBound: Boolean ): Binding
Adds a binding for this control

public
addBindings ( v: Object )


public
addEventListener ( event: String, obj: Object, handler ): Void
Registers a listener to a component instance.

public
addPropertyTrigger ( propertyName: String, propertyValue, properties: Object, merge: Boolean ): Object
Add a property trigger for this instance

public
applyStyle ( props: Object ): Void
Applies the properties in the style param to this instance.

public
beginDeferUpdate ( ): Void
marks the begin of a defer updates session*

public
canUpdate ( ): Boolean
indicates whether the control is currently in a deferred update state*

public static
centerContent ( t: MovieClip, pc: Object, tc: Object ): Void
Centers content within its parent container.

public
checkState ( v: Number ): Boolean
Checks whether the component is in the state specified state

public
containsFocus ( ): Boolean
Is the control or one of its children focused

public
destroy ( ): Void
Destroys or remove the component from the stage

public
destroyObject ( tgt: MovieClip ): Void
destroys or removes a component or clip

public
drawFocus ( state: Boolean ): Void
draws the focus rect and sets the isFocused property this is to maintain compatibility with the MM Framework

public
endDeferUpdate ( ): Void
marks the end of a defer updates session*

public
findFocusFromObject ( o: Object ): Object


public
findFocusInChildren ( o: Object ): Object


public
getBinding ( property: String ): Binding
Returns a binding associated with a particular property

public
getBounds ( target )
Returns the minimum and maximum x and y coordinates of a clip in a specified coordinate space.

public static
getCenter ( t: MovieClip, coordinateSpace: MovieClip ): Object
Get the coordinates of the center of an object.

public
getClass ( ): Function
Returns a reference to the components static class

public
getFocus ( ): Object
Get the component that currently has the focus.

public
getFocusManager ( ): Object
Get the current focusManager.For compatibility with MM Framework This may return an instance of mx.managers.FocusManager or xp.system.FocusManager depending on whether internal FocusManagement is enabled or not.

public
getFocusRect ( ): Object
return an object with properties x/y/width/height to describe the focus rect

public
getLocation ( ): Object
Gets the coordinates of the upper-left corner of the component

public
getPropertyValue ( name: String, inheritable: Boolean, defaultValue: Object ): Object
Retrieves the value of a property

public
getSize ( ): Dimension
Gets the width and height of the component returns a Dimension object with properties width and height

public
getStateName ( isPressed: Boolean, isMouseOver: Boolean, isSelected: Boolean, isEnabled: Boolean )
For a given set of properties returns a combined property name.

public
getTrigger ( propertyName: String, propertyValue: String ): Object
Retrieves the property trigger associated with a named property and a value

public
globalToLocalPoint ( point: Object, t: MovieClip ): Object
Converts Stage coordinates to the local coordinates of the specified movie clip.

public
invalidate ( region: Number, invalidateParent: Boolean ): Void
Invalidates the components boundaries and its draw state

public
invalidateLayout ( ): Void
Marks the layout of the component as invalid and will force them to be redrawn on he next frame*

public
invalidateSize ( ): Void
Marks the boundries of the component as invalid and will force them to be recalculated on he next frame*

public
invalidateSizeAndLayout ( ): Void
Marks the boundries and layout of the component as invalid and will force them to be redrawn on he next frame*

public
invalidChild ( child, bounds: Boolean ): Boolean
Notifies a component one of its children has become invalid

public static
isChild ( t: MovieClip, p: MovieClip ): Boolean
Checks whether the target object is a child of the parent object

public static
isMouseDirectlyOver ( t: MovieClip ): Boolean
Determine if the mouse is directly over the target t

public
isParent ( c: MovieClip ): Boolean
Checks whether the target object is one of our children

public
localToGlobalPoint ( point: Object, t: MovieClip ): Object
Converts local coordinates of the movie clip to the global Stage.

public
localToLocalPoint ( point: Object, s: MovieClip, d: MovieClip ): Object
Converts local coordinates to Stage coordinates and then back to local coordinates in two different coordinate space

public
measure ( ): Void
measures the components boundaries

public
mouseWheel ( delta: Number, target: MovieClip ): Void
MouseWheel event handler

public
move ( x: Number, y: Number ): Void
Sets the coordinates of the upper-left corner of the component

public
onChildFocus ( ctl, focusControl )
Called when a child component gains focus

public
onKillFocus ( newFocus: Object ): Void
KillFocus handler.Called when you lose focus. If focus was actualy set to some internal TextField that TextField must call onKillFocus when it loses focus.

public
onSetFocus ( oldFocus: Object ): Void
SetFocus handler.Called when you get focus. If focus is actualy set to some internal TextField that TextField must call onSetFocus when it gets focus.

public
processEnterKey ( )
Process enter key event

public
processEscapeKey ( )
Process escape key event

public
processTabKey ( )
Process tab key event

public
redraw ( bAlways: Boolean ): Void
Redraws the object instead of waiting for invalidation to do so.

public
refresh ( ): Void
invalidates the whole UI and forces it to update immediately

public
removeEventListener ( event: String, obj: Object ): Void
Removes a registered listener from a component instance.

public
routeEvent ( e: Event ): Void
Routes an event to the parent if the routeEvents property is true.

public
setBounds ( x: Number, y: Number, w: Number, h: Number ): Void
Sets the bounds of the control to the specified location and size.

public
setFocus ( ): Void
Set focus to this control.

public
setLocation ( x: Number, y: Number ): Void
Sets the coordinates of the upper-left corner of the component

public
setPropertyValue ( name: String, value: Object ): Void
Sets the value of a property

public
setSize ( w: Number, h: Number ): Void
Sets the width and height of the component

public
setValueChanged ( state: Boolean ): Void


public
update ( ): Void
updates the components UI by validating its invalid regions

public
validate ( ): Boolean
Checks the value of the control



Field Documentation

__layout

public var __layout: Object

allowDrop

public var allowDrop: Boolean
Gets or sets a value indicating whether this element can be used as the target of a drag-and-drop operation

autoLayout

public var autoLayout: Boolean
Controls whether the control is layed out by the layout system *

bindingDefaultValue

public var bindingDefaultValue
The default value if the data value is null

bindingFormatter

public var bindingFormatter: Object

bindingPath

public var bindingPath: String
The path in the dataSource this control will bind to

bindingSource

public var bindingSource: String
A string refence to a datasource this contol should bind to

BSy default a control will bind to the "dataSource" property of its parent. If this property is set the control will look for an object in its parent with this name

bindingType

public var bindingType: String
The type of data binding required

One of OneTime,OneWay,TwoWay.

bindingValidator

public var bindingValidator: Object

border

public var border: IBorder
the border delegate

causesValidation

public var causesValidation: Boolean
Does this control cause a validation

classInfo

public static var classInfo: Object
A static class information object

Every class has an associated classInfo object that holds the version and other static information. The classInfo can be accessed either directly by referencing the static class or by calling getClass() on any class instance.

clickOnENTER

public var clickOnENTER: Boolean
Fire click event when return is pressed

clickOnSPACE

public var clickOnSPACE: Boolean
Fire click event when spacebar is pressed

container

public var container: Object
The container element for this instance

The IContainer object that this component is in. This is null if the controls parent is not also its parentContainer All controls register themselves with there container when created.

context

public var context: Object
The controls context object.

Each control has a context object which can be used to store info.
The content and its use is undefined.

data

public var data: Object
A user defined data object associated with this control

disableAcceptButton

public var disableAcceptButton: Boolean
Disables the default accept button action

Indicates that you want the FocusManger to disable the default accept button action whilst this component has focus.

disableCancelButton

public var disableCancelButton: Boolean
Disables the default cancel button action

Indicates that you want the FocusManger to disable the default cancel button action whilst this component has focus.

enableBGMouseEvents

public var enableBGMouseEvents: Boolean
Controls whether mouse events are set on the background or foreground.

Sometimes controls want there children to be mouse aware as well as themselves, this is not supported on Flash so to work around this we need to set our own mouse functions onto the background not the foreground. This property needs to be set to true before setting enableMouseEvents

enableDblClickEvent

public var enableDblClickEvent: Boolean
Enable or disable click events

enableKeyDownEvents

public var enableKeyDownEvents: Boolean
Enable or disable keyDown events dispatching - enableKeyEvents must be true as well

enableKeyEvents

public var enableKeyEvents: Boolean
Enable or disable keyprocessing

enableKeyUpEvents

public var enableKeyUpEvents: Boolean
Enable or disable keyUp events dispatching - enableKeyEvents must be true as well

enableMouseWheelEvents

public var enableMouseWheelEvents: Boolean
Enable or disable mouse wheel handling

formatterOptions

var formatterOptions: String

horizontalAlignment

public var horizontalAlignment: String
Describes the means by which a child element is vertically positioned or stretched within a parent's layout slot.

Center Element is aligned to the center of the parent element's layout slot. Left Element is aligned to the left of the parent element's layout slot. Right Element is aligned to the right of the parent element's layout slot. Stretch Element is stretched to fill the entirety of the parent element's layout slot.

index

public var index: Number
An item index for this instance

The index of the control in its parent child array.For internal use, acutal definition my vary depending on context.

isBinding

public var isBinding: Number
Are we currently executing a binding*

itemId

public var itemId: Object
An item identifier

The compound index of a control.For internal use, acutal definition my vary depending on context.

logEnabled

public var logEnabled: Boolean
Are we in debug logging mode-for internal use only

parent

public var parent: Object
The parent element for this instance

This should not be confused with _parent property which refers to the owning movieclip, parent refers instead to the owning "component".

parentContainer

public var parentContainer: Object
The parent container element for this instance

The first IContainer object above this element in the hierarchy All controls search there parent for resources.

parentForm

public var parentForm: Object
The parent form element for this instance

The first IForm object above this element in the hierarchy

percentageHeight

public var percentageHeight: Number
the percentage height *

percentageWidth

public var percentageWidth: Number
the percentage width *

styleClass

public var styleClass: String
The name of the style class this instance will use.

tabIndex

public var tabIndex: Number
Sets the tabIndex of this control.

tabIndex can also be set via the accesibility panel.

tabStop

public var tabStop: Boolean
Gets or sets whether a control should be included in tab navigation.

The MM Framework used a combination of TabEnabled and TabChildren to indicate whether a control is a TabStop. However these properties are preset and not user contolled and no way is provided to exclude a control form the tab order except by disabling it. All XPComponents use TabStop to indicate whether a control is tabable, but note tabEnabled and tabChildren MUST NOT be altered as they are still required for compatibility with the MM Framework)
By default controls are not TabStops; This maybe overriden in subclasses for input controls.

tooltip

public var tooltip: String
The tooltip text.

If this property is set a ToolTip window will display when the mouse is idle over the control

tree

public var tree: Object
Our stylesheet object for child controls

This represnts a tree of styles that can be used by child component.
As a component loads it tries to locate a valid style object, one of the places it looks is in its parent tree.
This allows you to override the global definition of a style with a local one.

verticalAlignment

public var verticalAlignment: String
Declares the vertical alignment characteristics applied this element when it is composed within a parent element such as a panel or items control.

Bottom Child element is aligned to the bottom of the parent's layout slot. Center Child element is aligned to the center of the parent's layout slot. Stretch Child element stretches to fill the parent's layout slot. Top Child element is aligned to the top of the parent's layout slot.


Property Documentation

alpha

public alpha: Number (read, write)
Gets or sets the alpha value of the control *

autosize

public autosize (read, write)
Controls how this component will resize itslef when its content changes

One of none,horizontal,vertical,both. If none the control can only be resized by changing its bounds properties. Any other value and the control can resize itself at any time in response to content changes.

background

public background: Object (read, write)
A Brush object used to paint the controls background.

backgroundVisible

public backgroundVisible: Boolean (read, write)
Indicates whether the background is visible or not

bindings

public bindings (read)
An array of bindings for this control

bindings

public bindings: Object (write)

borderBrush

public borderBrush: Object (read, write)
A Brush object used to paint the controls border.

borderRadius

public borderRadius (read, write)
Sets or get the radius of the border

An object with properties topLeft,topRight,bottomRight,bottomLeft corresponding to the topLeft,topRight,bottomRight,bottomLeft radii

borderShadow

public borderShadow: Boolean (read, write)
Controls whether there is a shadow drawn round the border

borderStyle

public borderStyle (read, write)
The type of border that should be drawn

"none" for no border otherwise a 3D style type

borderThickness

public borderThickness: Thickness (read, write)
A Thickness object used set the dimensions of the border.

bottom

public bottom (read)
Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

Equivalent to the y position plus the component height

bottom

public bottom: Number (write)

dataSource

public dataSource: Object (read, write)
The dataSource this control is bound to.

if not explicitly set will bind to the parents dataSource

enableMouseEvents

public enableMouseEvents: Boolean (read, write)
Enable or disable mouse events

focusManager

public focusManager: Object (read-only)
for compatibility with MM Framework actually an instance of SystemManager

height

public height: Number (read, write)
Gets or sets the height of the control.

Allows the height property to be set in dynamically created components

id

public id: String (read, write)

isEnabled

public isEnabled: Boolean (read, write)
Controls whether the control is enable or not

isFocused

public isFocused: Boolean (read, write)
Is the control focused

isMouseOver

public isMouseOver: Boolean (read, write)
Is the mouse currently over this control

isPressed

public isPressed: Boolean (read, write)
Is the mouse button currently pressed over this control

isSelected

public isSelected: Boolean (read, write)
Controls whether the control is selected or not

isValid

public isValid: Boolean (read-only)
Is the component in a valid state returns true only if all regions are valid

Value:
True if valid otherwsie false

layout

public layout (read, write)
Controls the layout attributes of a control

dock: Controls docking placement defaultValue="float" enumeration="float,left,top,right,bottom,fill" dockOrder: Controls processeing order defaultValue=0 break: Mark whether this controls terminates the layout line defaultValue false

left

public left (read)
Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.

Equivalent to the x position

left

public left: Number (write)

margin

public margin: Thickness (read, write)
Controls the space between the controls bounds and it border

maxHeight

public maxHeight: Number (read, write)
Sets the max height

maxWidth

public maxWidth: Number (read, write)
Sets the max width.

measuredHeight

public measuredHeight: Number (read-only)
returns the preferred height of the control*

measuredMinHeight

public measuredMinHeight: Number (read-only)
The minimum size of the component

measuredMinWidth

public measuredMinWidth: Number (read-only)
The minimum size of the component

measuredWidth

public measuredWidth: Number (read-only)
returns the preferred width of the control*

minHeight

public minHeight: Number (read, write)
Sets the min height

minWidth

public minWidth: Number (read, write)
Sets the min width

padding

public padding: Thickness (read, write)
Gets or sets padding within the control.

An object of type Thickness representing the control's internal spacing characteristics. It represents the distance between the bounds and the internal contents of the component.

readOnly

public readOnly: Boolean (read, write)
Specifies whether the component is read only or not

true if the component is read only

resources

public resources: ResourceDictionary (read-only)
A hierarchichal store of user defined objects

Resources is an associative array that you can use resources to store any object. Any object that is stored in resources is only visible to child components in the visible tree. When you refernce an object in resources if not found directly on this component it will search its parents resources up to the root of the visible tree.

right

public right (read)
Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area.

Equivalent to the x position plus the component width

right

public right: Number (write)

styleName

public styleName: String (read, write)
Alias for the styleClass property*

top

public top (read)
Gets or sets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

Equivalent to the y position

top

public top: Number (write)

triggers

public triggers (read)
Set or get the array of property triggers for this object

Property triggers represent a collection of properties to be automatically set in response to a change in another property.
A simple example might be to handle rollover; In response to a change in the isMouseOver property the fontColor property can be changed.

See also:

triggers

public triggers: Object (write)

visible

public visible: Boolean (read, write)
Controls whether the control is visible or not

width

public width: Number (read, write)
Gets or sets the width of the control.

Allows the width property to be set in dynamically created components

x

public x (read)
Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.

x

public x: Number (write)

y

public y (read)
Gets or sets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

y

public y: Number (write)

Constructor Documentation

UIControl

public function UIControl()
Constructor - This should not be called directly.

If you want to dynamically create a new instance of a control use its static newInstance method


Method Documentation

addBinding

public function addBinding(bind: Object,
 isDataBound: Boolean): Binding
Adds a binding for this control

Parameters:
bind
A binding descriptor
isDataBound
Controls whether this is a data related binding or a generic property binding, if not set defaults to true.(optional)

addBindings

public function addBindings(v: Object)

addEventListener

public function addEventListener(event: String,
 obj: Object,
 handler): Void
Registers a listener to a component instance.

See also:

addPropertyTrigger

public function addPropertyTrigger(propertyName: String,
 propertyValue,
 properties: Object,
 merge: Boolean): Object
Add a property trigger for this instance

PropertyTriggers are like rollovers, they trigger when a property changes.

Parameters:
propertyName
Name of property the trigger is for
propertyValue
The value of the property that will cause the trigger to fire
properties
The property bag to be applied when the trigger fires
merge
Determine whether this property trigger replaces any existng trigger for this property or is merged with the existing trigger
Returns:
A reference to the newly created trigger

applyStyle

public function applyStyle(props: Object): Void
Applies the properties in the style param to this instance.

Parameters:
props
A property bag containing properties to be applied to this instance.

beginDeferUpdate

public function beginDeferUpdate(): Void
marks the begin of a defer updates session*

canUpdate

public function canUpdate(): Boolean
indicates whether the control is currently in a deferred update state*

centerContent

public static function centerContent(t: MovieClip,
 pc: Object,
 tc: Object): Void
Centers content within its parent container.

Parameters:
t
The target content clip
pc
Optional param the coordinate of the parents center point
tc
Optional param the coordinate of the targets center point

checkState

public function checkState(v: Number): Boolean
Checks whether the component is in the state specified state

Check whether the componenState has the specified flag set

Parameters:
v
state The state to compare against
Returns:
true if the component is in the state specified otherwise false

containsFocus

public function containsFocus(): Boolean
Is the control or one of its children focused

Returns true if the contorl has focus or one of its child object has focus

Returns:
True if the Selection.getFocus returns this control or one of its children

destroy

public function destroy(): Void
Destroys or remove the component from the stage

destroyObject

public function destroyObject(tgt: MovieClip): Void
destroys or removes a component or clip

Parameters:
tgt
the object instance

drawFocus

public function drawFocus(state: Boolean): Void
draws the focus rect and sets the isFocused property this is to maintain compatibility with the MM Framework

Parameters:
state
If true draws a focus ring else removes the focus ring.

endDeferUpdate

public function endDeferUpdate(): Void
marks the end of a defer updates session*

findFocusFromObject

public function findFocusFromObject(o: Object): Object

findFocusInChildren

public function findFocusInChildren(o: Object): Object

getBinding

public function getBinding(property: String): Binding
Returns a binding associated with a particular property

Bindings are made to particular properties, a control may have many bindings active at one time binding differnt properties. This retrieves a binding for one named property

Parameters:
property
The name of the property you wish to retrieve the bindings for.

getBounds

public function getBounds(target)
Returns the minimum and maximum x and y coordinates of a clip in a specified coordinate space.

Returns properties that are the minimum and maximum x and y coordinate values of the instance specified by my_mc for the targetCoordinateSpace parameter

Parameters:
target
The target path of the Timeline whose coordinate system you want to use as a reference point.
Returns:
An object with the properties xMin, xMax, yMin, and yMax.

getCenter

public static function getCenter(t: MovieClip,
 coordinateSpace: MovieClip): Object
Get the coordinates of the center of an object.

Parameters:
t
The target content clip
coordinateSpace
Optional param the cordinate space defaults to the targets parent if not set
Returns:
An object with the properties x and y.

getClass

public function getClass(): Function
Returns a reference to the components static class

getFocus

public function getFocus(): Object
Get the component that currently has the focus.

Recommended instead of using Selection object because it will tell you which component has focus. Selection might return a subobject in that component

Returns:
the component that has focus

getFocusManager

public function getFocusManager(): Object
Get the current focusManager.For compatibility with MM Framework This may return an instance of mx.managers.FocusManager or xp.system.FocusManager depending on whether internal FocusManagement is enabled or not.

getFocusRect

public function getFocusRect(): Object
return an object with properties x/y/width/height to describe the focus rect

getLocation

public function getLocation(): Object
Gets the coordinates of the upper-left corner of the component

Returns:
A point object with properties x and y

getPropertyValue

public function getPropertyValue(name: String,
 inheritable: Boolean,
 defaultValue: Object): Object
Retrieves the value of a property

if the property value is null or undefined on this instance and inheritable is true it will check for the property value on the parent

Parameters:
name
The name of the proprety
inheritable
defaultValue

getSize

public function getSize(): Dimension
Gets the width and height of the component returns a Dimension object with properties width and height

getStateName

public function getStateName(isPressed: Boolean,
 isMouseOver: Boolean,
 isSelected: Boolean,
 isEnabled: Boolean)
For a given set of properties returns a combined property name.

Used for property triggers. returns a string indicating the instances primary state. A combination of selected,enabled,pressed,mouseover states.

getTrigger

public function getTrigger(propertyName: String,
 propertyValue: String): Object
Retrieves the property trigger associated with a named property and a value

Parameters:
propertyName
Name of property the trigger is for
propertyValue
The value of the property that will cause the trigger to fire
Returns:
Retruns a reference to the property trigger

globalToLocalPoint

public function globalToLocalPoint(point: Object,
 t: MovieClip): Object
Converts Stage coordinates to the local coordinates of the specified movie clip.

Converts the point object from Stage (global) coordinates to the movie clip's (local) coordinates returns the adjusted point

Parameters:
point
The name or identifier of an object created with the generic Object class. The object specifies the x and y coordinates as properties.
t
The target clip
Returns:
A point object with properties x and y

invalidate

public function invalidate(region: Number,
 invalidateParent: Boolean): Void
Invalidates the components boundaries and its draw state

Invalidates the components boundaries and its draw state and queues a revalidation on the next frame

Parameters:
region
The region of the component to invalidate - see UIConstants
invalidateParent

invalidateLayout

public function invalidateLayout(): Void
Marks the layout of the component as invalid and will force them to be redrawn on he next frame*

invalidateSize

public function invalidateSize(): Void
Marks the boundries of the component as invalid and will force them to be recalculated on he next frame*

invalidateSizeAndLayout

public function invalidateSizeAndLayout(): Void
Marks the boundries and layout of the component as invalid and will force them to be redrawn on he next frame*

invalidChild

public function invalidChild(child,
 bounds: Boolean): Boolean
Notifies a component one of its children has become invalid

Parameters:
child
A reference to the invalid child component
bounds
True if the childs bounds are invalid

isChild

public static function isChild(t: MovieClip,
 p: MovieClip): Boolean
Checks whether the target object is a child of the parent object

Parameters:
t
the target object
p
the potential parent
Returns:
true if the target is a child of parent

isMouseDirectlyOver

public static function isMouseDirectlyOver(t: MovieClip): Boolean
Determine if the mouse is directly over the target t

Parameters:
t
the target movieclip to check

isParent

public function isParent(c: MovieClip): Boolean
Checks whether the target object is one of our children

Parameters:
c
the potential child
Returns:
true if the target is a child of us

localToGlobalPoint

public function localToGlobalPoint(point: Object,
 t: MovieClip): Object
Converts local coordinates of the movie clip to the global Stage.

Converts the point object from the movie clip's (local) coordinates to the Stage (global) coordinates. returns the adjusted point

Parameters:
point
The object specifies the x and y coordinates as properties.
t
The target clip
Returns:
A point object with properties x and y

localToLocalPoint

public function localToLocalPoint(point: Object,
 s: MovieClip,
 d: MovieClip): Object
Converts local coordinates to Stage coordinates and then back to local coordinates in two different coordinate space

Converts the point object from the source movie clip's (local) coordinates to the Stage (global) coordinates. and then converts the point object from Stage (global) coordinates to the destination movie clip's (local) coordinates returns the adjusted point

Parameters:
point
The name or identifier of an object created with the generic Object class. The object specifies the x and y coordinates as properties.
s
The source target clip if null defaults to the current instance
d
The destination target clip if null defaults to the current instance
Returns:
A point object with properties x and y

measure

public function measure(): Void
measures the components boundaries

calculates the measured size

mouseWheel

public function mouseWheel(delta: Number,
 target: MovieClip): Void
MouseWheel event handler

This should not be overridden instead users should override onMouseWheel

move

public function move(x: Number,
 y: Number): Void
Sets the coordinates of the upper-left corner of the component

Sets the coordinates of the upper-left corner of the componet relative to the upper-left corner of its container.

Parameters:
x
x position of the component
y
y position of the component

onChildFocus

public function onChildFocus(ctl,
 focusControl)
Called when a child component gains focus

This event bubbles up the logical hierarchy

Parameters:
ctl
The immediate child calling this focus
focusControl
The child component gaining focus

onKillFocus

public function onKillFocus(newFocus: Object): Void
KillFocus handler.Called when you lose focus. If focus was actualy set to some internal TextField that TextField must call onKillFocus when it loses focus.

onSetFocus

public function onSetFocus(oldFocus: Object): Void
SetFocus handler.Called when you get focus. If focus is actualy set to some internal TextField that TextField must call onSetFocus when it gets focus.

processEnterKey

public function processEnterKey()
Process enter key event

Called when the control or its children has focus bubbles up the logical hierarchy

processEscapeKey

public function processEscapeKey()
Process escape key event

Called when the control or its children has focus bubbles up the logical hierarchy

processTabKey

public function processTabKey()
Process tab key event

Called when the control or its children has focus bubbles up the logical hierarchy

redraw

public function redraw(bAlways: Boolean): Void
Redraws the object instead of waiting for invalidation to do so.

Parameters:
bAlways
bAlways:Boolean (default = false) — If false, it does not redraw if not invalidated.

refresh

public function refresh(): Void
invalidates the whole UI and forces it to update immediately

removeEventListener

public function removeEventListener(event: String,
 obj: Object): Void
Removes a registered listener from a component instance.

See also:

routeEvent

public function routeEvent(e: Event): Void
Routes an event to the parent if the routeEvents property is true.

Parameters:
e
A reference to an event object. The event object must have a type property that is a string indicating the name of the event. Generally, the event object also has a target property that is the name of the instance broadcasting the event. You can define other properties on the event object that will help a user capture information about the event when it is dispatched.

setBounds

public function setBounds(x: Number,
 y: Number,
 w: Number,
 h: Number): Void
Sets the bounds of the control to the specified location and size.

Sets the components top,left,width and height properties Note: getBounds is defined in movieclip

Parameters:
x
the x coordinate
y
the y coordinate
w
the height
h
the width

setFocus

public function setFocus(): Void
Set focus to this control.

If the true focus control is an internal object this will set focus to that object. This function will be called by the FocusManger when tabbing.

setLocation

public function setLocation(x: Number,
 y: Number): Void
Sets the coordinates of the upper-left corner of the component

Sets the coordinates of the upper-left corner of the componet relative to the upper-left corner of its container.

Parameters:
x
x position of the component
y
y position of the component

setPropertyValue

public function setPropertyValue(name: String,
 value: Object): Void
Sets the value of a property

Parameters:
name
The name of the proprety
value

setSize

public function setSize(w: Number,
 h: Number): Void
Sets the width and height of the component

Parameters:
w
width
h
height

setValueChanged

public function setValueChanged(state: Boolean): Void

update

public function update(): Void
updates the components UI by validating its invalid regions

validate

public function validate(): Boolean
Checks the value of the control

Occurs when the input focus leaves the control.

Returns:
True if the value is valid


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc