Search in sources :

Example 1 with PlaceHistoryHandler

use of com.google.gwt.place.shared.PlaceHistoryHandler in project openremote by openremote.

the class ManagerModule method getHistoryHandler.

@Provides
@Singleton
public PlaceHistoryHandler getHistoryHandler(PlaceController placeController, PlaceHistoryMapper historyMapper, com.google.web.bindery.event.shared.EventBus legacyEventBus) {
    PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
    // TODO See AppPlaceController for default start page
    historyHandler.register(placeController, legacyEventBus, Place.NOWHERE);
    return historyHandler;
}
Also used : PlaceHistoryHandler(com.google.gwt.place.shared.PlaceHistoryHandler) Singleton(com.google.inject.Singleton) Provides(com.google.inject.Provides)

Example 2 with PlaceHistoryHandler

use of com.google.gwt.place.shared.PlaceHistoryHandler in project activityinfo by bedatadriven.

the class AppEntryPoint method onModuleLoad.

@Override
public void onModuleLoad() {
    LOGGER.info("user.agent = " + System.getProperty("user.agent"));
    LOGGER.info("gxt.user.agent = " + System.getProperty("gxt.user.agent"));
    LOGGER.info("gxt.device = " + System.getProperty("gxt.device"));
    Icons.INSTANCE.ensureInjected();
    AppCache appCache = new AppCache();
    AppCacheMonitor3 monitor = new AppCacheMonitor3(appCache);
    monitor.start();
    EventBus eventBus = new SimpleEventBus();
    PlaceController placeController = new PlaceController(eventBus);
    ConnectionListener connectionListener = new ConnectionListener();
    connectionListener.start();
    ActivityInfoClientAsync client = new ActivityInfoClientAsyncImpl(findServerUrl());
    HttpStore httpStore = new HttpStore(connectionListener.getOnline(), client, Scheduler.get());
    OfflineStore offlineStore = new OfflineStore(httpStore, IDBFactoryImpl.create());
    FormStore formStore = new FormStoreImpl(httpStore, offlineStore, Scheduler.get());
    LocalStorage storage = LocalStorage.create();
    Viewport viewport = new Viewport();
    AppFrame appFrame = new AppFrame(appCache, httpStore, offlineStore);
    ActivityMapper activityMapper = new AppActivityMapper(formStore, storage);
    ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
    activityManager.setDisplay(appFrame.getDisplayWidget());
    AppPlaceHistoryMapper historyMapper = new AppPlaceHistoryMapper();
    PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
    historyHandler.register(placeController, eventBus, DEFAULT_PLACE);
    // Start synchronizer...
    RecordSynchronizer synchronizer = new RecordSynchronizer(httpStore, offlineStore);
    viewport.add(appFrame);
    RootLayoutPanel.get().add(viewport);
    historyHandler.handleCurrentHistory();
}
Also used : FormStoreImpl(org.activityinfo.ui.client.store.FormStoreImpl) OfflineStore(org.activityinfo.ui.client.store.offline.OfflineStore) PlaceController(com.google.gwt.place.shared.PlaceController) Viewport(com.sencha.gxt.widget.core.client.container.Viewport) SimpleEventBus(com.google.web.bindery.event.shared.SimpleEventBus) EventBus(com.google.web.bindery.event.shared.EventBus) ConnectionListener(org.activityinfo.ui.client.store.http.ConnectionListener) ActivityInfoClientAsyncImpl(org.activityinfo.api.client.ActivityInfoClientAsyncImpl) ActivityManager(com.google.gwt.activity.shared.ActivityManager) PlaceHistoryHandler(com.google.gwt.place.shared.PlaceHistoryHandler) RecordSynchronizer(org.activityinfo.ui.client.store.offline.RecordSynchronizer) ActivityMapper(com.google.gwt.activity.shared.ActivityMapper) LocalStorage(org.activityinfo.storage.LocalStorage) SimpleEventBus(com.google.web.bindery.event.shared.SimpleEventBus) HttpStore(org.activityinfo.ui.client.store.http.HttpStore) AppFrame(org.activityinfo.ui.client.chrome.AppFrame) FormStore(org.activityinfo.ui.client.store.FormStore) ActivityInfoClientAsync(org.activityinfo.api.client.ActivityInfoClientAsync)

Example 3 with PlaceHistoryHandler

use of com.google.gwt.place.shared.PlaceHistoryHandler in project webprotege by protegeproject.

the class WebProtege method buildUI.

private void buildUI() {
    BUNDLE.laf().ensureInjected();
    BUNDLE.toolbar().ensureInjected();
    BUNDLE.login().ensureInjected();
    BUNDLE.style().ensureInjected();
    BUNDLE.buttons().ensureInjected();
    BUNDLE.discussion().ensureInjected();
    BUNDLE.menu().ensureInjected();
    BUNDLE.settings().ensureInjected();
    BUNDLE.valueList().ensureInjected();
    BUNDLE.tags().ensureInjected();
    WidgetMapClientBundle.BUNDLE.style().ensureInjected();
    ApplicationPresenter applicationPresenter = WebProtegeClientInjector.get().getApplicationPresenter();
    applicationPresenter.start();
    ApplicationView applicationView = applicationPresenter.getApplicationView();
    RootLayoutPanel.get().add(applicationView);
    WebProtegeActivityManager activityManager = WebProtegeClientInjector.get().getActivityManager();
    activityManager.setDisplay(applicationView);
    PlaceHistoryHandler placeHistoryHandler = WebProtegeClientInjector.get().getPlaceHistoryHandler();
    placeHistoryHandler.handleCurrentHistory();
}
Also used : ApplicationPresenter(edu.stanford.bmir.protege.web.client.app.ApplicationPresenter) WebProtegeActivityManager(edu.stanford.bmir.protege.web.client.place.WebProtegeActivityManager) ApplicationView(edu.stanford.bmir.protege.web.client.app.ApplicationView) PlaceHistoryHandler(com.google.gwt.place.shared.PlaceHistoryHandler)

Example 4 with PlaceHistoryHandler

use of com.google.gwt.place.shared.PlaceHistoryHandler in project webprotege by protegeproject.

the class PlaceHistoryHandlerProvider method get.

@Override
public PlaceHistoryHandler get() {
    PlaceHistoryHandler handler = new PlaceHistoryHandler(placeHistoryMapper, new PlaceHistoryHandler.DefaultHistorian() {

        @Override
        public String getToken() {
            GWT.log("[Historian] Token: " + super.getToken());
            return super.getToken();
        }
    });
    handler.register(placeController, eventBus, defaultPlace);
    return handler;
}
Also used : PlaceHistoryHandler(com.google.gwt.place.shared.PlaceHistoryHandler)

Aggregations

PlaceHistoryHandler (com.google.gwt.place.shared.PlaceHistoryHandler)4 ActivityManager (com.google.gwt.activity.shared.ActivityManager)1 ActivityMapper (com.google.gwt.activity.shared.ActivityMapper)1 PlaceController (com.google.gwt.place.shared.PlaceController)1 Provides (com.google.inject.Provides)1 Singleton (com.google.inject.Singleton)1 EventBus (com.google.web.bindery.event.shared.EventBus)1 SimpleEventBus (com.google.web.bindery.event.shared.SimpleEventBus)1 Viewport (com.sencha.gxt.widget.core.client.container.Viewport)1 ApplicationPresenter (edu.stanford.bmir.protege.web.client.app.ApplicationPresenter)1 ApplicationView (edu.stanford.bmir.protege.web.client.app.ApplicationView)1 WebProtegeActivityManager (edu.stanford.bmir.protege.web.client.place.WebProtegeActivityManager)1 ActivityInfoClientAsync (org.activityinfo.api.client.ActivityInfoClientAsync)1 ActivityInfoClientAsyncImpl (org.activityinfo.api.client.ActivityInfoClientAsyncImpl)1 LocalStorage (org.activityinfo.storage.LocalStorage)1 AppFrame (org.activityinfo.ui.client.chrome.AppFrame)1 FormStore (org.activityinfo.ui.client.store.FormStore)1 FormStoreImpl (org.activityinfo.ui.client.store.FormStoreImpl)1 ConnectionListener (org.activityinfo.ui.client.store.http.ConnectionListener)1 HttpStore (org.activityinfo.ui.client.store.http.HttpStore)1