BiWindowManager
This class can be used with internal windows to provide more features.
This class extends BiEventTarget and therefore all methods and fields available for BiEventTarget are also available for BiWindowManager .
Constructor
new BiWindowManager ( [ oComponent ] )
Parameters
| Name | Type | Optional | Default | Descripton |
oComponent | | ![]() | This is the component that is the container for the windows. Do not use the window manager before a valid component is set. |
Properties
| Name | Type | get | set | Descripton |
activeWindow | | ![]() | ![]() | The window that is currently active. This might be null if no window is active. |
component | | ![]() | ![]() | The component that the windows are added to |
stringBundle | | ![]() | ![]() | The string bundle to use for this window manager. If this is set to null then the string bundle for application is used. |
windows | | ![]() | Returns an array with the windows managed by the window manager. | |
windowsMenu | | ![]() | This returns a menu that contains items for commands as well as menu items for all the windows. This can be used to switch between the windows and organize the windows. This menu can be added to a menu bar, as a sub menu or used as a context menu. |
Methods
| Name | Description |
activateNext | Activates the next logical window |
activatePrevious | Activates the previous logical window |
add | Adds a window to the window manager. Added windows are then managed by the window manager. |
cascade | Cascades the visible windows. |
closeAll | Closes all the windows. |
getLastState | Returns the last state (non minimized state) for the window. This is used to know to what state the window should return to once it is restored from minimized. |
minimizeAll | Minimizes all the windows. |
remove | Removes a window from the window manager. The window is no longer managed by the window manager. Closing a window automatically removes it from the window manager. The method returns the removed window. |
tileHorizontally | Tiles the visible windows horizontally. |
tileVertically | Tiles the visible windows vertically. |
Events
| Name | Type | Bubbles | Descripton |
activation | | The window manager has become activated. E.g. one of its windows is activated. | |
deactivation | | The window manager is deactivated. You have left it and can no longer manipulate its windows via keyboard shortcuts etc.. |
Static Methods
None.
Static Fields
None.
Remarks
Adding a window to a component that has a window manager does not automatically add the window to the window manager. The window needs to be added to the parent component as well as to the window manager. You might want to use the BiDesktopPane which is a component that handles the adding and removing of the windows for you. The labels for the windows menu items are provided by a BiStringBundle and the following keys are used: WindowManagerCascade - Cascade label text WindowManagerCascadeMnemonic - Cascade label mnemonic WindowManagerTileHorizontally - Tile horizontally label text WindowManagerTileHorizontallyMnemonic - Tile horizontally label mnemonic WindowManagerTileVertically - Tile vertically label text WindowManagerTileVerticallyMnemonic - Tile vertically label mnemonic WindowManagerMinimizeAll - Minimize all label text WindowManagerMinimizeAllMnemonic - Minimize all label mnemonic WindowManagerCloseAll - Close all label text WindowManagerCloseAllMnemonic - Close all label mnemonic
Method Details
activateNext
Activates the next logical window
Syntax
object.activateNext ( oWindow ) Parameters
| Name | Type | Optional | Default | Descripton |
oWindow | | The window to activate the next from |
Return Type
void
activatePrevious
Activates the previous logical window
Syntax
object.activatePrevious ( oWindow ) Parameters
| Name | Type | Optional | Default | Descripton |
oWindow | | The window to activate the previous from |
Return Type
void
add
Adds a window to the window manager. Added windows are then managed by the window manager.
Syntax
object.add ( oWindow ) Parameters
| Name | Type | Optional | Default | Descripton |
oWindow | | The window to add to the window manager |
Return Type
void
cascade
Cascades the visible windows.
Syntax
object.cascade ( ) Parameters
No arguments.
Return Type
void
closeAll
Closes all the windows.
Syntax
object.closeAll ( ) Parameters
No arguments.
Return Type
void
getLastState
Returns the last state (non minimized state) for the window. This is used to know to what state the window should return to once it is restored from minimized.
Syntax
object.getLastState ( oWindow ) Parameters
| Name | Type | Optional | Default | Descripton |
oWindow | | The window to get the state for |
Return Type
String
minimizeAll
Minimizes all the windows.
Syntax
object.minimizeAll ( ) Parameters
No arguments.
Return Type
void
remove
Removes a window from the window manager. The window is no longer managed by the window manager. Closing a window automatically removes it from the window manager. The method returns the removed window.
Syntax
object.remove ( oWindow ) Parameters
| Name | Type | Optional | Default | Descripton |
oWindow | | The window to remove from the window manager |
Return Type
tileHorizontally
Tiles the visible windows horizontally.
Syntax
object.tileHorizontally ( ) Parameters
No arguments.
Return Type
void
tileVertically
Tiles the visible windows vertically.
Syntax
object.tileVertically ( ) Parameters
No arguments.
Return Type
void
