Package org.onebusaway.transit_data.model

Examples of org.onebusaway.transit_data.model.StopBean


    logUserInteraction("query", _stopCode);

    if (_stops.size() == 0) {
      return "noStopsFound";
    } else if (_stops.size() == 1) {
      StopBean stop = _stops.get(0);
      _stopIds = Arrays.asList(stop.getId());
      return SUCCESS;
    } else {
      return "multipleStopsFound";
    }
  }
View Full Code Here


  @Override
  public void buildTemplate(ActionContext context) {

    ValueStack vs = context.getValueStack();

    StopBean stop = (StopBean) vs.findValue("stop");

    addMessage(Messages.THE_STOP_NUMBER_FOR);

    addText(_destinationPronunciation.modify(stop.getName()));

    String direction = _directionPronunciation.modify(stop.getDirection());
    addMessage(Messages.DIRECTION_BOUND, direction);

    addText(Messages.IS);
    addText(stop.getCode());

    addMessage(Messages.STOP_FOUND_ARRIVAL_INFO);
    AgiActionName arrivalInfoAction = addAction("1", "/stop/arrivalsAndDeparturesForStopId");
    arrivalInfoAction.putParam("stopIds", Arrays.asList(stop.getId()));

    addMessage(Messages.STOP_FOUND_BOOKMARK_THIS_LOCATION);
    AgiActionName bookmarkAction = addAction("2", "/stop/bookmark");
    bookmarkAction.putParam("stop", stop);
View Full Code Here

          resultingOverlays.add(line);

          addBoundsToBounds(line.getBounds(), bounds);
        }

        StopBean stop = leg.getFromStop();

        if (stop != null) {
          String routeName = leg.getRouteShortName();

          TripPlannerResources resources = TripPlannerResources.INSTANCE;
          SpanPanel w = new SpanPanel();
          w.addStyleName(_css.routeTinyInfoWindow());
          Image image = new Image(resources.getBus14x14().getUrl());
          image.addStyleName(_css.routeModeIcon());
          w.add(image);
          SpanWidget name = new SpanWidget(routeName);
          name.setStyleName(_css.routeName());
          w.add(name);

          LatLng point = LatLng.newInstance(stop.getLat(), stop.getLon());
          TinyInfoWindowMarker marker = new TinyInfoWindowMarker(point, w);
          resultingOverlays.add(marker);

          bounds.extend(point);
        }
View Full Code Here

      row.setStyle(ListViewRowStyle.DEFAULT);
      row.setText("No recent stops");
      return row;
    }

    StopBean stop = _recentStops.get(rowIndex);

    ListViewRow row = new ListViewRow();
    row.setStyle(ListViewRowStyle.DETAIL);
    row.setText(stop.getName());

    StringBuilder b = new StringBuilder();

    if (stop.getDirection() != null)
      b.append(stop.getDirection()).append(" bound - ");
    b.append("Routes:");
    boolean first = true;
    for (RouteBean route : stop.getRoutes()) {
      if (!first)
        b.append(",");
      b.append(" ");
      b.append(route.getShortName());
      first = false;
View Full Code Here

      int sectionIndex, int rowIndex) {

    if (_recentStops.isEmpty())
      return;

    StopBean stop = _recentStops.get(rowIndex);
    Actions.showArrivalsAndDeparturesForStop(
        listViewController.getNavigationController(), stop.getId());
  }
View Full Code Here

    });

    _transitMapManager.addStopClickedHandler(new StopClickedHandler() {
      @Override
      public void handleStopClicked(StopClickedEvent event) {
        StopBean stop = event.getStop();
        InfoWindow window = _map.getInfoWindow();
        LatLng point = LatLng.newInstance(stop.getLat(), stop.getLon());
        Widget widget = getStopInfoWindowWidget(stop,style);
        window.open(point, new InfoWindowContent(widget));
      }
    });
  }
View Full Code Here

    ListViewRow row = new ListViewRow();

    switch (sectionIndex) {
      case 0: {

        StopBean stop = _data.getStop();
        row.setStyle(ListViewRowStyle.DEFAULT);
        row.setText(stop.getName());

        if (stop.getDirection() != null || stop.getCode() != null) {
          row.setStyle(ListViewRowStyle.DETAIL);
          StringBuilder b = new StringBuilder();
          if (stop.getDirection() != null)
            b.append(stop.getDirection()).append(" bound - ");
          if (stop.getCode() != null)
            b.append("Stop # ").append(stop.getCode());
          row.setDetailText(b.toString());
        }
        break;
      }
      case 1: {
View Full Code Here

        DivPanel row4 = new DivPanel(_css.tripPanelVehiclePanelRow4());
        panel.add(row4);
       
        String fromStopName = "";
        StopBean fromStop = transitLeg.getFromStop();
        if( fromStop != null)
          fromStopName = fromStop.getName();
       
        String toStopName = "";
        StopBean toStop = transitLeg.getToStop();
        if( toStop != null)
          toStopName = toStop.getName();

        row2.add(new DivWidget(departureTime,
            _css.tripPlanVehiclePanelDepartureTime(),
            _css.tripPlanVehiclePanelA()));
        row2.add(new DivWidget("Depart " + fromStopName,
View Full Code Here

    _point = point;
  }

  public void onClick(MarkerClickEvent event) {

    StopBean stop = _bean.getStop();

    FlowPanel panel = new FlowPanel();
    panel.add(new DivWidget(stop.getName()));
    panel.add(new DivWidget("Stop # " + stop.getId()));
    panel.add(new DivWidget("Travel Time: " + (_bean.getTime() / 60) + " mins"));

    MapWidget map = _mapManager.getMapWidget();
    InfoWindow window = map.getInfoWindow();
    window.open(_point, new InfoWindowContent(panel));
View Full Code Here

  private void displayPrimaryResult(Object primary) {
    if (primary instanceof RouteBean) {
      RouteBean route = (RouteBean) primary;
      _service.getStopsForRoute(route.getId(), new StopsForRouteCallback(route));
    } else if (primary instanceof StopBean) {
      StopBean stop = (StopBean) primary;
      _transitMapManager.showStop(stop, true);
    } else if (primary instanceof Place) {
      Place place = (Place) primary;
      _transitMapManager.showPlace(place, true, null);
    }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data.model.StopBean

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.