Java Code Examples for com.smartgwt.client.widgets.Window#setKeepInParentRect()

The following examples show how to use com.smartgwt.client.widgets.Window#setKeepInParentRect() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoginWindow.java    From proarc with GNU General Public License v3.0 6 votes vote down vote up
private Window createWindow(DynamicForm form) {
    VLayout container = new VLayout();
    container.setMembers(form, createButtons());
    container.setMargin(15);
    Window window = new Window();
    window.setAutoCenter(true);
    window.setAutoSize(true);
    window.setIsModal(true);
    window.addItem(container);
    window.setTitle(i18nSgwt.dialog_LoginTitle());
    window.setShowCloseButton(false);
    window.setShowMinimizeButton(false);
    window.setKeepInParentRect(true);
    window.setShowModalMask(true);
    window.setCanDragReposition(false);
    return window;
}
 
Example 2
Source File: DigitalObjectPreview.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
private Window createFullImageWindow(Canvas content) {
    final Window window = new Window();
    window.setWidth(Page.getWidth() - 200);
    window.setHeight(Page.getHeight() - 40);
    window.setAutoCenter(true);
    window.setMaximized(true);
    window.setCanDragResize(true);
    window.setCanDragReposition(true);
    window.setIsModal(true);
    window.setDismissOnEscape(true);
    window.setDismissOnOutsideClick(true);
    window.setKeepInParentRect(true);
    window.setShowMaximizeButton(true);
    window.setShowMinimizeButton(false);

    window.setModalMaskOpacity(10);
    window.setShowModalMask(true);

    window.setShowResizer(true);
    window.setTitle(i18n.DigitalObjectPreview_Window_Title());
    window.setBodyColor(BACKGROUND_COLOR);
    window.setCanFocus(true);
    window.addItem(content);

    window.setHeaderControls(HeaderControls.HEADER_ICON, HeaderControls.HEADER_LABEL,
            getWindowZoomer(), HeaderControls.MAXIMIZE_BUTTON, HeaderControls.CLOSE_BUTTON);

    window.addCloseClickHandler(new CloseClickHandler() {

        @Override
        public void onCloseClick(CloseClickEvent event) {
            event.cancel();
            window.close();
            onWindowClose();
        }
    });

    return window;
}