/**
  * @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);
   setViewDetails(bikeTrainRoute);
   setNavHandlers(view);
   panel.setWidget(view);
 }
 @Override
 public void start(AcceptsOneWidget panel, EventBus eventBus) {
   view = Util.getGeolocationView();
   view.setPresenter(this);
   panel.setWidget(view);
   eventBus.fireEvent(new SourceUpdateEvent(view.getClass().getName()));
 }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    panel.setWidget(view);

    GaeUserRequest request = rf.loginRequest();
    request
        .getCurrentUser()
        .to(
            new Receiver<GaeUserProxy>() {
              @Override
              public void onSuccess(GaeUserProxy user) {
                view.setNickname(user.getNickname());
              }
            });
    request
        .createLogoutURL(Window.Location.getHref())
        .to(
            new Receiver<String>() {
              @Override
              public void onSuccess(String url) {
                view.setLogoutURL(url);
              }
            });
    request.fire();
  }
Exemple #4
0
  @Override
  public void start(
      AcceptsOneWidget containerWidget, com.google.gwt.event.shared.EventBus eventBus) {
    containerWidget.setWidget(navigationView.asWidget());
    registrations.add(
        navigationView
            .getSelectionModel()
            .addSelectionChangeHandler(
                new SelectionChangeEvent.Handler() {
                  @Override
                  public void onSelectionChange(SelectionChangeEvent event) {
                    TreePlace place = navigationView.getSelectionModel().getSelectedObject();
                    if (place != null) {
                      goTo(place);
                    }
                  }
                }));
    registrations.add(
        eventBus.addHandler(
            DataEvent.getType(),
            new DataEventHandler() {

              @Override
              public void onDataChanged(DataEvent event) {
                if (event.refreshTree()) {
                  refreshTree();
                  if (pendingPlace != null) {
                    selectPlace(pendingPlace);
                  }
                }
              }
            }));
  }
  @SuppressWarnings("deprecation")
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {

    Log.info("ClinicDetailsActivity.start()");
    ClinicDetailsView ClinicDetailsView = new ClinicDetailsViewImpl();
    ClinicDetailsView.setPresenter(this);

    this.widget = panel;
    this.view = ClinicDetailsView;
    widget.setWidget(ClinicDetailsView.asWidget());

    view.setDelegate(this);
    loadDisplaySettings();

    requests
        .find(place.getProxyId())
        .fire(
            new Receiver<Object>() {

              public void onFailure(ServerFailure error) {
                Log.error(error.getMessage());
              }

              @Override
              public void onSuccess(Object response) {

                if (response instanceof ClinicProxy) {
                  Log.info(((ClinicProxy) response).getName());
                  init((ClinicProxy) response);
                }
              }
            });
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    // Tell the view we are the controller
    this.personEditView.setPresenter(this);

    panel.setWidget(this.personEditView);
  }
  @Override
  public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
    ReportView reportView = clientFactory.getReportView();

    reportView.setPresenter(this);
    containerWidget.setWidget(reportView.asWidget());
  }
 @Override
 public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
   view.initWithTabs(ArrayDesignTab.values());
   view.setPresenter(this);
   view.selectTab(selectedTab);
   containerWidget.setWidget(view.asWidget());
 }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    this.eventBus = eventBus;

    display.setPresenter(this);
    panel.setWidget(display);
    this.eventBus = eventBus;
    handlerRegistration(eventBus);
    if (repositoryUri == null || repositoryUri.length() == 0 || repositoryUri.equals("null")) {
      this.repo = JavaScriptObject.createObject().<Repository>cast();
      display.setData(this.repo);
    } else {
      display.setData(this.repo);
      getRepo(this.repositoryUri);
      fetchFiles(repositoryUri, this.prefix);
      CacheManager.EventConstructor change =
          new CacheManager.EventConstructor() {
            @Override
            public RepoUpdate newInstance(String key) {
              return new RepoUpdate();
            }
          };
      cacheManager.register(repositoryUri, "repoContent", change);
    }
  }
  @Override
  public void start(AcceptsOneWidget panel, final EventBus eventBus) {
    super.start(panel, eventBus);
    AboutView aboutView = clientFactory.getAboutView();

    aboutView.getBackbuttonText().setText("Home");

    aboutView.getHeader().setText("About");

    aboutView.getMainButtonText().setText("Nav");

    addHandlerRegistration(
        aboutView
            .getBackbutton()
            .addTapHandler(
                new TapHandler() {

                  @Override
                  public void onTap(TapEvent event) {
                    ActionEvent.fire(eventBus, ActionNames.BACK);
                  }
                }));

    panel.setWidget(aboutView);
  }
  public void start(AcceptsOneWidget container, EventBus eventBus) {

    display.setListener(this);
    display.setLoginErrorMessage("");
    sessionID = Cookies.getCookie("sid");

    container.setWidget(display.asWidget());
  }
Exemple #12
0
 @Override
 public void start(AcceptsOneWidget panel, EventBus eventBus) {
   // you can use here every view you want
   CellTableView cellTableView = clientFactory.getCellTableView();
   cellTableView.setName(name);
   cellTableView.setPresenter(this);
   panel.setWidget(cellTableView);
 }
  @Override
  public void start(AcceptsOneWidget panel, final EventBus eventBus) {
    view = clientFactory.getAboutView();
    this.eventBus = eventBus;
    view.setPresenter(this);

    panel.setWidget(view);
  }
 @Override
 public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
   this.eventBus = eventBus;
   containerWidget.setWidget(view);
   bind(eventBus);
   loadParsedDataMenu();
   logger.log(Level.INFO, "DoublePanelActivity started");
 }
 @Override
 public void start(AcceptsOneWidget panel, EventBus eventBus) {
   PopViewImpl view = Util.getPopView();
   view.setPresenter(this);
   Pop pop = new Pop();
   ViewPort.get().setAnimation(pop);
   panel.setWidget(view);
   eventBus.fireEvent(new SourceUpdateEvent(view.getClass().getName()));
 }
 /**
  * @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);
 }
Exemple #17
0
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    Log.info("SystemStartActivity.start()");
    SummoningsView systemStartView = new SummoningsViewImpl();
    systemStartView.setPresenter(this);
    this.widget = panel;
    this.view = systemStartView;
    widget.setWidget(systemStartView.asWidget());

    init();

    view.setDelegate(this);
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view = GWT.create(PaaSOfferingEditorGuideView.class);
    view.setPresenter(this);
    panel.setWidget(view);

    if (place instanceof PaaSOfferingAware
        && Strings.isNotEmpty(((PaaSOfferingAware) place).getPaaSOfferingUriId()))
      view.setOfferingSelected(true);
    else view.setOfferingSelected(false);

    registerViewDetacher(view);
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    this.eventBus = eventBus;

    display.setPresenter(this);
    panel.setWidget(display);
    if (repositoryUri == null || repositoryUri.length() == 0 || repositoryUri.equals("null")) {
      this.repo = JavaScriptObject.createObject().<Repository>cast();
      display.setData(this.repo);
    } else {
      display.setData(this.repo);
      getRepo();
    }
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    this.loggedPerson = null;

    this.eventBus = eventBus;
    this.view.setPresenter(this);

    this.view.clear();

    updateMailsFromPerson();

    panel.setWidget(view);

    hr = eventBus.addHandler(MailChangeModifiedEvent.TYPE, handler);
  }
  @Override
  public void start(final AcceptsOneWidget panel, EventBus eventBus) {
    final String msg = "Failed to load book selection data. [" + category.toString() + "]";

    panel.setWidget(view);
    LoadingPanel.INSTANCE.show();
    view.setPresenter(this);

    eventBus.fireEvent(new SidebarItemSelectedEvent(getLabel(category)));

    view.setHeaderText(getHeader(category));
    service.loadBookSelectionData(
        WebsiteConfig.INSTANCE.collection(),
        category,
        LocaleInfo.getCurrentLocale().getLocaleName(),
        new AsyncCallback<BookSelectList>() {
          @Override
          public void onFailure(Throwable caught) {
            logger.log(Level.SEVERE, msg, caught);
            view.addErrorMessage(msg);
            if (caught instanceof RosaConfigurationException) {
              view.addErrorMessage(caught.getMessage());
            }
            LoadingPanel.INSTANCE.hide();
          }

          @Override
          public void onSuccess(BookSelectList result) {
            LoadingPanel.INSTANCE.hide();
            if (result == null) {
              logger.severe(msg);
              view.addErrorMessage(msg);
              return;
            }
            result.setCategory(category);
            view.setData(result);
          }
        });

    Scheduler.get()
        .scheduleDeferred(
            new ScheduledCommand() {
              @Override
              public void execute() {
                view.onResize();
              }
            });
  }
  @Override
  public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
    panel.setWidget(new Image(Resources.INSTANCE.loader()));
    GWT.runAsync(
        new RunAsyncCallback() {
          @Override
          public void onSuccess() {
            initDisplay(panel, eventBus);
          }

          @Override
          public void onFailure(Throwable reason) {
            // TODO 自動生成されたメソッド・スタブ
          }
        });
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    shell.showSidebar();
    shell.getSidebar().clear();
    shell.getSidebar().addPlace("Nav Sample", new InfoPlace(""));

    clutch.getEvents(
        new ClutchCallback<EventListBean>(EventListBean.class) {

          @Override
          public void onComplete(EventListBean data) {
            Window.alert("Size:" + data.getList().size());
          }
        });

    panel.setWidget(view);
  }
  private void initDisplay(AcceptsOneWidget panel, EventBus eventBus) {
    display = displayProvider.get();
    display.setPresenter(this);
    panel.setWidget(display);
    serviceProvider
        .get()
        .getSkillNames(
            new AsyncCallback<SkillMap[]>() {
              @Override
              public void onSuccess(SkillMap[] result) {
                display.setSkillMaps(result);
              }

              @Override
              public void onFailure(Throwable caught) {}
            });
  }
  /** Invoked by the ActivityManager to start a new Activity */
  public void start(AcceptsOneWidget containerWidget, EventBus eventBus) {
    routeListView.setPresenter(this);
    routeListView.clearRouteList();
    RouteRequest routeRequest = boulderLogRequestFactory.routeRequest();
    routeRequest
        .listAll()
        .fire(
            new Receiver<List<RouteProxy>>() {
              @Override
              public void onSuccess(List<RouteProxy> response) {
                for (final RouteProxy r : response) {
                  routeListView.createRouteWidget(r);
                }
              }
            });

    containerWidget.setWidget(routeListView.asWidget());
  }
  @Override
  public void start(AcceptsOneWidget panel, final EventBus eventBus) {
    view = clientFactory.getYouTubeDetailsView();
    this.eventBus = eventBus;
    view.setPresenter(this);

    Place place = clientFactory.getPlaceController().getWhere();

    if (place instanceof YouTubeDetailsPlace) {
      YouTubeDetailsPlace youTubeDetailsPlace = (YouTubeDetailsPlace) place;

      view.setTitle(youTubeDetailsPlace.getYouTubeItem().getTitle());
      view.setEmbedContent(youTubeDetailsPlace.getYouTubeItem().getId());
      view.setDescription(youTubeDetailsPlace.getYouTubeItem().getDescription());
    }

    panel.setWidget(view);
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {

    Log.info("AnamnesisCheckEditActivity.start()");
    AnamnesisCheckEditView anamnesisCheckEditView = new AnamnesisCheckEditViewImpl();

    this.widget = panel;
    this.view = anamnesisCheckEditView;

    editorDriver = view.createEditorDriver();

    view.setDelegate(this);

    if (this.place.getOperation() == Operation.EDIT) {
      Log.info("edit");
      requests
          .find(place.getProxyId())
          .with("anamnesisForm", "anamnesisCheckTitle")
          .fire(
              new Receiver<Object>() {
                public void onFailure(ServerFailure error) {
                  Log.error(error.getMessage());
                }

                @Override
                public void onSuccess(Object response) {
                  if (response instanceof AnamnesisCheckProxy) {
                    Log.info(((AnamnesisCheckProxy) response).getId().toString());
                    // init((AnamnesisCheckProxy) response);
                    anamnesisCheck = (AnamnesisCheckProxy) response;
                    init();
                  }
                }
              });
    } else {

      Log.info("new AnamnesisCheck");
      // anamnesisCheckPlace.setProxyId(anamnesisCheck.stableId());
      init();
    }
    // view.initialiseDriver(requests);
    widget.setWidget(anamnesisCheckEditView.asWidget());
    // setTable(view.getTable());
  }
  /** The activity has started */
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    Log.info("SystemStartActivity.start()");
    AnamnesisCheckView systemStartView = new AnamnesisCheckViewImpl();
    innerSystemStartView = systemStartView;
    //        AnamnesisCheckView systemStartView = getAnamnesisCheckView();
    systemStartView.setPresenter(this);
    this.widget = panel;
    this.view = systemStartView;

    MenuClickEvent.register(requests.getEventBus(), (AnamnesisCheckViewImpl) view);

    widget.setWidget(systemStartView.asWidget());
    init();

    activityManger.setDisplay(view.getDetailsPanel());
    placeChangeHandlerRegistration =
        eventBus.addHandler(
            PlaceChangeEvent.TYPE,
            new PlaceChangeEvent.Handler() {

              @Override
              public void onPlaceChange(PlaceChangeEvent event) {
                if (event.getNewPlace() instanceof AnamnesisCheckDetailsPlace) {
                  requests.getEventBus().fireEvent(new ApplicationLoadingScreenEvent(true));
                  view.setDetailPanel(true);
                  requests.getEventBus().fireEvent(new ApplicationLoadingScreenEvent(false));
                  AnamnesisCheckDetailsPlace place =
                      (AnamnesisCheckDetailsPlace) event.getNewPlace();
                  if (place.getOperation() == Operation.NEW) {
                    requests.getEventBus().fireEvent(new ApplicationLoadingScreenEvent(false));
                    getSearchStringByEntityProxyId(
                        (EntityProxyId<AnamnesisCheckProxy>) place.getProxyId());
                  }
                } else if (event.getNewPlace() instanceof AnamnesisCheckPlace) {
                  view.setDetailPanel(false);
                  AnamnesisCheckPlace place = (AnamnesisCheckPlace) event.getNewPlace();
                  if (place.getToken().contains("!DELETED")) {
                    //                        initSearch();
                  }
                }
              }
            });
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view = clientFactory.getSeattleExpressLanesView();
    this.eventBus = eventBus;
    this.phoneGap = this.clientFactory.getPhoneGap();
    accessibility = clientFactory.getAccessibility();
    view.setPresenter(this);
    view.getPullHeader().setHTML("pull down");
    inAppBrowser = this.phoneGap.getInAppBrowser();

    PullArrowStandardHandler headerHandler =
        new PullArrowStandardHandler(view.getPullHeader(), view.getPullPanel());

    headerHandler.setErrorText("Error");
    headerHandler.setLoadingText("Loading");
    headerHandler.setNormalText("pull down");
    headerHandler.setPulledText("release to load");
    headerHandler.setPullActionHandler(
        new PullActionHandler() {

          @Override
          public void onPullAction(final AsyncCallback<Void> callback) {

            new Timer() {

              @Override
              public void run() {
                createPostList();
                view.refresh();
                callback.onSuccess(null);
              }
            }.schedule(1);
          }
        });

    view.setHeaderPullHandler(headerHandler);

    createPostList();
    createSchedulesLink();

    panel.setWidget(view);

    accessibility.postScreenChangeNotification();
  }
Exemple #30
0
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {

    view.setPresenter(this);
    panel.setWidget(view.asWidget());
    try {
      view.setGame(game);
    } catch (PlayException e) {

      GWT.log(e.getMessage(), e);
      // Goto error page
    } catch (LoadException e) {
      GWT.log(e.getMessage(), e);
      // Goto error page
    } catch (Exception e) {
      GWT.log(e.getMessage(), e);
      // Goto error page
    }
  }