当前位置: 首页>>代码示例>>Java>>正文


Java PlaceHistoryHandler类代码示例

本文整理汇总了Java中com.google.gwt.place.shared.PlaceHistoryHandler的典型用法代码示例。如果您正苦于以下问题:Java PlaceHistoryHandler类的具体用法?Java PlaceHistoryHandler怎么用?Java PlaceHistoryHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PlaceHistoryHandler类属于com.google.gwt.place.shared包,在下文中一共展示了PlaceHistoryHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onModuleLoad

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的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();

}
 
开发者ID:WSDOT,项目名称:social-analytics,代码行数:23,代码来源:SocialAnalytics.java

示例2: EditorWorkFlow

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的package包/类
public EditorWorkFlow(EventBus ebus, PlaceController placeController,
        ActivityManager activityManager, Layout delegate,
        PresenterFactory presenterFactory, ClientMessages i18n) {

    this.presenterFactory = presenterFactory;
    this.i18n = i18n;
    this.ebus = (ebus != null) ? ebus : new SimpleEventBus();
    // PlaceController uses delegate to ask user with blocking Window.confirm
    // whether to leave the current place.
    // In order to use non blocking SmartGWT dialog
    // it will be necessary to override PlaceController.goto method.
    this.placeController = (placeController != null) ? placeController
            : new PlaceController(this.ebus);
    this.activityManager = (activityManager != null) ? activityManager
            : new ActivityManager(new EditorActivityMapper(), this.ebus);
    this.activityManager.setDisplay(new EditorDisplay(delegate));
    EditorPlaceHistoryMapper historyMapper = GWT.create(EditorPlaceHistoryMapper.class);
    placeHistoryHandler = new PlaceHistoryHandler(historyMapper);
    placeHistoryHandler.register(this.placeController, this.ebus, Place.NOWHERE);
}
 
开发者ID:proarc,项目名称:proarc,代码行数:21,代码来源:EditorWorkFlow.java

示例3: onModuleLoad

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的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();
}
 
开发者ID:guiguib,项目名称:yaph,代码行数:23,代码来源:Yaph.java

示例4: onModuleLoad

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的package包/类
@Override
public void onModuleLoad() {
  ApplicationGinjector.INSTANCE.inject(this);

  R.init(colorPicker);

  appActivityManager = new ActivityManager(actvityMapper, eventBus);
  historyHandler = new PlaceHistoryHandler(placeHistoryMapper);

  configService.getApplicationConfig(new AppAsyncCallback<UserApplicationConfig>() {
    @Override
    public void onSuccess(final UserApplicationConfig result) {
      configProvider.setApplicationConfig(result);

      onFinishedLoading();
    }
  });
}
 
开发者ID:JornC,项目名称:bitcoin-transaction-explorer,代码行数:19,代码来源:Application.java

示例5: onModuleLoad

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的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();
}
 
开发者ID:thorntonv,项目名称:mechaverse,代码行数:24,代码来源:MechaverseClient.java

示例6: onModuleLoad

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的package包/类
public void onModuleLoad() {
    AppInjector injector = GWT.create(AppInjector.class);
    PlaceHistoryHandler placeHistoryHandler = injector.getPlaceHistoryHandler();
    ActivityManager activityManager = injector.getActivityManager();

    SimplePanel panel = new SimplePanel();
    activityManager.setDisplay(panel);
    RootPanel.get().add(panel);

    placeHistoryHandler.handleCurrentHistory();
}
 
开发者ID:dharmab,项目名称:sheets,代码行数:12,代码来源:Sheets.java

示例7: providePlaceHistoryHandler

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的package包/类
@Provides
@Singleton
PlaceHistoryHandler providePlaceHistoryHandler(AppPlaceHistoryMapper placeHistoryMapper, PlaceController placeController, EventBus eventBus) {
    PlaceHistoryHandler placeHistoryHandler = new PlaceHistoryHandler(placeHistoryMapper);
    placeHistoryHandler.register(placeController, eventBus, new WelcomePlace());
    return placeHistoryHandler;
}
 
开发者ID:dharmab,项目名称:sheets,代码行数:8,代码来源:SheetsGinModule.java

示例8: MvpController

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的package包/类
protected MvpController() {
	super(EventBus.get());

	this.activityManager = new ActivityManager(this, EventBus.get());
	this.historyHandler = new PlaceHistoryHandler(this);

	this.setDefaultPlace(this.defaultPlace);
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:9,代码来源:MvpController.java

示例9: init

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的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();
}
 
开发者ID:lumongo,项目名称:lumongo,代码行数:10,代码来源:MainController.java

示例10: onModuleLoad

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的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();
}
 
开发者ID:reinert,项目名称:requestor,代码行数:31,代码来源:Showcase.java

示例11: App

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的package包/类
public App(Storage storage, EventBus eventBus, PlaceController placeController,
    ActivityManager activityManager, AppPlaceHistoryMapper historyMapper,
    PlaceHistoryHandler historyHandler,
    ReloadOnAuthenticationFailure reloadOnAuthenticationFailure, MobileWebAppShell shell) {

  this.storage = storage;
  this.eventBus = eventBus;
  this.placeController = placeController;
  this.activityManager = activityManager;
  this.historyMapper = historyMapper;
  this.historyHandler = historyHandler;
  this.reloadOnAuthenticationFailure = reloadOnAuthenticationFailure;
  this.shell = shell;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:15,代码来源:App.java

示例12: initBrowserHistory

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的package包/类
/**
 * Initialize browser history / bookmarking. If LocalStorage is available, use
 * it to make the user's default location in the app the last one seen.
 */
private void initBrowserHistory(final AppPlaceHistoryMapper historyMapper,
    PlaceHistoryHandler historyHandler, TaskListPlace defaultPlace) {

  Place savedPlace = null;
  if (storage != null) {
    try {
      // wrap in try-catch in case stored value is invalid
      savedPlace = historyMapper.getPlace(storage.getItem(HISTORY_SAVE_KEY));
    } catch (Throwable t) {
      // ignore error and use the default-default
    }
  }
  if (savedPlace == null) {
    savedPlace = defaultPlace;
  }
  historyHandler.register(placeController, eventBus, savedPlace);

  /*
   * Go to the place represented in the URL. This is what makes bookmarks
   * work.
   */
  historyHandler.handleCurrentHistory();

  /*
   * Monitor the eventbus for place changes and note them in LocalStorage for
   * the next launch.
   */
  if (storage != null) {
    eventBus.addHandler(PlaceChangeEvent.TYPE, new PlaceChangeEvent.Handler() {
      public void onPlaceChange(PlaceChangeEvent event) {
        storage.setItem(HISTORY_SAVE_KEY, historyMapper.getToken(event.getNewPlace()));
      }
    });
  }
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:40,代码来源:App.java

示例13: onModuleLoad

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的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();
}
 
开发者ID:apetrelli,项目名称:samplegwt,代码行数:34,代码来源:__moduleName__.java

示例14: getHistoryHandler

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的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;
}
 
开发者ID:realityforge,项目名称:gwt-mmvp,代码行数:12,代码来源:MvpComponentsGinModule.java

示例15: providePlaceHistoryHandler

import com.google.gwt.place.shared.PlaceHistoryHandler; //导入依赖的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;
}
 
开发者ID:pillingworthz,项目名称:ifictionary,代码行数:10,代码来源:Level9InjectorModule.java


注:本文中的com.google.gwt.place.shared.PlaceHistoryHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。