Main Page | Packages | Class Tree | Index | Help

xp.controls

class Window

MovieClip
  |
  +--xp.system.UIControl
        |
        +--xp.controls.Frame
              |
              +--xp.controls.ScrollFrame
                    |
                    +--xp.controls.Window

Implemented Interfaces: IWindow

class Window
extends ScrollFrame

Window
A window consists of a titlebar, statusbar and a body (which holds the content)
The body content can be acessed via the content property. A window may containe only a single piece of content


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
__innerBorderStyle: Number


public static
classInfo: Object
A static class information object

public
closeButton: Boolean
controls the visibility of the titlebar close button

public static
defaultWindowHeight: Number
Constant default display height

public static
defaultWindowWidth: Number
Constant default display width

public
disableAcceptButton: Boolean
Disable the default accept button action

public
hideOnExit: Boolean
controls whether the windows is hidden or destroyed on close*

public
innerBackgroundVisible: Boolean
Indicates whether the inner background is visible or not

public
innerBorderRadius: CornerRadius
Sets or get the radius of the inner face

public
isModal
Is this window modal

public
options: Object
the window options

public
owner: UIControl
The control that "owns" or created this window

public
returnFunction: Function
An event handler to be invoked when this window closes

public
styleClass
Default style class

Fields inherited from class xp.controls.ScrollFrame

classInfo, styleClass

Fields inherited from class xp.controls.Frame

classInfo, hasExternalContent, hasExternalImage, hideImageWhileLoading, isContentLoaded, isContentLoading, preloadMessage

Fields inherited from class xp.system.UIControl

__layout, allowDrop, autoLayout, bindingDefaultValue, bindingFormatter, bindingPath, bindingSource, bindingType, bindingValidator, border, causesValidation, classInfo, clickOnENTER, clickOnSPACE, container, context, data, disableAcceptButton, disableCancelButton, enableBGMouseEvents, enableDblClickEvent, enableKeyDownEvents, enableKeyEvents, enableKeyUpEvents, enableMouseWheelEvents, formatterOptions, horizontalAlignment, index, isBinding, itemId, logEnabled, parent, parentContainer, parentForm, percentageHeight, percentageWidth, styleClass, tabIndex, tabStop, tooltip, tree, verticalAlignment

Property Summary

public
contentForm: Object (read, write)


public
dialogResult: Number (read, write)
Gets or sets the value that is returned after you close the dialog

public
innerBackground: Object (read, write)
Color of inner background area

public
innerBorderStyle (read, write)
inner border style

public
isActive: Boolean (read-only)
Is this window active

public
status: String (read, write)
Gets or sets the window status text

public
title: String (read, write)
Gets or sets the window title text

Properties inherited from class xp.controls.ScrollFrame

contentHeight, contentWidth, hScrollPolicy, largeScroll, smallScroll, viewportHeight, viewportWidth, vScrollPolicy

Properties inherited from class xp.controls.Frame

alignPreloader, autoload, content, nocache, preloadId, source

Properties inherited from class xp.system.UIControl

alpha, autosize, background, backgroundVisible, bindings, borderBrush, borderRadius, borderShadow, borderStyle, borderThickness, bottom, dataSource, enableMouseEvents, focusManager, height, id, isEnabled, isFocused, isMouseOver, isPressed, isSelected, isValid, layout, left, margin, maxHeight, maxWidth, measuredHeight, measuredMinHeight, measuredMinWidth, measuredWidth, minHeight, minWidth, padding, readOnly, resources, right, styleName, top, triggers, visible, width, x, y

Constructor

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


Method Summary

public
close ( ): Void
Closes the window and destroys the content and window

public static
createModalWindow ( content, title: String, closeButton: Boolean, listener: Object, contentInitProps: Object, options: Object, owner: Object, returnFunction: Function )
Displays a standard modal dialog/window

public static
createWindow ( content, title: String, closeButton: Boolean, listener: Object, contentInitProps: Object, options: Object, owner: Object, returnFunction: Function )
Displays the standard non modal dialog/window

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

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
hide ( ): Void
Hides the window. Deactivates it and hides its content. For modal windows you should call close.

public
onMouseActivate ( )
Called when mouse activated

public
processEnterKey ( )
Process enter key event

public
processEscapeKey ( )
Process escape key event

public
show ( ): Void
Shows the window. Activates it, bring sit to the top fo the z-order and sets focus to the content

Methods inherited from class xp.controls.ScrollFrame

getClass, newInstance, setScrollContentHPos, setScrollContentVPos

Methods inherited from class xp.controls.Frame

drawComponent, getClass, loadContent

Methods inherited from class xp.system.UIControl

addBinding, addBindings, addEventListener, addPropertyTrigger, applyStyle, beginDeferUpdate, canUpdate, centerContent, checkState, containsFocus, destroy, destroyObject, drawFocus, endDeferUpdate, findFocusFromObject, findFocusInChildren, getBinding, getBounds, getCenter, getClass, getFocus, getFocusManager, getFocusRect, getLocation, getPropertyValue, getSize, getStateName, getTrigger, globalToLocalPoint, invalidate, invalidateLayout, invalidateSize, invalidateSizeAndLayout, invalidChild, isChild, isMouseDirectlyOver, isParent, localToGlobalPoint, localToLocalPoint, measure, mouseWheel, move, onChildFocus, onKillFocus, onSetFocus, processEnterKey, processEscapeKey, processTabKey, redraw, refresh, removeEventListener, routeEvent, setBounds, setFocus, setLocation, setPropertyValue, setSize, setValueChanged, update, validate



Field Documentation

__innerBorderStyle

public var __innerBorderStyle: Number

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.

closeButton

public var closeButton: Boolean
controls the visibility of the titlebar close button

defaultWindowHeight

public static var defaultWindowHeight: Number
Constant default display height

defaultWindowWidth

public static var defaultWindowWidth: Number
Constant default display width

disableAcceptButton

public var disableAcceptButton: Boolean
Disable the default accept button action

hideOnExit

public var hideOnExit: Boolean
controls whether the windows is hidden or destroyed on close*

innerBackgroundVisible

public var innerBackgroundVisible: Boolean
Indicates whether the inner background is visible or not

innerBorderRadius

public var innerBorderRadius: CornerRadius
Sets or get the radius of the inner face

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

isModal

public var isModal
Is this window modal

options

public var options: Object
the window options

owner

public var owner: UIControl
The control that "owns" or created this window

If this is set and the return function is set the return functio will be invoked on the owner instance

returnFunction

public var returnFunction: Function
An event handler to be invoked when this window closes

styleClass

public var styleClass
Default style class


Property Documentation

contentForm

public contentForm: Object (read, write)

dialogResult

public dialogResult: Number (read, write)
Gets or sets the value that is returned after you close the dialog

innerBackground

public innerBackground: Object (read, write)
Color of inner background area

innerBorderStyle

public innerBorderStyle (read, write)
inner border style

isActive

public isActive: Boolean (read-only)
Is this window active

status

public status: String (read, write)
Gets or sets the window status text

title

public title: String (read, write)
Gets or sets the window title text


Constructor Documentation

Window

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

Windows are created by calling the static createWindow or createModalWindow methods.


Method Documentation

close

public function close(): Void
Closes the window and destroys the content and window

createModalWindow

public static function createModalWindow(content,
 title: String,
 closeButton: Boolean,
 listener: Object,
 contentInitProps: Object,
 options: Object,
 owner: Object,
 returnFunction: Function)
Displays a standard modal dialog/window

Parameters:
content
The class or linkageId of the content Form to be loaded into the window
title
The title text to be displayed in the TitleBar
closeButton
Controls whether a close button will be displayed in the TitleBar
listener
A listener object to be passed to the content Form
contentInitProps
A property bag to be passed to the content Form on instanciation
options
A property bag to set options on the window on instanciation, an objects with the attributes:
width width of the window, if not specified the window will default to the sizeof its content height height of the window, if not specified the window will default to the sizeof its content sizable controls whether the user can resize the window, if not specified the window is not resizable statusbar controls whether the statusbar is displayed, if not specified the statusbar is not shown show Whether the window is initially shown. Optional, the default is true. id The unique id of this window instance. Optional, the system will automatically generate a name.
owner
A reference to the form or control thaat "owns" or created this window(optional)
returnFunction
returnFucntion A DialogResultEvent event handler that will be invoked when the window closes.
If owner is set the function will be invoked in the context of the owner.
Returns:
A reference to the newly created window

createWindow

public static function createWindow(content,
 title: String,
 closeButton: Boolean,
 listener: Object,
 contentInitProps: Object,
 options: Object,
 owner: Object,
 returnFunction: Function)
Displays the standard non modal dialog/window

Parameters:
content
The class or linkageId of the content Form to be loaded into the window
title
The title text to be displayed in the TitleBar
closeButton
Controls whether a close button will be displayed in the TitleBar
listener
A listener object to be passed to the content Form
contentInitProps
A property bag to be passed to the content Form on instanciation
options
A property bag to set options on the window on instanciation, an objects with the attributes:
width width of the window, if not specified the window will default to the sizeof its content
height height of the window, if not specified the window will default to the sizeof its content
sizable controls whether the user can resize the window, if not specified the window is not sizable
statusbar controls whether the statusbar is displayed, if not specified the statusbar is not shown
id The unique id of this window instance. Optional, the system will automatically generate a name.
show Whether the window is initially shown. Optional, the default is true.
hideOnExit Whether the window is will be hidden rather than destroyed on exit
owner
A reference to the form or control thaat "owns" or created this window(optional)
returnFunction
returnFucntion A DialogResultEvent event handler that will be invoked when the window closes.
If owner is set the function will be invoked in the context of the owner.
Returns:
A reference to the newly created window

getClass

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

Overrides:

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.

Overrides:

hide

public function hide(): Void
Hides the window. Deactivates it and hides its content. For modal windows you should call close.

onMouseActivate

public function onMouseActivate()
Called when mouse activated

processEnterKey

public function processEnterKey()
Process enter key event

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

Overrides:

processEscapeKey

public function processEscapeKey()
Process escape key event

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

Overrides:

show

public function show(): Void
Shows the window. Activates it, bring sit to the top fo the z-order and sets focus to the content


The documentation was generated from the following file:


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