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

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

Introduction

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

Prototype

public static int getScrollLeft() 

Source Link

Usage

From source file:tv.dyndns.kishibe.qmaclone.client.creation.WidgetProblemForm.java

License:Open Source License

@Override
public void onClick(ClickEvent event) {
    Widget sender = (Widget) event.getSource();

    if (buttonPolygonCreation.contains(sender)) {
        final int answerIndex = buttonPolygonCreation.indexOf(sender);
        final DialogBoxPolygonCreation polygonCreation = new DialogBoxPolygonCreation(
                textBoxChoice[0].getText(), textBoxAnswer[answerIndex].getText());
        polygonCreation.setPopupPosition(Window.getScrollLeft() + 10, Window.getScrollTop() + 10);
        polygonCreation.addDialogBoxPolygonCreationListener(new DialogBoxPolygonCreationListener() {
            public void onOk() {
                textBoxAnswer[answerIndex].setText(polygonCreation.getPolygonDescription());
            }//  w  w  w  .  j  av a  2  s . c o  m

            public void onCancel() {
            }
        });
        polygonCreation.show();
    } else if (sender == buttonClearProblemFeedback) {
        clearProblemFeedback();
    } else if (sender == radioButtonNone) {
        updateForm();
    } else if (sender == radioButtonImage) {
        updateForm();
    } else if (sender == radioButtonYouTube) {
        updateForm();
    } else if (sender == buttonIndicate) {
        onButtonIndicate();
    }
}

From source file:virtuozo.interfaces.Component.java

License:Apache License

public C scrollTo() {
    double left = Window.getScrollLeft() + this.left();
    double top = Window.getScrollTop() + this.top();

    Window.scrollTo((int) left, (int) top);
    return (C) this;
}