本文整理汇总了Java中com.google.gwt.place.shared.PlaceHistoryMapper类的典型用法代码示例。如果您正苦于以下问题:Java PlaceHistoryMapper类的具体用法?Java PlaceHistoryMapper怎么用?Java PlaceHistoryMapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlaceHistoryMapper类属于com.google.gwt.place.shared包,在下文中一共展示了PlaceHistoryMapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@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));
}
示例2: ApplicationRootView
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Inject
public ApplicationRootView(final PlaceHistoryMapper historyMapper, final PlaceController placeController, final UserApplicationConfig appConfig,
NotificationPanel notificationPanel, ThemeSwitcher themeSwitcher) {
this.placeController = placeController;
this.notificationPanel = notificationPanel;
this.themeSwitcher = themeSwitcher;
EventBus simpleEventBus = new SimpleEventBus();
notificationPanel.setEventBus(simpleEventBus);
NotificationUtil.setEventBus(simpleEventBus);
initWidget(UI_BINDER.createAndBindUi(this));
applicationTitle.setText(appConfig.getApplicationTitle());
applicationSubTitle.setText(appConfig.getApplicationSubTitle());
contributeLink.setHref("#" + historyMapper.getToken(new ContributePlace()));
}
示例3: ManagerDashboardView
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
public ManagerDashboardView(
WebConsoleLayoutView layoutView, PlaceHistoryMapper placeHistoryMapper) {
initWidget(uiBinder.createAndBindUi(this));
layoutView.addActionButton(createSimulationButton);
RefreshButton refreshButton = new RefreshButton();
refreshButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (observer != null) {
observer.onRefresh();
}
}
});
layoutView.setNavWidget(BasicNavMenu.newBuilder(placeHistoryMapper)
.addLink(ManagerDashboardPlace.NAME, new ManagerDashboardPlace())
.build());
layoutView.addActionButton(refreshButton);
initSimulationTable();
}
示例4: GoogleAnalyticsNavigationTracker
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Inject
public GoogleAnalyticsNavigationTracker( @GaAccount final String gaAccount,
final EventBus eventBus,
final GoogleAnalytics analytics,
final PlaceHistoryMapper mapper )
{
_analytics = analytics;
_mapper = mapper;
if ( GWT.isScript() )
{
Scheduler.get().scheduleDeferred( new ScheduledCommand()
{
@Override
public void execute()
{
setupAnalytics( analytics, gaAccount, eventBus );
}
} );
}
}
示例5: PlaceControllerEx
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public PlaceControllerEx(EventBus eventBus, PlaceHistoryMapper historyMapper, Place defaultPlace) {
super(eventBus);
this.historyMapper = historyMapper;
this.defaultPlace = defaultPlace;
eventBus.addHandler(PlaceChangeEvent.TYPE, new PlaceChangeEvent.Handler() {
@Override
public void onPlaceChange(PlaceChangeEvent event) {
previousPlace = currentPlace;
currentPlace = event.getNewPlace();
}
});
}
示例6: configure
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Override
protected void configure() {
/*
* bind both versions of EventBus to the same single instance of the SimpleEventBus
*/
bind(SimpleEventBus.class).in(Singleton.class);
bind(EventBus.class).to(SimpleEventBus.class);
bind(com.google.gwt.event.shared.EventBus.class).to(SimpleEventBus.class);
/* navigation */
bind(Historian.class).to(DefaultHistorian.class).in(Singleton.class);
bind(AppPlaceHistoryMapper.class).in(Singleton.class);
bind(PlaceHistoryMapper.class).to(AppPlaceHistoryMapper.class);
bind(PrefixedPlaceHistoryMapper.class).to(AppPlaceHistoryMapper.class);
bind(PlaceController.class).to(PlaceControllerEx.class).in(Singleton.class);
bind(ActivityMapper.class).to(Level9ActivityMapper.class).in(Singleton.class);
/* set scope of views */
bind(Level9ApplicationView.class).to(Level9ApplicationViewImpl.class).in(Singleton.class);
bind(Level9GameView.class).to(Level9GameViewImpl.class).in(Singleton.class);
/* choose desktop implementation */
bind(ApplicationActivity.class).to(Level9ApplicationActivity.class);
}
示例7: SimulationView
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
public SimulationView(WebConsoleLayoutView layoutView, PlaceHistoryMapper placeHistoryMapper) {
add(environmentView);
layoutView.setNavWidget(BasicNavMenu.newBuilder(placeHistoryMapper)
.addLink(ManagerDashboardPlace.NAME, new ManagerDashboardPlace())
.build());
}
示例8: init
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
public void init(PlaceHistoryMapper placeHistoryMapper, Place defaultPlace, Place homePlace) {
this.placeHistoryMapper = placeHistoryMapper;
this.defaultPlace = defaultPlace;
this.homePlace = homePlace;
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(placeHistoryMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
GWT.log("Here?");
historyHandler.handleCurrentHistory();
}
示例9: configure
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Override
protected void configure() {
bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);
// PlaceHistoryMapper instantiate new places based on the browser URL.
// You
// only need one of those for the entire app.
bind(PlaceHistoryMapper.class).to(ApplicationPlaceHistoryMapper.class)
.in(Singleton.class);
// / ActivityMapper maps the place to a new activity instance.
// You should have one activity mapper for each display area.
bind(ActivityMapper.class).to(ActivityMapperImpl.class).in(
Singleton.class);
}
示例10: onModuleLoad
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@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();
}
示例11: DesktopApp
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Inject
public DesktopApp(final EventBus eventBus,
final PlaceController placeController,
final ActivityMapper activityMapper,
final PlaceHistoryMapper placeHistoryMapper,
final ShellDisplay.Presenter shell) {
this.eventBus = eventBus;
this.placeController = placeController;
this.activityMapper = activityMapper;
this.placeHistoryMapper = placeHistoryMapper;
this.shell = shell;
}
示例12: configure
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Override
protected void configure() {
bind(App.class).to(DesktopApp.class).in(Singleton.class);
bind(EventBus.class).to(SimpleEventBus.class).asEagerSingleton();
bind(PlaceController.class).toProvider(PlaceControllerProvider.class).in(Singleton.class);
install(new GinFactoryModuleBuilder().build(AppActivityMapper.Factory.class));
bind(ActivityMapper.class).to(AppActivityMapper.class).in(Singleton.class);
bind(PlaceHistoryMapper.class).to(AppPlaceHistoryMapper.class).in(Singleton.class);
bind(AppRequestFactory.class).toProvider(AppRequestFactoryProvider.class).in(Singleton.class);
bind(Messages.class).in(Singleton.class);
bind(Constants.class).in(Singleton.class);
// Views
bind(ShellDisplay.class).to(ShellView.class).asEagerSingleton();
bind(EventsDisplay.class).to(EventsView.class).asEagerSingleton();
bind(EventDetailDisplay.class).to(EventDetailView.class).asEagerSingleton();
bind(SubjectDisplay.class).to(SubjectView.class).asEagerSingleton();
// Presenters
bind(ShellDisplay.Presenter.class).to(ShellPresenter.class).in(Singleton.class);
bind(EventsDisplay.Presenter.class).to(EventsPresenter.class);
bind(EventDetailDisplay.Presenter.class).to(EventDetailPresenter.class);
bind(SubjectDisplay.Presenter.class).to(SubjectPresenter.class);
}
示例13: getHistoryHandler
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Provides
@Singleton
public final PlaceHistoryHandler getHistoryHandler( @Nonnull final PlaceController placeController,
@Nonnull final PlaceHistoryMapper historyMapper,
@Nonnull final com.google.web.bindery.event.shared.EventBus eventBus,
@Nonnull final Place place )
{
final PlaceHistoryHandler historyHandler = new PlaceHistoryHandler( historyMapper );
historyHandler.register( placeController, eventBus, place );
return historyHandler;
}
示例14: providePlaceController
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Provides
@Singleton
PlaceControllerEx providePlaceController(com.google.gwt.event.shared.EventBus eventBus,
PlaceHistoryMapper historyMapper, @DefaultPlace Place defaultPlace) {
return new PlaceControllerEx(eventBus, historyMapper, defaultPlace);
}
示例15: providePlaceHistoryHandler
import com.google.gwt.place.shared.PlaceHistoryMapper; //导入依赖的package包/类
@Provides
@Singleton
PlaceHistoryHandler providePlaceHistoryHandler(PlaceHistoryMapper historyMapper, Historian historian,
PlaceController placeController, EventBus eventBus, @DefaultPlace Place defaultPlace) {
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper, historian);
historyHandler.register(placeController, eventBus, defaultPlace);
return historyHandler;
}