May 04, 2024 11:11 Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Parameters Supported Clients Sample Supported Clients Sample Supported Clients SampleSupported Clients
SmartClient
WebClient
NGClient
Constants Summary
Number
DEFAULT
Value used for x, y, width, height of initial bounds when you want the window to auto-determine bounds when shown for the first time.
Number
DIALOG
Window type constant that identifies a non-modal dialog type.
Number
FULL_SCREEN
Value that can be used for bounds in order to specify that a dialog/window should completely fill the screen.
Number
MODAL_DIALOG
Window type constant that identifies a modal dialog type.
Number
WINDOW
Window type constant that identifies a window type.
Property Summary
controller
controller
Get the current controller from the window/dialog.
Number
opacity
Gets/Sets the opacity property.
Boolean
resizable
Gets/Sets whether or not this window can be resized by the user (default true).
Boolean
storeBounds
Tells whether or not the bounds of this window should be stored/persisted (default false).
String
title
Gets/Sets the title text.
Boolean
transparent
Gets/Sets the transparency property.
Boolean
undecorated
Gets/Sets the undecorated property.
Methods Summary
void
destroy()
Frees the resources allocated by this window.
Number
getHeight()
Returns the height.
String
getName()
Returns the window name.
JSWindow
getParent()
Returns the parent JSWindow, if available.
Number
getType()
Returns the window type.
Number
getWidth()
Returns the width.
Number
getX()
Returns the x coordinate.
Number
getY()
Returns the y coordinate.
Boolean
hide()
Hides the window.
Boolean
isVisible()
Returns true if the window is visible, false otherwise.
void
resetBounds()
Deletes the window's currently stored bounds.
void
setInitialBounds(x, y, width, height)
Sets the initial window bounds.
void
setLocation(x, y)
Set the window location.
void
setSize(width, height)
Set the window size.
void
show(form)
Shows the given form(form name, form object or JSForm) in this window.
void
showTextToolbar(showTextToolbar)
Sets whether or not this window should have a text tool bar.
void
toBack()
Shows this window behind other windows, if possible.
void
toFront()
Bring this window in front of other windows, if possible.
Constants Details
DEFAULT
// show a dialog that self-determines bounds the first time it it open, then remembers last bounds for future show operations
var win = application.createWindow("myName", JSWindow.DIALOG);
win.setInitialBounds(JSWindow.DEFAULT, JSWindow.DEFAULT, JSWindow.DEFAULT, JSWindow.DEFAULT); // will be shown initially centred and with preferred size
forms.myForm.show(win);
DIALOG
// create a non-modal dialog on top of current active form's window and show a form inside it
var myWindow = application.createWindow("myName", JSWindow.DIALOG);
myWindow.show(forms.myForm);
FULL_SCREEN
// create and show a window, with specified title, full screen
var win = application.createWindow("windowName", JSWindow.WINDOW);
win.setInitialBounds(JSWindow.FULL_SCREEN, JSWindow.FULL_SCREEN, JSWindow.FULL_SCREEN, JSWindow.FULL_SCREEN);
win.setTitle("This is a window");
controller.show(win);
MODAL_DIALOG
// create a modal dialog on top of current active form's window and show a form inside it
var myWindow = application.createWindow("myName", JSWindow.MODAL_DIALOG);
myWindow.show(forms.myForm);
WINDOW
// create a window and show a form inside it
var myWindow = application.createWindow("myName", JSWindow.WINDOW);
myWindow.show(forms.myForm);
Property Details
controller
var formName = application.getWindow('test').controller.getName();
opacity
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
resizable
var someWindow = application.getWindow("someWindowName");
if (someWindow.isVisible() == false) {
controller.show(someWindow);
someWindow.resizable = false;
}
storeBounds
var win1 = application.createWindow("Window 1", JSWindow.DIALOG, null);
win1.setInitialBounds(200, 200, 450, 350);
win1.resizable = false;
win1.storeBounds = true;
win1.title = "Window 1";
controller.show(win1);
title
var win1 = application.createWindow("Window 1", JSWindow.WINDOW, null);
win1.setInitialBounds(200, 200, 450, 350);
win1.title = "Window 1";
controller.show(win1);
transparent
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
undecorated
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
Methods Details
destroy()
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");
}
getHeight()
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
getName()
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
getParent()
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
getType()
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
getWidth()
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
getX()
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
getY()
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 opacity = "Opacity: " + someWindow.opacity + "\n"
var transparent = "Transparent: " + someWindow.transparent + "\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()
hide()
//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();
isVisible()
var someWindow = application.getWindow("someWindowName");
if (someWindow.isVisible() == false) {
controller.show(someWindow);
someWindow.resizable = false;
}
resetBounds()
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);
setInitialBounds(x, y, width, height)
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.
var win = application.createWindow("myName", JSWindow.DIALOG);
win.setInitialBounds(20, 10, 300, 200);
forms.myForm.show(win);
setLocation(x, y)
Number
x
x coordinate.
Number
y
y coordinate.
var window = application.createWindow('test',JSWindow.DIALOG);
window.setLocation(0,0);
window.setSize(400,600);
window.show(forms.child1);
setSize(width, height)
Number
width
the width.
Number
height
the height.
var window = application.createWindow('test',JSWindow.DIALOG);
window.setLocation(0,0);
window.setSize(400,600);
window.show(forms.child1);
show(form)
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).
win.show(forms.myForm);
// win.show("myForm");
showTextToolbar(showTextToolbar)
Boolean
showTextToolbar
true if you want a text tool bar to be added to this window, false otherwise.
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();
toBack()
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();
toFront()
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();