Search in sources :

Example 11 with RuntimeWindow

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);
}
Also used : RuntimeWindow(com.servoy.j2db.scripting.RuntimeWindow)

Example 12 with RuntimeWindow

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);
    }
}
Also used : RuntimeWindow(com.servoy.j2db.scripting.RuntimeWindow)

Example 13 with RuntimeWindow

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;
}
Also used : RuntimeWindow(com.servoy.j2db.scripting.RuntimeWindow) IWebsocketEndpoint(org.sablo.websocket.IWebsocketEndpoint)

Aggregations

RuntimeWindow (com.servoy.j2db.scripting.RuntimeWindow)13 FormWindow (com.servoy.j2db.FormWindow)3 ISmartRuntimeWindow (com.servoy.j2db.plugins.ISmartRuntimeWindow)3 JSWindow (com.servoy.j2db.scripting.JSWindow)3 Window (java.awt.Window)3 IMainContainer (com.servoy.j2db.IMainContainer)2 FormDialog (com.servoy.j2db.gui.FormDialog)2 ArrayList (java.util.ArrayList)2 FormController (com.servoy.j2db.FormController)1 FormManager (com.servoy.j2db.FormManager)1 Pair (com.servoy.j2db.util.Pair)1 Entry (java.util.Map.Entry)1 IWebsocketEndpoint (org.sablo.websocket.IWebsocketEndpoint)1