com.google.gwt.activity.shared.ActivityMapper Java Examples

The following examples show how to use com.google.gwt.activity.shared.ActivityMapper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ApplicationClientModule.java    From bitcoin-transaction-explorer with MIT License 6 votes vote down vote up
@Override
protected void configure() {
  // Binding application critical architecture
  bind(ActivityMapper.class).to(ApplicationActivityMapper.class).in(Singleton.class);;
  bind(Place.class).annotatedWith(DefaultPlace.class).to(StartupPlace.class).in(Singleton.class);
  bind(PlaceController.class).to(ApplicationPlaceController.class).in(Singleton.class);
  bind(BitcoinPlaceRouter.class).to(ApplicationPlaceController.class).in(Singleton.class);
  bind(PlaceHistoryMapper.class).to(ApplicationPlaceHistoryMapper.class).in(Singleton.class);
  bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);
  bind(ColorPicker.class).to(SimpleColorPicker.class).in(Singleton.class);

  // Binding views
  bind(StartupView.class).to(StartupViewImpl.class).in(Singleton.class);
  bind(TransactionView.class).to(TransactionViewImpl.class);
  bind(BlockView.class).to(BlockViewImpl.class);
  bind(MineView.class).to(MineViewImpl.class);
  bind(ScriptView.class).to(ScriptViewImpl.class);
  bind(ConfigView.class).to(ConfigViewImpl.class);
  bind(ContributeView.class).to(ContributeViewImpl.class);
  bind(RPCResponseView.class).to(RPCResponseViewImpl.class);
  bind(AddressView.class).to(AddressViewImpl.class);

  install(new GinFactoryModuleBuilder().build(ActivityFactory.class));
}
 
Example #2
Source File: Showcase.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void onModuleLoad() {
    populateMenu();

    // Create view container
    final SimplePanel container = new SimplePanel();
    container.setStyleName("container requestor-showcase-container");
    RootPanel.get().add(container);

    // Main Factory (Dependency Injector)
    ShowcaseClientFactory clientFactory = CLIENT_FACTORY;
    EventBus eventBus = clientFactory.getEventBus();
    PlaceController placeController = clientFactory.getPlaceController();

    // Activity-Place binding
    ActivityMapper activityMapper = new ShowcaseActivityMapper();
    ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
    activityManager.setDisplay(container);

    // Place-History binding
    PlaceHistoryMapper historyMapper = new ShowcasePlaceHistoryMapper();
    PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
    historyHandler.register(placeController, eventBus, defaultPlace);

    // Add Loading widget
    RootPanel.get().add(new Loading(eventBus));

    // Goes to place represented on URL or default place
    historyHandler.handleCurrentHistory();
}