com.bjc.mdi

class BJCMDIContainerVars

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

All Known Subclasses: BJCMDIContainerBase

class BJCMDIContainerVars
extends UIComponent

Usage:
for( var i=0; i<5; i++ )
{
	myBJCMDI.addWindowID( "win" + i, "clip" + i, "Window" + i, null, null ); // Adds 5 windows to the component
	myBJCMDI.moveWindowTo( "win" + i, i*10, i*10 ); // Move windows
}


Author:
Flashloaded - www.flashloaded.com

Version:
1.4.0


Constructor


BJCMDIContainerVars ( )
Constructor

Method Summary

public
addCallbackItem ( title: String, menuID: String, callback: String, arg: String ): Void
This method may be used to add a callback item to a menu window.

public
addMenu ( menuID: String, title: String, width: Number ): Void
This method may be used to add a menu window to the component.

public
addOpenWinItem ( title: String, menuID: String, windowToBeOpened: String ): Void
This method may be used to add a window opener item to a menu window.

public
addWindowCustom ( name: String, target: String, local: Boolean, title: String, ww: Number, wh: Number, resizable: Boolean, scaleContentOnResize: Boolean, lockProportions: Boolean, offsetX: Number, offsetY: Number, contentMasking: Boolean ): Void
This method may be used to add a customized window to the component.

public
addWindowID ( name: String, id: String, title: String, cw: Number, ch: Number ): Void
This method may be used to add a window to the component by linkage id.

public
addWindowMC ( name: String, target: String, title: String, cw: Number, ch: Number ): Void
This method may be used to add a window with external content to the component.

public
addWindowModal ( name: String, id: String, title: String, cw: Number, ch: Number ): Void
This method may be used to add a modal window to the component.

public
disableContainer ( ): Void
This method may be used to disable the component.

public
enableContainer ( ): Void
This method may be used to enable the component.

public
getContent ( name: String ): MovieClip
This method may be used to get the path of the content clip of a specified window.

public
hideAllWindows ( ): Void
This method may be used to hide all windows in the component.

public
hideWindow ( name: String ): Void
This method may be used to hide a window.

public
maximizeWindow ( name: String ): Void
This method may be used to maximize a window.

public
minimizeWindow ( name: String ): Void
This method may be used to minimize a window.

public
removeAll ( ): Void
This method may be used to remove all items from the component.

public
removeWindow ( name: String ): Void
This method may be used to remove a window from the component.

public
setAlpha ( name: String, alpha: Number ): Void
This method may be used to set the transperacy of a window.

public
setSize ( w: Number, h: Number ): Void
This method may be used to set the component size.

public
setStatusMsg ( name: String, msg: String ): Void
This method may be used to set the status message of a window.

public
showAllWindows ( ): Void
This method may be used to show all windows in the component.

public
showWindow ( name: String, statusVisible: Boolean ): Void
This method may be used to show a window.

public
viewStatus ( name: String, statusVisible: Boolean ): Void
This method may be used to set the visibility of a status message.

public
viewWindowButtons ( name: String, view: Boolean ): Void
This method may be used to hide or show the top bar buttons of a window.



Constructor Documentation

BJCMDIContainerVars

function BJCMDIContainerVars()
Constructor


Method Documentation

addCallbackItem

public function addCallbackItem(title: String,
 menuID: String,
 callback: String,
 arg: String): Void
This method may be used to add a callback item to a menu window.

This method may be used to add a menu item that calls a specified callback function.

Usage:
myBJCMDI.addCallbackItem( "Call function 1", "menu1", "_root.func1", "callBackItem1" );

Parameters:
title
The title of the menu item.
menuID
The menu window that the item will be added to.
callback
The function to be called by the menu item.
arg
The argument to be sent to the callback function.
Returns:
Nothing.

addMenu

public function addMenu(menuID: String,
 title: String,
 width: Number): Void
This method may be used to add a menu window to the component.

This method may be used to add a menu window to the MDI component. The menu may be added window opening items and function caliing items.

Usage:
myBJCMDI.addMenu( "menu1", "Menu 1", 200 );

Parameters:
menuID
The instance name of the menu window.
title
The title of the menu window.
width
The width of the menu window. The width of the menu items will related to this width.
Returns:
Nothing.

addOpenWinItem

public function addOpenWinItem(title: String,
 menuID: String,
 windowToBeOpened: String): Void
This method may be used to add a window opener item to a menu window.

This method may be used to add a window opener item that shows a specified window. If the specified window is already visible, the menu item may maximize the window and set it on the top of the window stack.

Usage:
myBJCMDI.addOpenWinItem( "Open window 1", "menu1", "win1" );

Parameters:
title
The title of the menu item.
menuID
The menu window that the item will be added to.
windowToBeOpened
The window to be showed by the menu item.
Returns:
Nothing.

addWindowCustom

public function addWindowCustom(name: String,
 target: String,
 local: Boolean,
 title: String,
 ww: Number,
 wh: Number,
 resizable: Boolean,
 scaleContentOnResize: Boolean,
 lockProportions: Boolean,
 offsetX: Number,
 offsetY: Number,
 contentMasking: Boolean): Void
This method may be used to add a customized window to the component.

This method may be used to add a window to the MDI component and set the window content by linkage id or url to an external content. The window is hidden by the default. The window may be viewed with the showWindow method. You can place on your content clip the callback functions 'onHide', 'onShow', 'onFocus', 'onBlur' and 'onResize'. These functions will be called when the actions related to the function names will occure. The 'onResize' function will be called when a user drags the resizing corner and the function will be called with the variables 'contentWidth' and 'contentHeight'.

Usage:
myBJCMDI.addWindowCustom( "win1", "contentClip1.swf", false, "Window 1", 200, 200, true, true, true, 0, 0, true, "var1:value1", "var2:value2" );

Parameters:
name
The instance name of the window.
target
The url to an external clip or the linkage id of the content movie clip.
local
The A boolean that defines if the content clip will be added by a linkage id. If set to true, the linkage id will be used. If set to false, the content will be loaded from an external location.
title
The title of the window.
ww
The width of the window. If set to null, the window width will be related to the content clip width.
wh
The height of the window. If set to null, the window height will be related to the content clip height.
resizable
A boolean that defines if the content clip will be resized when the window is resized by user.
scaleContentOnResize
A boolean that defines if the scale ratio of the content clip will be considered when the window measures are defined.
lockProportions
The horizontal offset amount of the content clip.
offsetX
The vertical offset amount of the content clip.
offsetY
A boolean that defines if the content clip will be masked.
contentMasking
The variables to be sent to the content movie clip of the window. A variables and the variable values are separated with a colon. The variable arguments are optional. Separate different variables with a comma.
Returns:
Nothing.

addWindowID

public function addWindowID(name: String,
 id: String,
 title: String,
 cw: Number,
 ch: Number): Void
This method may be used to add a window to the component by linkage id.

This method may be used to add a window to the MDI component and set the window content by linkage id. The window is hidden by the default. The window may be viewed with the showWindow method.

Usage:
myBJCMDI.addWindowID( "win1", "contentClip1", "Window 1", null, null, "var1:value1", "var2:value2" );

Parameters:
name
The instance name of the window.
id
The linkage id of the content movie clip.
title
The title of the window.
cw
The width of the window. If set to null, the window width will be related to the content clip width.
ch
The height of the window. If set to null, the window height will be related to the content clip height.
Returns:
Nothing.

addWindowMC

public function addWindowMC(name: String,
 target: String,
 title: String,
 cw: Number,
 ch: Number): Void
This method may be used to add a window with external content to the component.

This method may be used to add a window to the MDI component and load the window content from an external location. The window is hidden by the default. The window may be viewed with the showWindow method.

Usage:
myBJCMDI.addWindowMC( "win1", "contentClip1.swf", "Window 1", null, null, "var1:value1", "var2:value2" );

Parameters:
name
The instance name of the window.
target
The location of the content movie clip.
title
The title of the window.
cw
The width of the window. If set to null, the window width will be related to the content clip width.
ch
The height of the window. If set to null, the window height will be related to the content clip height.
Returns:
Nothing.

addWindowModal

public function addWindowModal(name: String,
 id: String,
 title: String,
 cw: Number,
 ch: Number): Void
This method may be used to add a modal window to the component.

This method may be used to add a modal window to the MDI component and set the window content by linkage id. The modal window works as a message box. The modal window must be closed to enable other windows. The enabling of other windows can be accomplished by calling the removeWindow method with the instance name of the modal window. The same effect will take place when clicking the close button of the modal window.

Usage:
myBJCMDI.addWindowModal( "win1", "contentClip1", "Window 1", null, null, "var1:value1", "var2:value2" );

Parameters:
name
The instance name of the window.
id
The linkage id of the content movie clip.
title
The title of the window.
cw
The width of the window. If set to null, the window width will be related to the content clip width.
ch
The height of the window. If set to null, the window height will be related to the content clip height.
Returns:
Nothing.

disableContainer

public function disableContainer(): Void
This method may be used to disable the component.

Usage:
myBJCMDI.disableContainer();

Returns:
Nothing.

enableContainer

public function enableContainer(): Void
This method may be used to enable the component.

Usage:
myBJCMDI.enableContainer();

Returns:
Nothing.

getContent

public function getContent(name: String): MovieClip
This method may be used to get the path of the content clip of a specified window.

Usage:
myVar = myBJCMDI.getContent( "win1" );

Parameters:
name
The window name of which content clip path will be returned.
Returns:
The path of the content clip of a specified window.

hideAllWindows

public function hideAllWindows(): Void
This method may be used to hide all windows in the component.

Usage:
myBJCMDI.hideAllWindows();

Returns:
Nothing.

hideWindow

public function hideWindow(name: String): Void
This method may be used to hide a window.

This method may be used to hide a window in the MDI component. If the 'Remove on close' property of the MDI component is set to 'true', the window and its content will be removed from the MDI component. Otherwise the window will only be hidden from users, and it will remain in the component. Removing the windows will free some resources on your computer but might slow the use of the component in cases of loaded contents. To specify the removeOnClose mode of a spesific window, use the 'setRemoveOnClose' method.

Usage:
myBJCMDI.hideWindow( "win1" );

Parameters:
name
The name of the window to be hidden.
Returns:
Nothing.

maximizeWindow

public function maximizeWindow(name: String): Void
This method may be used to maximize a window.

This method may be used to maximize a window in the MDI component. A maximized window is showed fully. The status bar will be showed if the status bar of the window is enabled.

Usage:
myBJCMDI.maximizeWindow( "win1" );

Parameters:
name
The name of the window to be maximized.
Returns:
Nothing.

minimizeWindow

public function minimizeWindow(name: String): Void
This method may be used to minimize a window.

This method may be used to minimize a window in the MDI component. Only the top bar, the title and the buttons of a minimized window will remain visible.

Usage:
myBJCMDI.minimizeWindow( "win1" );

Parameters:
name
The name of the window to be minimized.
Returns:
Nothing.

removeAll

public function removeAll(): Void
This method may be used to remove all items from the component.

Usage:
myBJCMDI.removeAll();

Returns:
Nothing.

removeWindow

public function removeWindow(name: String): Void
This method may be used to remove a window from the component.

This method may be used to remove a window from the MDI component. If the removed window is a modal window, the other windows may be enabled. Enabling of other windows occurs when all the message boxes and modal windows are removed. However this method may not be used with message, question or input boxes. These items will be closed by their own actions.

Usage:
myBJCMDI.removeWindow( "win1" );

Parameters:
name
The name of the window to be removed.
Returns:
Nothing.

setAlpha

public function setAlpha(name: String,
 alpha: Number): Void
This method may be used to set the transperacy of a window.

Usage:
myBJCMDI.setAlpha( "win1", 50 );

Parameters:
name
The name of the window of which transperacy will be changed.
alpha
Returns:
Nothing.

setSize

public function setSize(w: Number,
 h: Number): Void
This method may be used to set the component size.

Usage:
myBJCMDI.setSize( 400, 300 );

Parameters:
w
The width of the component.
h
The height of the component.
Returns:
Nothing.

setStatusMsg

public function setStatusMsg(name: String,
 msg: String): Void
This method may be used to set the status message of a window.

This method may be used to set a window's status message. If the status bar is disabled, the status message may be showd with the viewStatus method.

Usage:
myBJCMDI.setStatusMsg( "win1", "Hello!" );

Parameters:
name
The name of the window of which status message will change.
msg
Returns:
Nothing.

showAllWindows

public function showAllWindows(): Void
This method may be used to show all windows in the component.

Usage:
myBJCMDI.showAllWindows();

Returns:
Nothing.

showWindow

public function showWindow(name: String,
 statusVisible: Boolean): Void
This method may be used to show a window.

This method may be used to show a window in the MDI component. If the view argument is set to 'true', the status bar of the window will be enabled. Otherwise the status bar will be hidden.

Usage:
myBJCMDI.showWindow( "win1", false );

Parameters:
name
The name of the window to be shown.
statusVisible
Returns:
Nothing.

viewStatus

public function viewStatus(name: String,
 statusVisible: Boolean): Void
This method may be used to set the visibility of a status message.

Usage:
myBJCMDI.viewStatus( "win1", false );

Parameters:
name
The name of the window of which status message visibility will change.
statusVisible
Returns:
Nothing.

viewWindowButtons

public function viewWindowButtons(name: String,
 view: Boolean): Void
This method may be used to hide or show the top bar buttons of a window.

Usage:
myBJCMDI.viewWindowButtons( "win1", false );

Parameters:
name
The name of the window of which button visibility will change.
view
Returns:
Nothing.