use of com.servoy.j2db.scripting.RuntimeWindow in project servoy-client by Servoy.
the class NGFormManager method showFormInFrame.
@Override
public void showFormInFrame(String formName, Rectangle bounds, String windowTitle, boolean resizeble, boolean showTextToolbar, String windowName) {
if (windowName == null) {
windowName = DEFAULT_DIALOG_NAME;
}
RuntimeWindow thisWindow = application.getRuntimeWindowManager().getWindow(windowName);
if (thisWindow != null && thisWindow.getType() != JSWindow.WINDOW) {
// make sure it's closed before reference to it is lost
thisWindow.hide(true);
thisWindow.destroy();
thisWindow = null;
}
if (thisWindow == null) {
thisWindow = application.getRuntimeWindowManager().createWindow(windowName, JSWindow.WINDOW, null);
}
thisWindow.setInitialBounds(bounds.x, bounds.y, bounds.width, bounds.height);
thisWindow.showTextToolbar(showTextToolbar);
thisWindow.setTitle(windowTitle);
thisWindow.setResizable(resizeble);
// last two params are really not relevant for windows
thisWindow.oldShow(formName, true, false);
}
use of com.servoy.j2db.scripting.RuntimeWindow in project servoy-client by Servoy.
the class NGRuntimeWindowManager method createMainWindow.
public void createMainWindow(int windowNr) {
String windowName = String.valueOf(windowNr);
if (getWindow(windowName) == null) {
RuntimeWindow mainApplicationWindow = createWindow(windowName, JSWindow.WINDOW, null);
// default values, that never change
mainApplicationWindow.setLocation(0, 0);
setCurrentWindowName(windowName);
}
}
use of com.servoy.j2db.scripting.RuntimeWindow in project servoy-client by Servoy.
the class NGRuntimeWindowManager method getMainApplicationWindow.
@Override
protected RuntimeWindow getMainApplicationWindow() {
RuntimeWindow runtimeWindow = this.windows.get(MAIN_APPLICATION_WINDOW_NAME);
if (runtimeWindow == null) {
int windowNr = CurrentWindow.exists() ? CurrentWindow.get().getNr() : -1;
if (windowNr != -1) {
String name = String.valueOf(windowNr);
runtimeWindow = getWindow(name);
if (runtimeWindow == null) {
runtimeWindow = createWindowInternal(name, JSWindow.WINDOW, null);
windows.put(name, runtimeWindow);
}
}
}
return runtimeWindow;
}
Aggregations