コード例 #1
0
  /**
   * @param detailView
   * @param eventId
   */
  public RouteDetailsActivity(Place newPlace, ClientFactory cf) {
    super(cf.getRouteDetailsView(), "");
    clientFactory = cf;

    if (newPlace instanceof RouteDetailsPlace) {
      RouteDetailsPlace place = (RouteDetailsPlace) newPlace;
      view = clientFactory.getRouteDetailsView();
      bikeTrainRoute = place.getRoute();

      RouteContainerFactory.getRouteContainer().setDetailsActivity(this);

      addHandlerRegistration(view.getBackbutton().addTapHandler(new ReturnToEventTapHandler()));
      addHandlerRegistration(
          view.getHeaderTapHandlers().addClickHandler(new ReturnToEventClickHandler()));
    }
  }
コード例 #2
0
 /**
  * @see com.google.gwt.activity.shared.Activity#start(com.google.gwt.user.client
  *     .ui.AcceptsOneWidget, com.google.gwt.event.shared.EventBus)
  */
 @Override
 public void start(AcceptsOneWidget panel, EventBus eventBus) {
   super.start(panel, eventBus);
   if (view == null) {
     view = clientFactory.getHomeView();
     view.getHeader().setText("ABC Bike Trains - Home");
     List<NavLink> links = getLinks();
     view.getNavList().render(getLinks());
     view.getNavList().addCellSelectedHandler(new NavLinkSelectedHandler(links, clientFactory));
   }
   panel.setWidget(view);
 }