window.open(point, new InfoWindowContent(panel));
}
private void fillEntryPanel(TimedLocalSearchResult result, FlowPanel panel) {
LocalSearchResult entry = result.getLocalSearchResult();
DivPanel namePanel = new DivPanel();
namePanel.addStyleName(_css.ActiveResultNamePanel());
panel.add(namePanel);
if (entry.getUrl() == null) {
DivWidget name = new DivWidget(entry.getName());
name.addStyleName(_css.ActiveResultName());
namePanel.add(name);
} else {
Anchor name = new Anchor(entry.getName(), entry.getUrl());
name.addStyleName(_css.ActiveResultName());
name.setTarget("_blank");
namePanel.add(name);
}
DivWidget address = new DivWidget(getFormatedAddressForEntry(entry));
address.addStyleName(_css.ActiveResultAddress());
panel.add(address);
DivWidget phone = new DivWidget(getFormatedPhoneNumber(entry));
phone.addStyleName(_css.ActiveResultPhone());
panel.add(phone);
DivPanel ratingPanel = new DivPanel();
ratingPanel.addStyleName(_css.ActiveResultRatingPanel());
panel.add(ratingPanel);
if (entry.getRatingUrl() != null) {
Image image = new Image(entry.getRatingUrl());
image.setSize("84px", "17px");
image.addStyleName(_css.ActiveResultRatingImage());
ratingPanel.add(image);
} else if (entry.getRatingUrlSmall() != null) {
Image image = new Image(entry.getRatingUrlSmall());
image.addStyleName(_css.ActiveResultRatingImageSmall());
ratingPanel.add(image);
} else {
DivWidget rating = new DivWidget(entry.getRating() + "/"
+ entry.getMaxRating());
ratingPanel.add(rating);
}
DivWidget time = new DivWidget("Travel time: ~" + (result.getTime() / 60)
+ " mins");