001 package com.google.gwt.maps.client.events; 002 003 import com.google.gwt.user.client.ui.FlowPanel; 004 import com.google.gwt.user.client.ui.RootPanel; 005 import com.google.gwt.user.client.ui.Widget; 006 007 public class MapPanel extends FlowPanel { 008 009 public MapPanel() { 010 super(); 011 } 012 013 @Override 014 public void onAttach() { 015 super.onAttach(); 016 } 017 018 /** 019 * todo only do this once, b/c other wise it probably won't act right adding it over and over 020 */ 021 @Override 022 public void add(Widget child) { 023 super.add(child); 024 onAttach(); 025 RootPanel.detachOnWindowClose(this); 026 } 027 }