container.setStyleName("mapContextMenuContainer");
setMapView = new HTML("Set map view");
setMapView.setStyleName("mapContextMenuItem");
setMapView.addStyleName("contextDisabled");
setMapView.addMouseOverHandler(new MouseOverHandler() {
public void onMouseOver(MouseOverEvent event) {
setMapView.removeStyleName("contextDisabled");
}
});
setMapView.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
bus.fireEvent(new CacheRegionMapMetaDataEvent(m.getCenter(), m.getZoomLevel()));
m.removeControl(self);
}
});
setAsCurrentRegion = new HTML("Set as current region");
setAsCurrentRegion.setStyleName("mapContextMenuItem");
setAsCurrentRegion.addStyleName("contextDisabled");
setAsCurrentRegion.addMouseOverHandler(new MouseOverHandler() {
public void onMouseOver(MouseOverEvent event) {
setAsCurrentRegion.removeStyleName("contextDisabled");
}
});
setAsCurrentRegion.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert("fire the set as current region event");
m.removeControl(self);
}
});
simplify = new HTML("Simplify geometry");
simplify.setStyleName("mapContextMenuItem");
simplify.addStyleName("contextDisabled");
simplify.addMouseOverHandler(new MouseOverHandler() {
public void onMouseOver(MouseOverEvent event) {
simplify.removeStyleName("contextDisabled");
}
});
simplify.addClickHandler(new ClickHandler() {