Example usage for com.google.gwt.user.client Window getClientHeight

List of usage examples for com.google.gwt.user.client Window getClientHeight

Introduction

In this page you can find the example usage for com.google.gwt.user.client Window getClientHeight.

Prototype

public static int getClientHeight() 

Source Link

Usage

From source file:com.ikon.frontend.client.widget.eastereggs.FuturamaWalking.java

License:Open Source License

/**
 * FuturamaWalking//from  w w w  .j a v a  2  s . c  o m
 */
public FuturamaWalking() {
    // Establishes auto-close when click outside
    super(false, false);
    left = -180;
    top = Window.getClientHeight() - 80 - 21;

    vPanel = new VerticalPanel();
    vPanel.setWidth("186");
    vPanel.setHeight("80");

    logo = new Image("img/eastereggs/futurama_walking.gif");
    vPanel.add(logo);

    setPopupPosition(left, top);

    hide();
    setWidget(vPanel);
}

From source file:com.ikon.frontend.client.widget.eastereggs.FuturamaWalking.java

License:Open Source License

/**
 * Evaluate// ww  w.j a v a 2s .  c o  m
 */
public void evaluate(String name) {
    if (name.equals("futurama")) {
        left = -180;
        top = Window.getClientHeight() - 80 - 21;
        show();
        setPopupPosition(left, top);

        move = new Timer() {
            public void run() {
                left += 2;
                setPopupPosition(left, top);

                if (left < Window.getClientWidth() + 180) {
                    move.schedule(40);
                } else {
                    move.cancel();
                    hide();
                }
            }
        };

        move.schedule(40);
    }
}

From source file:com.ikon.frontend.client.widget.ErrorPopup.java

License:Open Source License

/**
 * Show the popup error//from ww  w . j  a  v  a 2  s  .c  o m
 * 
 * @param msg Error message
 */
public void show(String msg) {
    //TODO: aqui pueden haber problemas de concurrencia al ser llamado simultaneamente este mtodo
    // cabe la posibilidad de perder algun mensaje de error.

    if (!text.getHTML().equals("")) {
        text.setHTML(text.getHTML() + "<br><br>" + msg);
    } else {
        text.setHTML(msg);
    }

    setText(Main.i18n("error.label"));
    int left = (Window.getClientWidth() - 380) / 2;
    int top = (Window.getClientHeight() - 200) / 2;
    setPopupPosition(left, top);
    super.show();
}

From source file:com.ikon.frontend.client.widget.ErrorPopup.java

License:Open Source License

public void serverErrorShow(String msg) {
    Main.get().mainPanel.bottomPanel.setStatus("System is Disconnected from Server");
    text.setHTML("System is Disconnected from Server");
    setText(Main.i18n("error.label"));
    int right = (Window.getClientWidth() + 885) / 2;
    int bottom = (Window.getClientHeight() + 425) / 2;
    setPopupPosition(right, bottom);/*from   www . j  av  a2  s  .  com*/
    super.show();
}

From source file:com.ikon.frontend.client.widget.finddocument.FindDocumentSelectPopup.java

License:Open Source License

/**
 * Shows the popup /*from ww  w  . j  a  v  a 2  s  .  c  o m*/
 */
public void show() {
    initButtons();
    int left = (Window.getClientWidth() - 700) / 2;
    int top = (Window.getClientHeight() - 350) / 2;
    setPopupPosition(left, top);
    setText(Main.i18n("search.document.filter"));

    // Resets to initial tree value
    removeAllRows();
    keyword.setText("");
    evaluateEnableAction();
    super.show();
    keyword.setFocus(true);
}

From source file:com.ikon.frontend.client.widget.findfolder.FindFolderSelectPopup.java

License:Open Source License

/**
 * Shows the popup /*from   w  w  w .  jav a2  s  .  com*/
 */
public void show() {
    initButtons();
    int left = (Window.getClientWidth() - 700) / 2;
    int top = (Window.getClientHeight() - 350) / 2;
    setPopupPosition(left, top);
    setText(Main.i18n("search.folder.filter"));

    // Resets to initial tree value
    removeAllRows();
    keyword.setText("");
    evaluateEnableAction();
    super.show();
    keyword.setFocus(true);
}

From source file:com.ikon.frontend.client.widget.foldertree.FolderSelectPopup.java

License:Open Source License

/**
 * Shows the popup //w  w  w.  j  a  v a 2s.com
 */
public void show() {
    initButtons();
    status.setVisible(false);
    int left = (Window.getClientWidth() - 450) / 2;
    int top = (Window.getClientHeight() - 440) / 2;
    setPopupPosition(left, top);
    setText(Main.i18n("trash.directory.select.label"));

    // Resets to initial tree value
    folderSelectTree.reset();
    super.show();
}

From source file:com.ikon.frontend.client.widget.form.FolderSelectPopup.java

License:Open Source License

/**
 * Shows the popup /*from  w w w  . j  a  v  a2 s .  c o m*/
 */
public void show(TextBox textBox, HasSearch search) {
    this.textBox = textBox;
    this.search = search;
    int left = (Window.getClientWidth() - 300) / 2;
    int top = (Window.getClientHeight() - 200) / 2;
    setPopupPosition(left, top);

    // Resets to initial tree value
    folderSelectTree.reset();

    GWTWorkspace workspace = Main.get().workspaceUserProperties.getWorkspace();
    categoriesVisible = workspace.isStackCategoriesVisible();
    thesaurusVisible = workspace.isStackThesaurusVisible();
    templatesVisible = workspace.isStackTemplatesVisible();
    personalVisible = workspace.isStackPersonalVisible();
    mailVisible = workspace.isStackMailVisible();

    removeAllContextListItems();
    contextListBox.addItem(Main.i18n("leftpanel.label.taxonomy"), "" + UIDesktopConstants.NAVIGATOR_TAXONOMY);
    if (categoriesVisible) {
        contextListBox.addItem(Main.i18n("leftpanel.label.categories"),
                "" + UIDesktopConstants.NAVIGATOR_CATEGORIES);
    }
    if (thesaurusVisible) {
        contextListBox.addItem(Main.i18n("leftpanel.label.thesaurus"),
                "" + UIDesktopConstants.NAVIGATOR_THESAURUS);
    }
    if (templatesVisible) {
        contextListBox.addItem(Main.i18n("leftpanel.label.templates"),
                "" + UIDesktopConstants.NAVIGATOR_TEMPLATES);
    }
    if (personalVisible) {
        contextListBox.addItem(Main.i18n("leftpanel.label.my.documents"),
                "" + UIDesktopConstants.NAVIGATOR_PERSONAL);
    }
    if (mailVisible) {
        contextListBox.addItem(Main.i18n("leftpanel.label.mail"), "" + UIDesktopConstants.NAVIGATOR_MAIL);
    }

    super.show();
}

From source file:com.ikon.frontend.client.widget.LogoutPopup.java

License:Open Source License

/**
 * OKM Logout// w w  w  .jav a2 s.  c om
 */
public void logout() {
    button.setEnabled(false);
    int left = (Window.getClientWidth() - 300) / 2;
    int top = (Window.getClientHeight() - 200) / 2;
    setPopupPosition(left, top);
    setText(Main.i18n("logout.label"));
    show();
    Log.debug("Logout()");

    if (Main.get().mainPanel.bottomPanel.userInfo.isConnectedToChat()) {
        text.setText(Main.i18n("chat.logout"));
        disconnectChat();
    } else {
        text.setText(Main.i18n("logout.logout"));
        authService.logout(callbackLogout);
        Log.debug("Logout: void");
    }
}

From source file:com.ikon.frontend.client.widget.richtext.RichTextPopup.java

License:Open Source License

/**
 * Shows de popup//  w  w w .ja va2 s.c  o  m
 */
public void show() {
    url.setText("http://");
    int left = (Window.getClientWidth() - 300) / 2;
    int top = (Window.getClientHeight() - 125) / 2;
    setPopupPosition(left, top);
    super.show();
}