Package org.onebusaway.webapp.gwt.common.widgets

Examples of org.onebusaway.webapp.gwt.common.widgets.DivPanel


    resultPanel.add(new DivWidget(desc, _css.resultListEntryDescription()));
  }

  protected void addPlaceBeanToPanel(final Place place, DivPanel panel) {

    DivPanel resultPanel = new DivPanel(_css.resultListEntry());
    panel.add(resultPanel);

    DivPanel routeRow = new DivPanel(_css.resultListEntryName());
    resultPanel.add(routeRow);

    String name = place.getName();
    Anchor anchor = new Anchor(name);
    anchor.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        _stopFinder.queryLocation(place.getLocation(), place.getAccuracy());
      }
    });
    routeRow.add(anchor);

    String description = place.getDescriptionAsString();
    if (description.length() > 0)
      routeRow.add(new DivWidget(description, _css.resultListEntryDescription()));
  }
View Full Code Here


  }

  private ShowPlacesOnMapToggleHandler addShowOnMapLink(DivPanel parentPanel,
      final List<Place> addresses, final Object primaryResult) {

    DivPanel row = new DivPanel(_css.resultListMoreInfoLink());
    parentPanel.add(row);

    final Anchor anchor = new Anchor("Show all on map");
    row.add(anchor);

    ShowPlacesOnMapToggleHandler handler = new ShowPlacesOnMapToggleHandler(
        anchor, addresses, primaryResult);
    anchor.addClickHandler(handler);
    return handler;
View Full Code Here

        } else {
          _widget.add(new DivWidget("Did you mean:",
              _css.AddressLookupMultipleAddressesFound()));
          for (final Place placemark : places) {

            DivPanel panel = new DivPanel();
            panel.addStyleName(_css.AddressLookupPlacePanel());
            _widget.add(panel);

            ClickHandler handler = new ClickHandler() {
              public void onClick(ClickEvent arg0) {
                _control.setQueryLocation(placemark.getLocation());
              }
            };

            PlacePresenter p = new PlacePresenter();
            DivPanel placePanel = p.getPlaceAsPanel(placemark, handler);
            placePanel.addStyleName(_css.AddressLookupPlace());
            panel.add(placePanel);
          }
        }
      } else {
        _widget.setVisible(false);
View Full Code Here

          Actions.showArrivalsAndDeparturesForStop(getNavigationController(),
              stop.getId());
        }
      });

      DivPanel anchorRow = new DivPanel();
      panel.add(anchorRow);
      anchorRow.add(anchor);

      InfoWindow window = _map.getInfoWindow();
      LatLng point = LatLng.newInstance(stop.getLat(), stop.getLon());
      window.open(point, new InfoWindowContent(panel));
    }
View Full Code Here

TOP

Related Classes of org.onebusaway.webapp.gwt.common.widgets.DivPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.