/** * Checks if an info window is open. * * @param infoWindow The window to check. * @return true, if the window is open. */ public boolean isInfoWindowOpen(GoogleMapInfoWindow infoWindow) { return getState(false).infoWindows.containsKey(infoWindow.getId()); }
/** * Closes an info window. * * @param infoWindow The window to close. */ public void closeInfoWindow(GoogleMapInfoWindow infoWindow) { getState().infoWindows.remove(infoWindow.getId()); }
/** * Opens an info window. * * @param infoWindow The window to open. */ public void openInfoWindow(GoogleMapInfoWindow infoWindow) { getState().infoWindows.put(infoWindow.getId(), infoWindow); }
/** * Sets the contents of an info window to a single Vaadin component which may, * of course, be a layout. * * @param window the info window which contents should be modified * @param content the contents for the info window */ public void setInfoWindowContents(GoogleMapInfoWindow window, Component content) { super.addComponent(content); infoWindowContents.put(window, content); String contentIdentifier = "content-for-infowindow-" + window.getId(); content.addStyleName(contentIdentifier); window.setContent("Loading..."); getState().infoWindowContentIdentifiers .put(window.getId(), contentIdentifier); }