com.bjc.mdi

class BJCMDIContainerBase

mx.core.UIComponent
  |
  +--com.bjc.mdi.BJCMDIContainerVars
        |
        +--com.bjc.mdi.BJCMDIContainerBase

All Known Subclasses: BJCMDIContainer

class BJCMDIContainerBase
extends BJCMDIContainerVars



Method Summary

public
addIcon ( x: Number, y: Number, iconLinkageID: String, iconIdentifier: String ): Void
This method may be used to add a desktop icon that shows a specified window.

public
addOpenWinIcon ( x: Number, y: Number, iconLinkageID: String, windowID: String ): Void
This method may be used to add a desktop icon that shows a specified window.

public
getPercentLoaded ( name: String ): Number
This method may be used to get the percentage of the loaded content of a window.

public
getWindowHeight ( name: String ): Number
This method may be used to get the height of a window.

public
getWindowWidth ( name: String ): Number
This method may be used to get the width of a window.

public
getXPosition ( name: String ): Number
This method may be used to get the horizontal position of a window.

public
getYPosition ( name: String ): Number
This method may be used to get the vertical position of a window.

public
moveWindowBy ( name: String, x: Number, y: Number ): Void
This method may be used to move a window by a specific number of pixels.

public
moveWindowTo ( name: String, x: Number, y: Number ): Void
This method may be used to move a window to a specific position.

public
setIconCallback ( cb: String ): Void
This method may be used to set function to be called by the desktop icons.

public
setRemoveOnClose ( name: String, mode: Boolean ): Void
This method may be used to set the RemoveOnClose mode of a window.

public
showInputBox ( title: String, width: Number, txt: String, ok_txt: String, cancel_txt: String, callback: String ): Void
This method may be used add an input box to the component.

public
showMsgBox ( title: String, width: Number, txt: String, ok_txt: String ): Void
This method may be used add a message box to the component.

public
showQuestionBox ( title: String, width: Number, txt: String, ok_txt: String, cancel_txt: String, callback: String ): Void
This method may be used add a question box to the component.

Methods inherited from class com.bjc.mdi.BJCMDIContainerVars

addCallbackItem, addMenu, addOpenWinItem, addWindowCustom, addWindowID, addWindowMC, addWindowModal, disableContainer, enableContainer, getContent, hideAllWindows, hideWindow, maximizeWindow, minimizeWindow, removeAll, removeWindow, setAlpha, setSize, setStatusMsg, showAllWindows, showWindow, viewStatus, viewWindowButtons



Method Documentation

addIcon

public function addIcon(x: Number,
 y: Number,
 iconLinkageID: String,
 iconIdentifier: String): Void
This method may be used to add a desktop icon that shows a specified window.

Following code will add a function calling icon to the MDI component. The icon will be set of the instance 'icon1' and it will call the function specified in the MDI parameters or the function specified with the setIconCallback method. The coordinates of the icon will be set to 100 right and 100 down from the top left corner of the MDI component. The argument 'callBackIcon1' will be sent to the callback function.

Usage:
myBJCMDI.addIcon( 100, 100, "winIcon1", "arg1" );

Parameters:
x
The horizontal position of the desktop icon.
y
The vertical position of the desktop icon.
iconLinkageID
The linkage id of an instance to be set as the desktop icon.
iconIdentifier
The argument to be sent to the callback function.
Returns:
Nothing.

addOpenWinIcon

public function addOpenWinIcon(x: Number,
 y: Number,
 iconLinkageID: String,
 windowID: String): Void
This method may be used to add a desktop icon that shows a specified window.

This method may be used to add a desktop icon that shows a specified window. If the specified window is already visible, the icon may maximize the window and set it on the top of the window stack. The icon is draggable so it can be moved manually once added. If you want to view the window name in the icon, make sure you have a textfield with the instance name of 'buttonTxt' in the icon clip.

Usage:
myBJCMDI.addOpenWinIcon( 100, 100, "winIcon1", "win1" );

Parameters:
x
The horizontal position of the desktop icon.
y
The vertical position of the desktop icon.
iconLinkageID
The linkage id of an instance to be set as the desktop icon.
windowID
The window to be showed by the desktop icon.
Returns:
Nothing.

getPercentLoaded

public function getPercentLoaded(name: String): Number
This method may be used to get the percentage of the loaded content of a window.

Usage:
myBJCMDI.getPercentLoaded( "win1" );

Parameters:
name
The window of which loaded content percentage will be returned.
Returns:
This method returns the percentage of the loaded content of a window.

getWindowHeight

public function getWindowHeight(name: String): Number
This method may be used to get the height of a window.

Usage:
myBJCMDI.getWindowHeight( "win1" );

Parameters:
name
The window of which height will be returned.
Returns:
This method returns the height of a window.

getWindowWidth

public function getWindowWidth(name: String): Number
This method may be used to get the width of a window.

Usage:
myBJCMDI.getWindowWidth( "win1" );

Parameters:
name
The window of which width will be returned.
Returns:
This method returns the width of a window.

getXPosition

public function getXPosition(name: String): Number
This method may be used to get the horizontal position of a window.

Usage:
myBJCMDI.getXPosition( "win1" );

Parameters:
name
The window of which horizontal position will be returned.
Returns:
This method returns the horizontal position of a window.

getYPosition

public function getYPosition(name: String): Number
This method may be used to get the vertical position of a window.

Usage:
myBJCMDI.getYPosition( "win1" );

Parameters:
name
The window of which vertical position will be returned.
Returns:
This method returns the vertical position of a window.

moveWindowBy

public function moveWindowBy(name: String,
 x: Number,
 y: Number): Void
This method may be used to move a window by a specific number of pixels.

Usage:
myBJCMDI.moveWindowBy( "win1", 100, 100 );

Parameters:
name
The window to be moved.
x
The number of pixels to be moved by horizontally.
y
The number of pixels to be moved by vertically.
Returns:
Nothing.

moveWindowTo

public function moveWindowTo(name: String,
 x: Number,
 y: Number): Void
This method may be used to move a window to a specific position.

Usage:
myBJCMDI.moveWindowTo( "win1", 100, 100 );

Parameters:
name
The window to be moved.
x
The horizontal position to be moved to.
y
The vertical position to be moved to.
Returns:
Nothing.

setIconCallback

public function setIconCallback(cb: String): Void
This method may be used to set function to be called by the desktop icons.

Usage:
myBJCMDI.setIconCallback( "cbFunc1" );

Parameters:
cb
The function to be called by the desktop function calling icons.
Returns:
Nothing.

setRemoveOnClose

public function setRemoveOnClose(name: String,
 mode: Boolean): Void
This method may be used to set the RemoveOnClose mode of a window.

This method may be used to set the RemoveOnClose mode of a window. If the mode is set to 'true', the window will be removed from the MDI component. If the mode is set to 'false', the window will only be hidden when closed. This method overrides the global 'Remove on close' property.

Usage:
myBJCMDI.setRemoveOnClose( "win1", true );

Parameters:
name
The window which removeOnClose will be set.
mode
A boolean that indicates the removeOnClose mode.
Returns:
Nothing.

showInputBox

public function showInputBox(title: String,
 width: Number,
 txt: String,
 ok_txt: String,
 cancel_txt: String,
 callback: String): Void
This method may be used add an input box to the component.

This method may be used add an input box to the MDI component. The input box will call the specified function with the user inserted input value if the ok-button is clicked, or null if the cancel-button is clicked. The input box will disable all regular windows until the input box will be closed by clicking a input button. The modal windows, message boxes, question boxes and input boxes will have their availability order. The first added item will be set the second one available while closed or answered and so on.

Usage:
myBJCMDI.showInputBox( "Input 1", 200, "This is the message", "YES", "NO", "_root.func1" );

Parameters:
title
The title of the input box.
width
The width of the input box.
txt
The message text.
ok_txt
The OK-button text of the input box.
cancel_txt
The CANCEL-button text of the input box.
callback
The function to be called by the input box.
Returns:
Nothing.

showMsgBox

public function showMsgBox(title: String,
 width: Number,
 txt: String,
 ok_txt: String): Void
This method may be used add a message box to the component.

This method may be used add a message box to the MDI component. The message box will disable all regular windows until the message box will be closed by clicking the message button. The modal windows, message boxes, question boxes and input boxes will have their availability order. The first added item will be set the second one available while closed or answered and so on.

Usage:
myBJCMDI.showMsgBox( "Message 1", 200, "This is the message", "OK" );

Parameters:
title
The title of the message box.
width
The width of the message box.
txt
The message text.
ok_txt
The message button text.
Returns:
Nothing.

showQuestionBox

public function showQuestionBox(title: String,
 width: Number,
 txt: String,
 ok_txt: String,
 cancel_txt: String,
 callback: String): Void
This method may be used add a question box to the component.

This method may be used add a question box to the MDI component. The question box will call the specified function with the boolean true if the ok-button is clicked, or false if the cancel-button is clicked. The question box will disable all regular windows until the question box will be closed by clicking a question button. The modal windows, message boxes, question boxes and input boxes will have their availability order. The first added item will be set the second one available while closed or answered and so on.

Usage:
myBJCMDI.showQuestionBox( "Question 1", 200, "This is the question", "YES", "NO", "_root.func1" );

Parameters:
title
The title of the question box.
width
The width of the question box.
txt
The question text.
ok_txt
The OK-button text of the question box.
cancel_txt
The CANCEL-button text of the question box.
callback
The function to be called by the question box.
Returns:
Nothing.