Example usage for com.google.gwt.user.client Element getAbsoluteBottom

List of usage examples for com.google.gwt.user.client Element getAbsoluteBottom

Introduction

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

Prototype

@Override
    public int getAbsoluteBottom() 

Source Link

Usage

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

License:Open Source License

/**
 * Detects whether mouse cursor is inside actual item.
 * /*from   w  w  w.ja  v  a  2 s .com*/
 * @return returns true if mouse cursor is inside actual item
 */
private boolean isCursorInsideActualItem(TreeItem clickedItem) {
    if (clickedItem == null) {
        return false;
    }

    Element selectedElement = Dragable.getSelectedElement(clickedItem.getElement());

    if (selectedElement == null) {
        return false;
    }

    return mouseX >= selectedElement.getAbsoluteLeft() && mouseX <= selectedElement.getAbsoluteRight()
            && mouseY >= selectedElement.getAbsoluteTop() && mouseY <= selectedElement.getAbsoluteBottom();
}

From source file:com.mashery.examples.api.client.PagedTable.java

License:Open Source License

protected void showLoading(boolean loading) {
    if (loading) {
        firstButton.setEnabled(false);//  w w  w  .j a  va2  s. c o  m
        prevButton.setEnabled(false);
        nextButton.setEnabled(false);
        lastButton.setEnabled(false);
        refreshPanel.setVisible(false);

        Element element = table.getElement();
        int x = element.getAbsoluteLeft();
        int y = element.getAbsoluteTop();
        int w = element.getAbsoluteRight() - x;
        int h = element.getAbsoluteBottom() - y;
        loadingPopup.setSize(w + "px", h + "px");
        loadingPopup.setPopupPosition(x, y);
        loadingPopup.show();
    } else {
        loadingPopup.hide();
        updateNavigationControls();
    }
}

From source file:jschismes.client.ColorPicker.java

License:Apache License

/**
 * Show the modal dialog containing the color-picker beside the  especified element.
 *///  ww  w  .  java  2 s  . c om
public void show(JavaScriptObject object) {
    if (object != null) {
        try {
            Element elem = (com.google.gwt.user.client.Element) Element.as(object);
            super.setPopupPosition(elem.getAbsoluteLeft(), elem.getAbsoluteBottom());
        } catch (Exception e) {
        }
    }
    super.show();
}