Main Page | Packages | Class Tree | Index | Help

xp.system

class Application

MovieClip
  |
  +--xp.system.Application

Implemented Interfaces: IWindow

class Application
extends MovieClip

The Application object


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
appCopyright
The copyright text to display in the AboutBox

public
appLogo
The linkage Id of the appplication logo. This will be displayed in the AboutBox.

public
appTitle
The application title to display in the AboutBox

public
appVersion
The application version to display in the AboutBox

public
autoLoad: Boolean
Controls whether the main UI form is loaded when the application object is created

public
bgColor
The stage background color

public
config: Object
The application config object

public
ect
Is this a fluid application

public
forms: Object
Collection of forms index by id *

public
localRoot
The application root clip

public
mainFormId: String
linkage Id of the main application UI - by default FrmMain

public
StageSize: Object
Stage size, an object with width and height properties *

Property Summary

public
content: MovieClip (read-only)
Pointer to main application UI

public
dialogs: ICommonDialogs (read-only)
ref to the CommonDialogs

public
logger: Object (read-only)
Support for the logging system

public
mainForm: MovieClip (read, write)
pointer to main application UI

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

Constructor

public
Application ( config: Object)
Constructor

Method Summary

public
addService ( serviceName: String, service: Object ): Void
adds the specified service*

public
alert ( message: String, title: String, listener: Object ): IWindow
Displays an alert DialogBox

public
attachBusyCursor ( loader: Object ): Void
attach the busy cursor to the progress event *

public
confirm ( message: String, title: String, listener: Object ): IWindow
Displays a confirm DialogBox

public
error ( message: String, listener: Object ): IWindow
Displays an error DialogBox

public static
getInstance ( ): Application
Returns a reference to the global application object

public
getService ( serviceName: String ): Object
retrieve the specified service*

public
getValue ( name: String, defaultValue: Object ): Object
Get a value from the application resources

public
loadMainForm ( )
Loads the applications main User Interface

public static
mtrace ( msg: String, method: String, file: String, line: Number ): Void
Support for MTASC trace feature*

public
onLoadMainForm ( form )
Callback by the main User Interface when it has loaded

public static
onResize ( ): Void
keep track of the size and position of the stage

public
onStageResize ( ): Void
Called when the stage is resized

public
prompt ( message: String, title: String, icon: String, prompt: String, listener: Object ): IWindow
Displays a prompt dialog box with a text field for entering a value.

public
registerForm ( form: IForm ): Void
register a from with the application *

public
removeBusyCursor ( loader: Object ): Void
remove the busy cursor to the progress event *

public static
Run ( moduleRoot: Object, mainFormId: String, config: Object )
Creates the global application object

public
setValue ( name: String, value: Object ): Void
Store a value into the application resources

public
showAboutBox ( ): Void
Displays the application About DialogBox

public
showBusyCursor ( show: Boolean ): Void
Display a Wait DialogBox

public
showCursor ( cursorId: String ): Void
Controls the displayed cursor

public
showLoader ( message: String, title: String, loader: Object, indeterminate: Boolean, listener: Object ): IWindow
Displays the standard progress loader dialog

public
showMessage ( message: String, title: String, icon: String, btns: Number, listener: Object ): IWindow
Displays the standard message dialog

public
showToolTip ( state: Boolean, tgt: MovieClip, text: String, track: Boolean, maxWidth: Number )
shows or hides the tooltip

public
showWait ( message: String, title: String, listener: Object ): IWindow
Display a Wait DialogBox

public
toString ( ): String
Display Summary info

public
unregisterForm ( form: IForm ): Void
unregister a from with the application *



Field Documentation

appCopyright

public var appCopyright
The copyright text to display in the AboutBox

appLogo

public var appLogo
The linkage Id of the appplication logo. This will be displayed in the AboutBox.

appTitle

public var appTitle
The application title to display in the AboutBox

appVersion

public var appVersion
The application version to display in the AboutBox

autoLoad

public var autoLoad: Boolean
Controls whether the main UI form is loaded when the application object is created

bgColor

public var bgColor
The stage background color

config

public var config: Object
The application config object

ect

public var ect
Is this a fluid application

forms

public var forms: Object
Collection of forms index by id *

localRoot

public var localRoot
The application root clip

mainFormId

public var mainFormId: String
linkage Id of the main application UI - by default FrmMain

StageSize

public var StageSize: Object
Stage size, an object with width and height properties *


Property Documentation

content

public content: MovieClip (read-only)
Pointer to main application UI

Required by the IWindow interface(if I's support props). Returns mainForm

dialogs

public dialogs: ICommonDialogs (read-only)
ref to the CommonDialogs

logger

public logger: Object (read-only)
Support for the logging system

See also:

mainForm

public mainForm: MovieClip (read, write)
pointer to main application UI

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.


Constructor Documentation

Application

public function Application(config: Object)
Constructor

Parameters:
config
context An application context object to set properties on the Application

Method Documentation

addService

public function addService(serviceName: String,
 service: Object): Void
adds the specified service*

alert

public function alert(message: String,
 title: String,
 listener: Object): IWindow
Displays an alert DialogBox

Parameters:
message
The message to display
title
The title of the DialogBox
listener

attachBusyCursor

public function attachBusyCursor(loader: Object): Void
attach the busy cursor to the progress event *

confirm

public function confirm(message: String,
 title: String,
 listener: Object): IWindow
Displays a confirm DialogBox

Parameters:
message
The message to display
title
The title of the DialogBox
listener

error

public function error(message: String,
 listener: Object): IWindow
Displays an error DialogBox

Parameters:
message
The message to display
listener

getInstance

public static function getInstance(): Application
Returns a reference to the global application object

getService

public function getService(serviceName: String): Object
retrieve the specified service*

getValue

public function getValue(name: String,
 defaultValue: Object): Object
Get a value from the application resources

Parameters:
name
name of the resource to retrieve
defaultValue
the default value of the resource if it cannot be found
Returns:
the resource value

loadMainForm

public function loadMainForm()
Loads the applications main User Interface

mtrace

public static function mtrace(msg: String,
 method: String,
 file: String,
 line: Number): Void
Support for MTASC trace feature*

onLoadMainForm

public function onLoadMainForm(form)
Callback by the main User Interface when it has loaded

onResize

public static function onResize(): Void
keep track of the size and position of the stage

onStageResize

public function onStageResize(): Void
Called when the stage is resized

Resizes the mainForm client area.

prompt

public function prompt(message: String,
 title: String,
 icon: String,
 prompt: String,
 listener: Object): IWindow
Displays a prompt dialog box with a text field for entering a value.

Parameters:
message
The message to display
title
The dialog caption
icon
The icon to display
prompt
The initial text to display in the prompt TextInput control
listener
A listener object to listen for events raised by the dialog

registerForm

public function registerForm(form: IForm): Void
register a from with the application *

removeBusyCursor

public function removeBusyCursor(loader: Object): Void
remove the busy cursor to the progress event *

Run

public static function Run(moduleRoot: Object,
 mainFormId: String,
 config: Object)
Creates the global application object

Parameters:
moduleRoot
mainFormId
config
The application configuration object-Any properties of the Application object can be set via the config. To use your own Application class pass the property "appClass" in the context object. The value is the Class reference i.e. Run({appClass:com.xyz.myAppClass})

setValue

public function setValue(name: String,
 value: Object): Void
Store a value into the application resources

Parameters:
name
name of the resource to retrieve
value
the value of the resource

showAboutBox

public function showAboutBox(): Void
Displays the application About DialogBox

showBusyCursor

public function showBusyCursor(show: Boolean): Void
Display a Wait DialogBox

Parameters:
show
message The message to display

showCursor

public function showCursor(cursorId: String): Void
Controls the displayed cursor

displays a custom cursor specified by the cursorId param, if null reverts to the standard cursor

Parameters:
cursorId
- the symbol of the clip to use as a cursor @see xp.system.Cursors

showLoader

public function showLoader(message: String,
 title: String,
 loader: Object,
 indeterminate: Boolean,
 listener: Object): IWindow
Displays the standard progress loader dialog

Parameters:
message
The message to display
title
The dialog caption
loader
The icon to display
indeterminate
Controls whether the progress bar is indeterminate or not
listener

showMessage

public function showMessage(message: String,
 title: String,
 icon: String,
 btns: Number,
 listener: Object): IWindow
Displays the standard message dialog

Parameters:
message
The message to display
title
The dialog caption
icon
The icon to display
btns
Controls which buttons to display
listener

showToolTip

public function showToolTip(state: Boolean,
 tgt: MovieClip,
 text: String,
 track: Boolean,
 maxWidth: Number)
shows or hides the tooltip

shows or hides the tooltip

Parameters:
state
- if true show tooltip if false hide the tooltip
tgt
- the target clip to place the tooltip over
text
- the text to display in the tooltip
track
- controls whether the tooltip should track the mouse when displayed
maxWidth
the maxWidth of the tooltip, defaults to the maxWidth property if not set

showWait

public function showWait(message: String,
 title: String,
 listener: Object): IWindow
Display a Wait DialogBox

Parameters:
message
The message to display
title
The title of the DialogBox
listener

toString

public function toString(): String
Display Summary info

unregisterForm

public function unregisterForm(form: IForm): Void
unregister a from with the application *


The documentation was generated from the following file:


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