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

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


    RouteBean route = trip.getRoute();
    String routeName = RoutePresenter.getNameForRoute(route);
   
    _arrivalsAndDeparturesTable.setText(rowIndex, 0, routeName);

    DivPanel divPanel = new DivPanel();

    DivPanel destinationPanel = new DivPanel("arrivalsDestinationEntry");
    divPanel.add(destinationPanel);
    String href = "trip.action?id=" + trip.getId() + "&stop="
        + bean.getStop().getId();
    destinationPanel.add(new Anchor(trip.getTripHeadsign(), href));

    DivPanel timeAndStatusPanel = new DivPanel("arrivalsTimePanel");
    divPanel.add(timeAndStatusPanel);
    String time = _timeFormat.format(new Date(bean.computeBestDepartureTime()));
    timeAndStatusPanel.add(new SpanWidget(time, "arrivalsTimeEntry"));
    timeAndStatusPanel.add(new SpanWidget(" - "));
    String arrivalStatusLabelStyle = _methods.getStatusLabelStyle(bean);
    timeAndStatusPanel.add(new SpanWidget(_methods.getStatusLabel(bean),
        arrivalStatusLabelStyle));
    _arrivalsAndDeparturesTable.setWidget(rowIndex, 1, divPanel);

    _arrivalsAndDeparturesTable.getCellFormatter().setStyleName(rowIndex, 2,
        "arrivalsStatusEntry");
View Full Code Here


    clear();

    if (_minimized) {

      DivPanel panel = new DivPanel();
      panel.addStyleName(_css.ResultsTableWidgetMinimized());
      _tablePanel.add(panel);

      Anchor showAllEntries = new Anchor("Show all results...");
      showAllEntries.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent arg0) {
          _control.clearActiveSearchResult();
        }
      });
      panel.add(showAllEntries);
     
      constructAttributionPanel();
     
    } else {
View Full Code Here

    _tablePanel.add(elements);
  }

  private void constructAttributionPanel() {
    DivPanel yelpAttribution = new DivPanel();
    yelpAttribution.addStyleName(_css.OneBusAwayYelpPanel());
    Anchor anchor = new Anchor(
        "<img src=\"http://static.px.yelp.com/static/20090202/i/new/developers/reviewsFromYelpRED.gif\"/>", true,
        "http://www.yelp.com/");
    anchor.addStyleName(_css.OneBusAwayYelpLink());
    yelpAttribution.add(anchor);

    _tablePanel.add(yelpAttribution);
  }
View Full Code Here

  public Widget create(final Context context) throws PageException {

    prepArrivalsAndDeparturesTable();

    DivPanel panel = new DivPanel();
    panel.addStyleName("panel");
    panel.add(_stopPanel);
    panel.add(_arrivalsAndDeparturesTable);

    DivPanel notificationOptionsPanel = new DivPanel(
        _notificationCss.notificationOptions());
    panel.add(notificationOptionsPanel);

    DivPanel minutesRow = getNotificationMinutesBeforePanel();
    notificationOptionsPanel.add(minutesRow);

    DivPanel methodsPanel = getMethodsPanel();
    notificationOptionsPanel.add(methodsPanel);

    // DivPanel saveDefaultsPanel = getSaveDefaultsPanel();
    // notificationOptionsPanel.add(saveDefaultsPanel);
View Full Code Here

    return panel;
  }

  private DivPanel getNotificationMinutesBeforePanel() {

    DivPanel minutesRow = new DivPanel(
        _notificationCss.notificationMinutesBeforePanel());

    minutesRow.add(new SpanWidget("Notify me"));

    _minutesBeforeTextBox = new TextBox();
    _minutesBeforeTextBox.addStyleName(_notificationCss.notificationMinutesBeforeTextBox());
    _minutesBeforeTextBox.setText(Integer.toString(DEFAULT_NOTIFY_MINUTES_BEFORE));
    MinutesBeforeHandler handler = new MinutesBeforeHandler();
    _minutesBeforeTextBox.addKeyUpHandler(handler);

    minutesRow.add(_minutesBeforeTextBox);

    minutesRow.add(new SpanWidget("minutes before arrival"));
    return minutesRow;
  }
View Full Code Here

    minutesRow.add(new SpanWidget("minutes before arrival"));
    return minutesRow;
  }

  private DivPanel getMethodsPanel() {
    DivPanel methodsPanel = new DivPanel(
        _notificationCss.notificationMethodsPanel());

    for (NotificationMethod method : _notificationMethods) {
      DivPanel row = new DivPanel(_notificationCss.notificationMethodPanel());
      if (method.getSelectionRow(row))
        methodsPanel.add(row);
    }

    return methodsPanel;
View Full Code Here

    return methodsPanel;
  }

  private DivPanel getSaveDefaultsPanel() {
    DivPanel panel = new DivPanel(_notificationCss.notificationDefaultsPanel());
    panel.add(new SpanWidget("Make this the default for:",
        _notificationCss.notificationDefaultsText()));

    Button justThisStop = new Button("This Stop");
    justThisStop.addStyleName(_notificationCss.notificationDefaultsButton());
    justThisStop.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent arg0) {
        NotificationState state = getState();
        _dao.setState(_stopId, state, false);
      }
    });
    panel.add(justThisStop);

    Button allStops = new Button("All Stops");
    allStops.addStyleName(_notificationCss.notificationDefaultsButton());
    allStops.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent arg0) {
        NotificationState state = getState();
        _dao.setState(_stopId, state, true);
      }
    });
    panel.add(allStops);

    return panel;
  }
View Full Code Here

    _stopPanel.clear();

    String url = "index.html#p(index)m(location)lat(" + stop.getLat() + ")lon("
        + stop.getLon() + ")accuracy(8)stop(" + stop.getId() + ")";

    DivPanel namePanel = new DivPanel(_stopCss.arrivalsStopAddress());
    _stopPanel.add(namePanel);

    Anchor nameLink = new Anchor(stop.getName(), url);
    namePanel.add(nameLink);

    DivPanel numberPanel = new DivPanel(_stopCss.arrivalsStopNumber());
    _stopPanel.add(numberPanel);
    Anchor numberLink = new Anchor("Stop # " + stop.getCode() + " - "
        + stop.getDirection() + " bound", url);
    numberPanel.add(numberLink);
  }
View Full Code Here

    if (RoutePresenter.isRouteNameLong(routeName))
      _arrivalsAndDeparturesTable.getCellFormatter().addStyleName(1, 0,
          _stopCss.arrivalsRouteLongNameEntry());

    DivPanel divPanel = new DivPanel();

    DivPanel destinationPanel = new DivPanel(
        _stopCss.arrivalsDestinationEntry());
    divPanel.add(destinationPanel);
    String href = "trip.action?id=" + trip.getId() + "&stop="
        + bean.getStop().getId();
    destinationPanel.add(new Anchor(trip.getTripHeadsign(), href));

    DivPanel timeAndStatusPanel = new DivPanel(_stopCss.arrivalsTimePanel());
    divPanel.add(timeAndStatusPanel);
    String time = _timeFormat.format(new Date(bean.computeBestDepartureTime()));
    timeAndStatusPanel.add(new SpanWidget(time, _stopCss.arrivalsTimeEntry()));
    timeAndStatusPanel.add(new SpanWidget(" - "));
    String arrivalStatusLabelStyle = _methods.getStatusLabelStyle(bean);
    timeAndStatusPanel.add(new SpanWidget(_methods.getStatusLabel(bean),
        arrivalStatusLabelStyle));
    _arrivalsAndDeparturesTable.setWidget(1, 1, divPanel);

    _arrivalsAndDeparturesTable.getCellFormatter().setStyleName(1, 2,
        _stopCss.arrivalsStatusEntry());
View Full Code Here

        Marker marker = new Marker(point);
        marker.addMarkerClickHandler(new MarkerClickHandler() {
          @Override
          public void onClick(MarkerClickEvent event) {
            InfoWindow window = _map.getInfoWindow();
            DivPanel panel = new DivPanel();

            DivPanel rowA = new DivPanel(_css.paragraph());
            panel.add(rowA);
            rowA.add(new Anchor(agency.getName(), agency.getUrl()));

            DivPanel rowB = new DivPanel(_css.paragraph());
            panel.add(rowB);
            rowB.add(new Anchor("jump to map", "index.html#m(location)lat("
                + point.getLatitude() + ")lon(" + point.getLongitude()
                + ")accuracy(4)"));
            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.