Search in sources :

Example 6 with ResizeHandler

use of com.google.gwt.event.logical.shared.ResizeHandler in project opennms by OpenNMS.

the class GoogleMapsPanel method initializeMapPanel.

private void initializeMapPanel() {
    getMapWidget().setSize("100%", "100%");
    getMapWidget().setUIToDefault();
    getMapWidget().addControl(new LargeMapControl());
    getMapWidget().setScrollWheelZoomEnabled(true);
    Window.addResizeHandler(new ResizeHandler() {

        @Override
        public void onResize(final ResizeEvent resizeEvent) {
            if (getMapWidget() != null) {
                getMapWidget().checkResizeAndCenter();
            }
        }
    });
}
Also used : ResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler) LargeMapControl(com.google.gwt.maps.client.control.LargeMapControl) ResizeEvent(com.google.gwt.event.logical.shared.ResizeEvent)

Aggregations

ResizeEvent (com.google.gwt.event.logical.shared.ResizeEvent)6 ResizeHandler (com.google.gwt.event.logical.shared.ResizeHandler)6 Element (com.google.gwt.dom.client.Element)1 LargeMapControl (com.google.gwt.maps.client.control.LargeMapControl)1 Timer (com.google.gwt.user.client.Timer)1 ClosingEvent (com.google.gwt.user.client.Window.ClosingEvent)1 ClosingHandler (com.google.gwt.user.client.Window.ClosingHandler)1 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)1 SuggestBox (com.google.gwt.user.client.ui.SuggestBox)1 TextBox (com.google.gwt.user.client.ui.TextBox)1 TextBoxBase (com.google.gwt.user.client.ui.TextBoxBase)1 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)1 DblClickEvent (com.googlecode.gwtmapquest.transaction.event.DblClickEvent)1 DblClickHandler (com.googlecode.gwtmapquest.transaction.event.DblClickHandler)1 MoveEndEvent (com.googlecode.gwtmapquest.transaction.event.MoveEndEvent)1 MoveEndHandler (com.googlecode.gwtmapquest.transaction.event.MoveEndHandler)1 ShapeAddedEvent (com.googlecode.gwtmapquest.transaction.event.ShapeAddedEvent)1 ShapeAddedHandler (com.googlecode.gwtmapquest.transaction.event.ShapeAddedHandler)1 ZoomEndEvent (com.googlecode.gwtmapquest.transaction.event.ZoomEndEvent)1 ZoomEndHandler (com.googlecode.gwtmapquest.transaction.event.ZoomEndHandler)1