Frees the resources allocated by this window. If window is visible, it will close it first. The window will no longer be available with application.getWindow('windowName') and will no longer be usable.
The main application window cannot be destroyed. |
|
|
Sample var getWindow = application.getWindow("someWindowName");
getWindow.destroy();
getWindow = application.getWindow("someWindowName");
if (getWindow == null) {
application.output("Window has been destroyed");
} else {
application.output("Window could not be destroyed");
} |
|
|
|
|
Sample var someWindow = application.createWindow("someWindowName", JSWindow.WINDOW, null);
someWindow.setInitialBounds(200, 200, 450, 350);
controller.show(someWindow);
var name = "Name: " + someWindow.getName() + "\n"
var parent = "Parent: " + (someWindow.getParent() == null ? "none" : someWindow.getParent()) + "\n"
var type = "TypeNumber: " + someWindow.getType() + "\n"
var height = "Height: " + someWindow.getHeight() + "\n"
var width = "Width: " + someWindow.getWidth() + "\n"
var undecorated = "Undecorated: " + someWindow.isUndecorated() + "\n"
var locationX = "Location-X-coordinate: " + someWindow.getX() + "\n"
var locationY = "Location-Y-coordinate: " + someWindow.getY() + "\n"
var info = name + parent + type + height + width + locationX + locationY + undecorated + "\n"
var closeMsg = "Press 'Ok' to close this dialog."
var infoDialog = plugins.dialogs.showInfoDialog("Window Info", info + closeMsg, "Ok");
if (infoDialog == "Ok") someWindow.close() |
|
|
|
|
Returns the window name. It will be null in case of main application frame. |
|
|
Sample var someWindow = application.createWindow("someWindowName", JSWindow.WINDOW, null);
someWindow.setInitialBounds(200, 200, 450, 350);
controller.show(someWindow);
var name = "Name: " + someWindow.getName() + "\n"
var parent = "Parent: " + (someWindow.getParent() == null ? "none" : someWindow.getParent()) + "\n"
var type = "TypeNumber: " + someWindow.getType() + "\n"
var height = "Height: " + someWindow.getHeight() + "\n"
var width = "Width: " + someWindow.getWidth() + "\n"
var undecorated = "Undecorated: " + someWindow.isUndecorated() + "\n"
var locationX = "Location-X-coordinate: " + someWindow.getX() + "\n"
var locationY = "Location-Y-coordinate: " + someWindow.getY() + "\n"
var info = name + parent + type + height + width + locationX + locationY + undecorated + "\n"
var closeMsg = "Press 'Ok' to close this dialog."
var infoDialog = plugins.dialogs.showInfoDialog("Window Info", info + closeMsg, "Ok");
if (infoDialog == "Ok") someWindow.close() |
|
|
|
|
Returns the parent JSWindow, if available. |
|
|
Returns JSWindow - the parent JSWindow, if available. If there is no parent JSWindow, it will return null. |
|
|
Sample var someWindow = application.createWindow("someWindowName", JSWindow.WINDOW, null);
someWindow.setInitialBounds(200, 200, 450, 350);
controller.show(someWindow);
var name = "Name: " + someWindow.getName() + "\n"
var parent = "Parent: " + (someWindow.getParent() == null ? "none" : someWindow.getParent()) + "\n"
var type = "TypeNumber: " + someWindow.getType() + "\n"
var height = "Height: " + someWindow.getHeight() + "\n"
var width = "Width: " + someWindow.getWidth() + "\n"
var undecorated = "Undecorated: " + someWindow.isUndecorated() + "\n"
var locationX = "Location-X-coordinate: " + someWindow.getX() + "\n"
var locationY = "Location-Y-coordinate: " + someWindow.getY() + "\n"
var info = name + parent + type + height + width + locationX + locationY + undecorated + "\n"
var closeMsg = "Press 'Ok' to close this dialog."
var infoDialog = plugins.dialogs.showInfoDialog("Window Info", info + closeMsg, "Ok");
if (infoDialog == "Ok") someWindow.close() |
|
|
|
|
Returns Number - the window type. Can be one of JSWindow.DIALOG, JSWindow.MODAL_DIALOG, JSWindow.WINDOW. |
|
|
Sample var someWindow = application.createWindow("someWindowName", JSWindow.WINDOW, null);
someWindow.setInitialBounds(200, 200, 450, 350);
controller.show(someWindow);
var name = "Name: " + someWindow.getName() + "\n"
var parent = "Parent: " + (someWindow.getParent() == null ? "none" : someWindow.getParent()) + "\n"
var type = "TypeNumber: " + someWindow.getType() + "\n"
var height = "Height: " + someWindow.getHeight() + "\n"
var width = "Width: " + someWindow.getWidth() + "\n"
var undecorated = "Undecorated: " + someWindow.isUndecorated() + "\n"
var locationX = "Location-X-coordinate: " + someWindow.getX() + "\n"
var locationY = "Location-Y-coordinate: " + someWindow.getY() + "\n"
var info = name + parent + type + height + width + locationX + locationY + undecorated + "\n"
var closeMsg = "Press 'Ok' to close this dialog."
var infoDialog = plugins.dialogs.showInfoDialog("Window Info", info + closeMsg, "Ok");
if (infoDialog == "Ok") someWindow.close() |
|
|
|
|
Sample var someWindow = application.createWindow("someWindowName", JSWindow.WINDOW, null);
someWindow.setInitialBounds(200, 200, 450, 350);
controller.show(someWindow);
var name = "Name: " + someWindow.getName() + "\n"
var parent = "Parent: " + (someWindow.getParent() == null ? "none" : someWindow.getParent()) + "\n"
var type = "TypeNumber: " + someWindow.getType() + "\n"
var height = "Height: " + someWindow.getHeight() + "\n"
var width = "Width: " + someWindow.getWidth() + "\n"
var undecorated = "Undecorated: " + someWindow.isUndecorated() + "\n"
var locationX = "Location-X-coordinate: " + someWindow.getX() + "\n"
var locationY = "Location-Y-coordinate: " + someWindow.getY() + "\n"
var info = name + parent + type + height + width + locationX + locationY + undecorated + "\n"
var closeMsg = "Press 'Ok' to close this dialog."
var infoDialog = plugins.dialogs.showInfoDialog("Window Info", info + closeMsg, "Ok");
if (infoDialog == "Ok") someWindow.close() |
|
|
|
|
Returns the x coordinate. |
|
|
Sample var someWindow = application.createWindow("someWindowName", JSWindow.WINDOW, null);
someWindow.setInitialBounds(200, 200, 450, 350);
controller.show(someWindow);
var name = "Name: " + someWindow.getName() + "\n"
var parent = "Parent: " + (someWindow.getParent() == null ? "none" : someWindow.getParent()) + "\n"
var type = "TypeNumber: " + someWindow.getType() + "\n"
var height = "Height: " + someWindow.getHeight() + "\n"
var width = "Width: " + someWindow.getWidth() + "\n"
var undecorated = "Undecorated: " + someWindow.isUndecorated() + "\n"
var locationX = "Location-X-coordinate: " + someWindow.getX() + "\n"
var locationY = "Location-Y-coordinate: " + someWindow.getY() + "\n"
var info = name + parent + type + height + width + locationX + locationY + undecorated + "\n"
var closeMsg = "Press 'Ok' to close this dialog."
var infoDialog = plugins.dialogs.showInfoDialog("Window Info", info + closeMsg, "Ok");
if (infoDialog == "Ok") someWindow.close() |
|
|
|
|
Returns the y coordinate. |
|
|
Sample var someWindow = application.createWindow("someWindowName", JSWindow.WINDOW, null);
someWindow.setInitialBounds(200, 200, 450, 350);
controller.show(someWindow);
var name = "Name: " + someWindow.getName() + "\n"
var parent = "Parent: " + (someWindow.getParent() == null ? "none" : someWindow.getParent()) + "\n"
var type = "TypeNumber: " + someWindow.getType() + "\n"
var height = "Height: " + someWindow.getHeight() + "\n"
var width = "Width: " + someWindow.getWidth() + "\n"
var undecorated = "Undecorated: " + someWindow.isUndecorated() + "\n"
var locationX = "Location-X-coordinate: " + someWindow.getX() + "\n"
var locationY = "Location-Y-coordinate: " + someWindow.getY() + "\n"
var info = name + parent + type + height + width + locationX + locationY + undecorated + "\n"
var closeMsg = "Press 'Ok' to close this dialog."
var infoDialog = plugins.dialogs.showInfoDialog("Window Info", info + closeMsg, "Ok");
if (infoDialog == "Ok") someWindow.close() |
|
|
|
|
Hides the window. It can be shown again using window.show(), controller.show() or controller.showRecords(). The main application window cannot be hidden. |
|
|
Returns Boolean - Boolean true if the window was successfully closed and false otherwise. |
|
|
Sample //creates and shows a window for 3 seconds before closing it
var win = application.createWindow("someWindowName", JSWindow.WINDOW, null);
win.setInitialBounds(200, 200, 450, 350);
controller.show(win);
application.sleep(3000);
win.hide(); |
|
|
|
|
Returns true if the window is visible, false otherwise. |
|
|
Returns Boolean - true if the window is visible, false otherwise. |
|
|
Sample var someWindow = application.getWindow("someWindowName");
if (someWindow.isVisible() == false) {
controller.show(someWindow);
someWindow.resizable = false;
} |
|
|
|
|
Deletes the window's currently stored bounds. It will only affect the next show of the window. |
|
|
Sample var win1 = application.createWindow("Window 1", JSWindow.DIALOG, null);
win1.title = "Window 1";
win1.setInitialBounds(200, 200, 400, 600);
win1.storeBounds = true;
if (newSolutionVersion) win1.resetBounds();
win1.show(forms.myform); |
|
|
|
|
Sets the initial window bounds. The initial bounds are only used the first time this window is shown (what first show means depends on storeBounds property). |
|
|
Parameters {Number} x - the initial x coordinate of the window. Can be JSWindow.DEFAULT, JSWindow.FULL_SCREEN. {Number} y - the initial y coordinate of the window. Can be JSWindow.DEFAULT, JSWindow.FULL_SCREEN. {Number} width - the initial width of the window. Can be JSWindow.DEFAULT, JSWindow.FULL_SCREEN. {Number} height - the initial height of the window. Can be JSWindow.DEFAULT, JSWindow.FULL_SCREEN. |
|
|
Sample var win = application.createWindow("myName", JSWindow.DIALOG);
win.setInitialBounds(20, 10, 300, 200);
forms.myForm.show(win); |
|
|
|
|
Sample var window = application.createWindow('test',JSWindow.DIALOG);
window.show(forms.child1);
window.setLocation(0,0);
window.setSize(400,600); |
|
|
|
|
Sample var window = application.createWindow('test',JSWindow.DIALOG);
window.show(forms.child1);
window.setLocation(0,0);
window.setSize(400,600); |
|
|
|
|
Shows the given form(form name, form object or JSForm) in this window. |
|
|
Parameters {Object} form - the form that will be shown inside this window. It can be a form name or a form object (actual form or JSForm). |
|
|
Sample win.show(forms.myForm);
// win.show("myForm"); |
|
|
|
|
Sets whether or not this window should have a text tool bar. Has no effect on web client or smart client main application frame. |
|
|
Parameters {Boolean} showTextToolbar - true if you want a text tool bar to be added to this window, false otherwise. |
|
|
Sample var win1 = application.createWindow("Window 1", JSWindow.WINDOW, null);
win1.setInitialBounds(200, 200, 450, 350);
win1.setTitle("Window 1");
win1.showTextToolbar(false);
controller.show(win1);
var win2 = application.createWindow("Window 2", JSWindow.WINDOW, null);
win2.setInitialBounds(500, 500, 450, 350);
win2.setTitle("Window 2");
win2.showTextToolbar(false);
controller.show(win2);
var win3 = application.createWindow("Window 3", JSWindow.WINDOW, null);
win3.setInitialBounds(650, 700, 450, 350);
win3.setTitle("Window 3");
win3.showTextToolbar(true);
controller.show(win3);
application.sleep(2000);
win3.toBack();
application.sleep(2000);
win1.toFront(); |
|
|
|
|
Shows this window behind other windows, if possible. |
|
|
Sample var win1 = application.createWindow("Window 1", JSWindow.WINDOW, null);
win1.setInitialBounds(200, 200, 450, 350);
win1.setTitle("Window 1");
win1.showTextToolbar(false);
controller.show(win1);
var win2 = application.createWindow("Window 2", JSWindow.WINDOW, null);
win2.setInitialBounds(500, 500, 450, 350);
win2.setTitle("Window 2");
win2.showTextToolbar(false);
controller.show(win2);
var win3 = application.createWindow("Window 3", JSWindow.WINDOW, null);
win3.setInitialBounds(650, 700, 450, 350);
win3.setTitle("Window 3");
win3.showTextToolbar(true);
controller.show(win3);
application.sleep(2000);
win3.toBack();
application.sleep(2000);
win1.toFront(); |
|
|
|
|
Bring this window in front of other windows, if possible. |
|
|
Sample var win1 = application.createWindow("Window 1", JSWindow.WINDOW, null);
win1.setInitialBounds(200, 200, 450, 350);
win1.setTitle("Window 1");
win1.showTextToolbar(false);
controller.show(win1);
var win2 = application.createWindow("Window 2", JSWindow.WINDOW, null);
win2.setInitialBounds(500, 500, 450, 350);
win2.setTitle("Window 2");
win2.showTextToolbar(false);
controller.show(win2);
var win3 = application.createWindow("Window 3", JSWindow.WINDOW, null);
win3.setInitialBounds(650, 700, 450, 350);
win3.setTitle("Window 3");
win3.showTextToolbar(true);
controller.show(win3);
application.sleep(2000);
win3.toBack();
application.sleep(2000);
win1.toFront(); |
|
|
|
|
|