BiApplicationWindow

This class represents the actual browser window hosting the application

This class extends BiComponent and therefore all methods and fields available for BiComponent are also available for BiApplicationWindow .

Constructor

new BiApplicationWindow ( )

Parameters

No parameters.

Properties

NameTypegetsetDescripton
acceptButtonBiEventTargetcheckedcheckedThe button that acts as the default accept button. If this is set then the action event is dispatched from the accept button when the enter key is pressed. This does not have to be a BiButton, any BiEventTarget will work.
allowBrowserContextMenuBooleancheckedcheckedDecides whether the browser context menu should be shown by default. If this is set to true you can still prevent the browser context menu from being shown by calling preventDefault on the event object used in the contextmenu event.
cancelButtonBiEventTargetcheckedcheckedThe button that acts as the default cancel button. If this is set then the action event is dispatched from the cancel button. This does not have to be a BiButton, any BiEventTarget will work.
captionStringcheckedcheckedThe title text on the application window
fullScreenBooleancheckedWhether the window is in full screen or not. This is currently not supported
glassPaneVisibleBooleancheckedcheckedWhether to hide or show the glass pane. The glass pane is shown automatically when using dialogs.
globalCursorStringcheckedcheckedSetting the global cursor will make the mouse pointer use the given cursor for all the components and thus overriding the cursor property of the component.
menuBarBiMenuBarcheckedcheckedThe menu bar of this window.
resizableBooleancheckedWhether the window can be resized by the user. This is currently not supported

Methods

NameDescription
addCommandAdding a command to the window allows the window to execute the command when the user presses the needed keys. Commands are added to the application window by default so this is only needed to be called if the command previously was added to an internal window.
addMenuBarAdds a menu bar to this window
closeClose the window. Some browsers allow this and some don't. Don't rely on this.
printSends the content of the window to the printer
removeCommandRemoves a command from the window.
updateGlassPaneThe glass pane is used to prevent clicking on components. It is usually used with dialogs to make them application modal. This method takes a dialog and whether to hide or show the glass pane

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

Although BiApplicationWindow extends BiComponent it cannot be added to another component as a child. Also, some methods from BiComponent do not apply. Currently known properties and methods that do not apply: visible zIndex previousSibling nextSibling parent

Method Details

addCommand

Adding a command to the window allows the window to execute the command when the user presses the needed keys. Commands are added to the application window by default so this is only needed to be called if the command previously was added to an internal window.

Syntax

object.addCommand ( c )

Parameters

NameTypeOptionalDefaultDescripton
cBiCommandThe command to add

Return Type

void

addMenuBar

Adds a menu bar to this window

Syntax

object.addMenuBar ( oMenuBar,oBefore )

Parameters

NameTypeOptionalDefaultDescripton
oMenuBarBiMenuBarThe menu bar to add
oBeforeBiComponentIf this isn't null the menu bar should be added before this component.

Return Type

void

close

Close the window. Some browsers allow this and some don't. Don't rely on this.

Syntax

object.close ( )

Parameters

No arguments.

Return Type

void

print

Sends the content of the window to the printer

Syntax

object.print ( )

Parameters

No arguments.

Return Type

void

removeCommand

Removes a command from the window.

Syntax

object.removeCommand ( c )

Parameters

NameTypeOptionalDefaultDescripton
cBiCommandThe command to remove

Return Type

void

updateGlassPane

The glass pane is used to prevent clicking on components. It is usually used with dialogs to make them application modal. This method takes a dialog and whether to hide or show the glass pane

Syntax

object.updateGlassPane ( oDialog,bVisible )

Parameters

NameTypeOptionalDefaultDescripton
oDialogBiDialogThe dialog window to hide or remove
bVisibleBooleanWhether to hide or show the glass pane

Return Type

void