WidgetSprite

Sprite

Base class for widgets to enable/disable event listeners and keep a global tab order of all widgets (provided they are created and registered in tab order.

Summary
WidgetSpriteBase class for widgets to enable/disable event listeners and keep a global tab order of all widgets (provided they are created and registered in tab order.
Variables
widgetsA static associative table indexed by owner of arrays of WidgetSprite instances belonging to the owner.
registerCountCount of number of widgets that have been registered.
instanceOwnerThe registered owner of this WidgetSprite instance
activeStateStores whether the widget is active or inactive.
Properties
isActiveIndicates whether the widget is active or not.
Functions
setActiveSets the state of the widget to active or inactive.
registerRegister the owner of a widget.
unregisterRemoves the registered ownership of a widget.
setOwnerActiveSets all widgets registered to owner to the given state.
isOwnerActiveGets the state of a widget owner.
toStringDescribes the widget sprite class state.

Variables

widgets

private static var widgets: Object

A static associative table indexed by owner of arrays of WidgetSprite instances belonging to the owner.

registerCount

private static var registerCount: int

Count of number of widgets that have been registered.  Used to keep a global tab order irrespective of unregister.

instanceOwner

private var instanceOwner: String

The registered owner of this WidgetSprite instance

activeState

private var activeState: Boolean

Stores whether the widget is active or inactive.

Properties

isActive

public function get isActive():Boolean

Indicates whether the widget is active or not.

Returns

True if active, false otherwise.

Functions

setActive

public function setActive(state: Boolean):void

Sets the state of the widget to active or inactive.

Parameters

stateTrue to activate, false otherwise.

register

public function register(owner: String):void

Register the owner of a widget.

Parameters

ownerThe owner of widget

unregister

public function unregister():void

Removes the registered ownership of a widget.

setOwnerActive

public static function setOwnerActive(owner: String,
state: Boolean):void

Sets all widgets registered to owner to the given state.

Parameters

ownerThe owner of widgets
stateTrue to activate the widgets, false to disactivate.

isOwnerActive

public static function isOwnerActive(owner: String):Boolean

Gets the state of a widget owner.

Parameters

ownerThe owner of widgets

Returns

True if the owner is active, false otherwise.

toString

public static function toString():String

Describes the widget sprite class state.

Returns

String with information about each widget owner and state.

An action button drawn as a bubble with an optional symbol on top.
A base class dialog box widget.
An integer number input field with an optional label and optional auto-repeating stepper buttons.
A button widget with a slightly raised look and a label text on it.
private static var widgets: Object
A static associative table indexed by owner of arrays of WidgetSprite instances belonging to the owner.
private static var registerCount: int
Count of number of widgets that have been registered.
private var instanceOwner: String
The registered owner of this WidgetSprite instance
private var activeState: Boolean
Stores whether the widget is active or inactive.
public function get isActive():Boolean
Indicates whether the widget is active or not.
public function setActive(state: Boolean):void
Sets the state of the widget to active or inactive.
public function register(owner: String):void
Register the owner of a widget.
public function unregister():void
Removes the registered ownership of a widget.
public static function setOwnerActive(owner: String,
state: Boolean):void
Sets all widgets registered to owner to the given state.
public static function isOwnerActive(owner: String):Boolean
Gets the state of a widget owner.
public static function toString():String
Describes the widget sprite class state.
Close