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

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

Introduction

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

Prototype

public static int getClientWidth() 

Source Link

Usage

From source file:com.ikon.extension.frontend.client.widget.dropbox.ConfirmPopup.java

License:Open Source License

/**
 * Shows de popup//w  w w .  j  av a  2 s.  c  o m
 */
public void show() {
    setText(GeneralComunicator.i18n("confirm.label"));
    int left = (Window.getClientWidth() - 300) / 2;
    int top = (Window.getClientHeight() - 125) / 2;
    setPopupPosition(left, top);
    super.show();
}

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

License:Open Source License

/**
 * Shows the popup//from  ww  w .ja v  a 2  s .  com
 */
public void show() {
    int left = (Window.getClientWidth() - 450) / 2;
    int top = (Window.getClientHeight() - 350) / 2;
    setPopupPosition(left, top);

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

From source file:com.ikon.frontend.client.panel.ExtendedDockPanel.java

License:Open Source License

/**
 * SetWidgetsSize// www . ja va2 s  .  c o m
 */
private void SetWidgetsSize() {
    // Calculating real height
    usableHeight = Window.getClientHeight();

    // Initialize dockPanel size
    dockPanel.setSize("" + Window.getClientWidth(), "" + usableHeight);

    // The active panel must be the last on initalization because establishes coordenates
    leftBorderPanel.setSize(VERTICAL_BORDER_PANEL_WIDTH,
            usableHeight - (TopPanel.PANEL_HEIGHT + BottomPanel.PANEL_HEIGHT));
    rightBorderPanel.setSize(VERTICAL_BORDER_PANEL_WIDTH,
            usableHeight - (TopPanel.PANEL_HEIGHT + BottomPanel.PANEL_HEIGHT));

    centerWidth = Window.getClientWidth() - (2 * VERTICAL_BORDER_PANEL_WIDTH);
    centerHeight = usableHeight - (TopPanel.PANEL_HEIGHT + BottomPanel.PANEL_HEIGHT);

    topPanel.setWidth("" + Window.getClientWidth());
    desktop.setSize(centerWidth, centerHeight);
    search.setSize(centerWidth, centerHeight);
    dashboard.setSize(centerWidth, centerHeight);
    administration.setSize(centerWidth, centerHeight);
}

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

License:Open Source License

/**
 * About popup//from   w  w  w.  j  av a2s. c o m
 */
public AboutPopup() {
    // Establishes auto-close when click outside
    super(false, true);

    futurama = new Futurama();
    int left = (Window.getClientWidth() - 300) / 2;
    int top = (Window.getClientHeight() - 280) / 2;

    vPanel = new VerticalPanel();
    text = new HTML();
    button = new Button(Main.i18n("button.close"), this);
    logo = new Image("img/logo_openkm.gif");

    vPanel.setWidth("300px");
    vPanel.setHeight("195px");
    button.setStyleName("okm-YesButton");

    text.setHTML(msg);

    vPanel.add(new HTML("<br>"));
    vPanel.add(logo);
    htmlAppVersion = new HTML(appVersion);
    vPanel.add(htmlAppVersion);
    htmlExtVersion = new HTML(extVersion);
    vPanel.add(htmlExtVersion);
    vPanel.add(new HTML("<br>"));
    vPanel.add(text);
    HTML htmlWeb = new HTML(web);
    vPanel.add(htmlWeb);
    HTML htmlTeam = new HTML(team);
    vPanel.add(htmlTeam);
    HTML htmlCopy = new HTML(copy);
    vPanel.add(htmlCopy);
    vPanel.add(button);
    vPanel.add(new HTML("<br>"));

    vPanel.setCellHorizontalAlignment(logo, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(htmlAppVersion, HasAlignment.ALIGN_RIGHT);
    vPanel.setCellHorizontalAlignment(htmlExtVersion, HasAlignment.ALIGN_RIGHT);
    vPanel.setCellHorizontalAlignment(text, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(htmlWeb, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(htmlTeam, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(htmlCopy, HasAlignment.ALIGN_CENTER);
    vPanel.setCellHorizontalAlignment(button, HasAlignment.ALIGN_CENTER);

    setPopupPosition(left, top);

    super.hide();
    setWidget(vPanel);
}

From source file:com.ikon.frontend.client.widget.categories.CategoriesSelectPopup.java

License:Open Source License

/**
 * Shows the popup /*w w  w .j  av a2 s .com*/
 */
public void show() {
    initButtons();
    int left = (Window.getClientWidth() - 500) / 2;
    int top = (Window.getClientHeight() - 300) / 2;
    setPopupPosition(left, top);
    setText(Main.i18n("categories.folder.select.label"));

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

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

License:Open Source License

/**
 * Shows de popup//w w w.  j  a  v a 2  s .  co  m
 */
public void show() {
    setText(Main.i18n("confirm.label"));
    int left = (Window.getClientWidth() - 300) / 2;
    int top = (Window.getClientHeight() - 125) / 2;
    setPopupPosition(left, top);
    super.show();
}

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

License:Open Source License

/**
 * Evaluate//from  w w w. j  a  v a  2  s  .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 w w  w .jav 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);/* w  ww .  ja  v  a 2  s.co  m*/
    super.show();
}

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

License:Open Source License

/**
 * Shows the popup /*from   w w  w .  j a v a2s. c  om*/
 */
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);
}