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
| Name | Type | get | set | Descripton |
acceptButton | | ![]() | ![]() | The 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. |
allowBrowserContextMenu | Boolean | ![]() | ![]() | Decides 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. |
cancelButton | | ![]() | ![]() | The 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. |
caption | String | ![]() | ![]() | The title text on the application window |
fullScreen | Boolean | ![]() | Whether the window is in full screen or not. This is currently not supported | |
glassPaneVisible | Boolean | ![]() | ![]() | Whether to hide or show the glass pane. The glass pane is shown automatically when using dialogs. |
globalCursor | String | ![]() | ![]() | Setting 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. |
menuBar | | ![]() | ![]() | The menu bar of this window. |
resizable | Boolean | ![]() | Whether the window can be resized by the user. This is currently not supported |
Methods
| Name | Description |
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. |
addMenuBar | Adds a menu bar to this window |
close | Close the window. Some browsers allow this and some don't. Don't rely on this. |
print | Sends the content of the window to the printer |
removeCommand | Removes a command from the window. |
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 |
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
| Name | Type | Optional | Default | Descripton |
c | | The command to add |
Return Type
void
addMenuBar
Adds a menu bar to this window
Syntax
object.addMenuBar ( oMenuBar,oBefore ) Parameters
| Name | Type | Optional | Default | Descripton |
oMenuBar | | The menu bar to add | ||
oBefore | | If 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
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
| Name | Type | Optional | Default | Descripton |
c | | The 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
| Name | Type | Optional | Default | Descripton |
oDialog | | The dialog window to hide or remove | ||
bVisible | Boolean | Whether to hide or show the glass pane |
Return Type
void
