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

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

Introduction

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

Prototype

public static void scrollTo(int left, int top) 

Source Link

Usage

From source file:org.unitime.timetable.gwt.client.rooms.RoomEdit.java

License:Apache License

public void show() {
    UniTimePageLabel.getInstance()//from  w w w .  j  av  a2 s  .  c  o m
            .setPageName(iRoom.getUniqueId() == null ? MESSAGES.pageAddRoom() : MESSAGES.pageEditRoom());
    setVisible(true);
    iLastScrollLeft = Window.getScrollLeft();
    iLastScrollTop = Window.getScrollTop();
    onShow();
    Window.scrollTo(0, 0);
    if (iGoogleMap != null && !iGoogleMapInitialized) {
        iGoogleMapInitialized = true;
        ScriptInjector.fromUrl("https://maps.google.com/maps/api/js?sensor=false&callback=setupGoogleMap")
                .setWindow(ScriptInjector.TOP_WINDOW).setCallback(new Callback<Void, Exception>() {
                    @Override
                    public void onSuccess(Void result) {
                    }

                    @Override
                    public void onFailure(Exception e) {
                        UniTimeNotifications.error(e.getMessage(), e);
                        iGoogleMap = null;
                        iGoogleMapControl = null;
                    }
                }).inject();
    } else if (iGoogleMap != null) {
        setMarker();
    }
}

From source file:org.unitime.timetable.gwt.client.rooms.RoomEdit.java

License:Apache License

public void hide(RoomDetailInterface room, boolean canShowDetail, String message) {
    setVisible(false);//  w ww. j  av  a  2  s. c  o m
    onHide(room, canShowDetail, message);
    Window.scrollTo(iLastScrollLeft, iLastScrollTop);
}

From source file:org.unitime.timetable.gwt.client.rooms.RoomFeatureEdit.java

License:Apache License

private void hide(boolean refresh, FeatureInterface feature) {
    setVisible(false);
    onHide(refresh, feature);
    Window.scrollTo(iLastScrollLeft, iLastScrollTop);
}

From source file:org.unitime.timetable.gwt.client.rooms.RoomFeatureEdit.java

License:Apache License

public void show() {
    UniTimePageLabel.getInstance().setPageName(
            iFeature.getId() == null ? MESSAGES.pageAddRoomFeature() : MESSAGES.pageEditRoomFeature());
    setVisible(true);//ww w  . j  a  v a 2 s  .c o  m
    iLastScrollLeft = Window.getScrollLeft();
    iLastScrollTop = Window.getScrollTop();
    onShow();
    Window.scrollTo(0, 0);
}

From source file:org.unitime.timetable.gwt.client.rooms.RoomGroupEdit.java

License:Apache License

private void hide(boolean refresh, GroupInterface group) {
    setVisible(false);
    onHide(refresh, group);
    Window.scrollTo(iLastScrollLeft, iLastScrollTop);
}

From source file:org.unitime.timetable.gwt.client.rooms.RoomGroupEdit.java

License:Apache License

public void show() {
    UniTimePageLabel.getInstance()/*from w  w  w.  j  a va  2  s. c  o  m*/
            .setPageName(iGroup.getId() == null ? MESSAGES.pageAddRoomGroup() : MESSAGES.pageEditRoomGroup());
    setVisible(true);
    iLastScrollLeft = Window.getScrollLeft();
    iLastScrollTop = Window.getScrollTop();
    onShow();
    Window.scrollTo(0, 0);
}

From source file:org.unitime.timetable.gwt.client.solver.AssignedClassesPage.java

License:Apache License

public static void __search() {
    final int left = Window.getScrollLeft();
    final int top = Window.getScrollTop();
    AssignedClassesPage page = (AssignedClassesPage) RootPanel.get("UniTimeGWT:Body").getWidget(0);
    page.search(new AsyncCallback<Boolean>() {
        @Override//  w w w . j a  v a  2  s  . co m
        public void onFailure(Throwable caught) {
        }

        @Override
        public void onSuccess(Boolean result) {
            if (result)
                Window.scrollTo(left, top);
        }
    });
}

From source file:org.unitime.timetable.gwt.client.solver.AssignmentHistoryPage.java

License:Apache License

public static void __search() {
    final int left = Window.getScrollLeft();
    final int top = Window.getScrollTop();
    AssignmentHistoryPage page = (AssignmentHistoryPage) RootPanel.get("UniTimeGWT:Body").getWidget(0);
    page.search(new AsyncCallback<Boolean>() {
        @Override/*from ww w .j  a  v  a  2s.c om*/
        public void onFailure(Throwable caught) {
        }

        @Override
        public void onSuccess(Boolean result) {
            if (result)
                Window.scrollTo(left, top);
        }
    });
}

From source file:org.unitime.timetable.gwt.client.solver.NotAssignedClassesPage.java

License:Apache License

public static void __search() {
    final int left = Window.getScrollLeft();
    final int top = Window.getScrollTop();
    NotAssignedClassesPage page = (NotAssignedClassesPage) RootPanel.get("UniTimeGWT:Body").getWidget(0);
    page.search(new AsyncCallback<Boolean>() {
        @Override//from w  ww . j  a va 2  s  .c om
        public void onFailure(Throwable caught) {
        }

        @Override
        public void onSuccess(Boolean result) {
            if (result)
                Window.scrollTo(left, top);
        }
    });
}

From source file:org.unitime.timetable.gwt.client.solver.SolutionChangesPage.java

License:Apache License

public static void __search() {
    final int left = Window.getScrollLeft();
    final int top = Window.getScrollTop();
    SolutionChangesPage page = (SolutionChangesPage) RootPanel.get("UniTimeGWT:Body").getWidget(0);
    page.search(new AsyncCallback<Boolean>() {
        @Override//from   ww w .j ava 2s.  c  om
        public void onFailure(Throwable caught) {
        }

        @Override
        public void onSuccess(Boolean result) {
            if (result)
                Window.scrollTo(left, top);
        }
    });
}