本文整理汇总了Java中com.google.gwt.activity.shared.ActivityMapper类的典型用法代码示例。如果您正苦于以下问题:Java ActivityMapper类的具体用法?Java ActivityMapper怎么用?Java ActivityMapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActivityMapper类属于com.google.gwt.activity.shared包,在下文中一共展示了ActivityMapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onModuleLoad
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
@Override
public void onModuleLoad() {
ClientFactory clientFactory = GWT.create(ClientFactory.class);
EventBus eventBus = clientFactory.getEventBus();
PlaceController placeController = clientFactory.getPlaceController();
// Start ActivityManager for the twitter widget with our ActivityMapper
ActivityMapper activityMapper = new AppActivityMapper(clientFactory);
ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
activityManager.setDisplay(appWidget);
// Start PlaceHistoryHandler with our PlaceHistoryMapper
AppPlaceHistoryMapper historyMapper= GWT.create(AppPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
RootPanel.get().add(appWidget);
// Goes to the place represented on URL else default place
historyHandler.handleCurrentHistory();
}
示例2: createPhoneDisplay
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
private void createPhoneDisplay(ClientFactory clientFactory) {
AnimationWidget navDisplay = new AnimationWidget();
ActivityMapper navActivityMapper = new AppNavActivityMapper(clientFactory);
AnimationMapper navAnimationMapper = new AppNavAnimationMapper();
AnimatingActivityManager navActivityManager = new AnimatingActivityManager(
navActivityMapper, navAnimationMapper,
clientFactory.getEventBus());
navActivityManager.setDisplay(navDisplay);
clientFactory.getSwipeMenu().setMenuDisplay(navDisplay);
AnimationWidget mainDisplay = new AnimationWidget();
AppMainActivityMapper tabletMainActivityMapper = new AppMainActivityMapper(clientFactory);
AnimationMapper tabletMainAnimationMapper = new AppMainAnimationMapper();
AnimatingActivityManager mainActivityManager = new AnimatingActivityManager(
tabletMainActivityMapper, tabletMainAnimationMapper,
clientFactory.getEventBus());
mainActivityManager.setDisplay(mainDisplay);
clientFactory.getSwipeMenu().setContentDisplay(mainDisplay);
RootPanel.get().add(clientFactory.getSwipeMenu());
}
示例3: onModuleLoad
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
/**
* This is the entry point method.
*/
public void onModuleLoad() {
ClientFactory clientFactory = GWT.create(ClientFactory.class);
EventBus eventBus = clientFactory.getEventBus();
PlaceController placeController = clientFactory.getPlaceController();
// Start ActivityManager for the main widget with our ActivityMapper
ActivityMapper activityMapper = new AppMapper(clientFactory);
ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
activityManager.setDisplay(new SimplePanel());
// Start PlaceHistoryHandler with our PlaceHistoryMapper
AppPlaceHistoryMapper historyMapper = GWT.create(AppPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
// Goes to the place represented on URL else default place
historyHandler.handleCurrentHistory();
}
示例4: createTabletDisplay
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
private void createTabletDisplay() {
AnimatableDisplay navDisplay = GWT.create(AnimatableDisplay.class);
SimplePanel navPanel = new SimplePanel();
navPanel.getElement().setId("nav");
navPanel.getElement().addClassName("landscapeonly");
TabletPortraitOverlay tabletPortraitOverlay = new TabletPortraitOverlay();
OrientationRegionHandler orientationRegionHandler = new OrientationRegionHandler(navPanel, tabletPortraitOverlay, navDisplay);
MasterRegionHandler masterRegionHandler = new MasterRegionHandler(getClientFactory().getEventBus(), "nav", tabletPortraitOverlay);
ActivityMapper navActivityMapper = new TabletNavActivityMapper(getClientFactory());
AnimationMapper navAnimationMapper = new TabletNavAnimationMapper();
AnimatingActivityManager navActivityManager = new AnimatingActivityManager(navActivityMapper, navAnimationMapper, getClientFactory().getEventBus());
navActivityManager.setDisplay(navDisplay);
RootPanel.get().add(navPanel);
AnimatableDisplay display = GWT.create(AnimatableDisplay.class);
SimplePanel contentPanel = new SimplePanel();
contentPanel.getElement().setId("main");
TabletMainActivityMapper contentActivityMapper = new TabletMainActivityMapper(getClientFactory());
AnimationMapper contentAnimationMapper = new TabletMainAnimationMapper();
AnimatingActivityManager contentActivityManager = new AnimatingActivityManager(contentActivityMapper, contentAnimationMapper, getClientFactory().getEventBus());
contentActivityManager.setDisplay(display);
contentPanel.setWidget(display);
RootPanel.get().add(contentPanel);
}
示例5: configure
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
@Override
protected void configure() {
bind(EventBus.class).to(SimpleEventBus.class).asEagerSingleton();
bind(ActivityMapper.class).to(AppActivityMapper.class).asEagerSingleton();
// Views (singletons due to expense of construction)
bind(WelcomeView.class).to(WelcomeViewImpl.class).asEagerSingleton();
bind(CharacterView.class).to(CharacterViewImpl.class).asEagerSingleton();
// Factories for presenters
install(new GinFactoryModuleBuilder()
.implement(CharacterPresenter.class, CharacterActivity.class)
.build(CharacterPresenterFactory.class));
install(new GinFactoryModuleBuilder()
.implement(WelcomePresenter.class, WelcomeActivity.class)
.build(WelcomePresenterFactory.class));
}
示例6: configure
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的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));
}
示例7: onModuleLoad
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
@Override
public void onModuleLoad() {
ensureCssInjected();
ManagerClientFactory clientFactory = new DefaultManagerClientFactoryImpl();
EventBus eventBus = clientFactory.getEventBus();
PlaceController placeController = clientFactory.getPlaceController();
// Start ActivityManager for the main widget with our ActivityMapper
ActivityMapper activityMapper = new ManagerActivityMapper(clientFactory);
ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
activityManager.setDisplay(clientFactory.getLayoutView());
// Start PlaceHistoryHandler with our PlaceHistoryMapper
ManagerPlaceHistoryMapper historyMapper= GWT.create(ManagerPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
RootLayoutPanel.get().add(clientFactory.getLayoutView());
historyHandler.handleCurrentHistory();
}
示例8: createPhoneDisplay
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
private void createPhoneDisplay(ClientFactory clientFactory) {
// Setup navigation activity
AnimationWidget navDisplay = new AnimationWidget();
ActivityMapper navActivityMapper = new AppNavActivityMapper(
clientFactory);
AnimationMapper navAnimationMapper = new AppNavAnimationMapper();
AnimatingActivityManager navActivityManager = new AnimatingActivityManager(
navActivityMapper, navAnimationMapper, clientFactory.getEventBus());
navActivityManager.setDisplay(navDisplay);
clientFactory.getSwipeMenu().setMenuDisplay(navDisplay);
// Setup main content activity
AnimationWidget mainDisplay = new AnimationWidget();
AppMainActivityMapper mainActivityMapper = new AppMainActivityMapper(clientFactory);
AnimationMapper mainAnimationMapper = new AppMainAnimationMapper();
AnimatingActivityManager mainActivityManager = new AnimatingActivityManager(
mainActivityMapper, mainAnimationMapper, clientFactory.getEventBus());
mainActivityManager.setDisplay(mainDisplay);
clientFactory.getSwipeMenu().setContentDisplay(mainDisplay);
RootPanel.get().add(clientFactory.getSwipeMenu());
}
示例9: configure
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的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);
}
示例10: onModuleLoad
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
@Override
public void onModuleLoad() {
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
public void onUncaughtException(Throwable e) {
Log.log(Level.SEVERE, e.getMessage(), e);
MaterialToast.fireToast("Unknown error, please reload application");
}
});
Theme.bundle(); // inject
workPanel = new SimplePanel();
workPanel.setSize("100%", "100%");
ActivityMapper activityMapper = new MentorActivityMapper();
ActivityManager activityManager = new ActivityManager(activityMapper, MentorBus.get());
activityManager.setDisplay(workPanel);
Element loader = Document.get().getElementById("loader");
if (loader != null)
loader.removeFromParent();
RootPanel.get().add(workPanel, 0, 0);
Places.handler().handleCurrentHistory(); // goes to the place represented on URL, else default place
}
示例11: configure
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的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);
}
示例12: onModuleLoad
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的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();
}
示例13: DesktopApp
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的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;
}
示例14: configure
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的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);
}
示例15: onModuleLoad
import com.google.gwt.activity.shared.ActivityMapper; //导入依赖的package包/类
@Override
public void onModuleLoad() {
GWT.setUncaughtExceptionHandler(new DialogBoxUncaughtExceptionHandler());
ApplicationRequestFactory requestFactory = GWT
.create(ApplicationRequestFactory.class);
Logger.getLogger("").addHandler(new SimpleRemoteLogHandler());
ClientFactory clientFactory = GWT.create(ClientFactory.class);
EventBus eventBus = clientFactory.getEventBus();
PlaceController placeController = clientFactory.getPlaceController();
// Start ActivityManager for the main widget with our ActivityMapper
requestFactory.initialize(eventBus, new EventSourceRequestTransport(
eventBus));
ActivityMapper activityMapper = new AppActivityMapper(clientFactory,
requestFactory);
ActivityManager activityManager = new ActivityManager(activityMapper,
eventBus);
HasBody template = clientFactory.getTemplate();
activityManager.setDisplay(template.getBody());
// Start PlaceHistoryHandler with our PlaceHistoryMapper
AppPlaceHistoryMapper historyMapper = GWT
.create(AppPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(
historyMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
RootLayoutPanel.get().add(template);
// Goes to the place represented on URL else default place
historyHandler.handleCurrentHistory();
}