本文整理汇总了Java中com.google.gwt.place.shared.PlaceController类的典型用法代码示例。如果您正苦于以下问题:Java PlaceController类的具体用法?Java PlaceController怎么用?Java PlaceController使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlaceController类属于com.google.gwt.place.shared包,在下文中一共展示了PlaceController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onModuleLoad
import com.google.gwt.place.shared.PlaceController; //导入依赖的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: EditorWorkFlow
import com.google.gwt.place.shared.PlaceController; //导入依赖的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);
}
示例3: onModuleLoad
import com.google.gwt.place.shared.PlaceController; //导入依赖的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: CharacterActivity
import com.google.gwt.place.shared.PlaceController; //导入依赖的package包/类
@Inject
public CharacterActivity(@Assisted CharacterPlace place,
CharacterView view,
Driver driver,
EventBus eventBus,
PlaceController placeController,
AppRequestFactory requestFactory) {
this.view = view;
this.driver = driver;
this.placeController = placeController;
this.eventBus = eventBus;
this.requestFactory = requestFactory;
Integer id = null;
try {
id = Integer.parseInt(place.getToken());
} catch (NumberFormatException e) {
goToCharacterNotFoundPlace();
}
characterId = id;
view.setPresenter(this);
view.hideErrorMessage();
driver.initialize(view.asEditor());
}
示例5: configure
import com.google.gwt.place.shared.PlaceController; //导入依赖的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));
}
示例6: ApplicationRootView
import com.google.gwt.place.shared.PlaceController; //导入依赖的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()));
}
示例7: onModuleLoad
import com.google.gwt.place.shared.PlaceController; //导入依赖的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: configure
import com.google.gwt.place.shared.PlaceController; //导入依赖的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);
}
示例9: ClientFactoryImpl
import com.google.gwt.place.shared.PlaceController; //导入依赖的package包/类
public ClientFactoryImpl() {
eventBus = new SimpleEventBus();
placeController = new PlaceController(eventBus);
seattleView = new SeattleViewGwtImpl();
swipeMenu = new SwipeMenu();
dbService = GWT.create(TrafficFlowDataService.class);
}
示例10: DigitalObjectEditor
import com.google.gwt.place.shared.PlaceController; //导入依赖的package包/类
public DigitalObjectEditor(ClientMessages i18n, PlaceController places, boolean embedded) {
this.i18n = i18n;
this.places = places;
this.editorCache = new EnumMap<DatastreamEditorType, EditorDescriptor>(DatastreamEditorType.class);
this.widget = new VLayout();
this.lblHeader = new Label();
lblHeader.setAutoHeight();
lblHeader.setPadding(4);
lblHeader.setStyleName(Editor.CSS_PANEL_DESCRIPTION_TITLE);
this.actionSource = new ActionSource(this);
this.embeddedView = embedded;
this.toolbar = Actions.createToolStrip();
this.editorContainer = new VLayout();
editorContainer.setLayoutMargin(4);
editorContainer.setWidth100();
editorContainer.setHeight100();
widget.addMember(lblHeader);
widget.addMember(toolbar);
if (embedded) {
widget.addMember(editorContainer);
} else {
editorContainer.setResizeBarTarget("next");
HLayout multiView = new HLayout();
multiView.setWidth100();
multiView.setHeight100();
multiView.setLayoutMargin(4);
multiView.addMember(editorContainer);
initOptionalEditor(multiView);
widget.addMember(multiView);
}
}
示例11: OptionalEditor
import com.google.gwt.place.shared.PlaceController; //导入依赖的package包/类
private OptionalEditor(ClientMessages i18n, Layout previewContainer) {
SimpleEventBus eventBus = new SimpleEventBus();
embeddedPlaces = new PlaceController(eventBus);
DigitalObjectEditor embeddedEditor = new DigitalObjectEditor(i18n, embeddedPlaces, true);
embeddedEditor.setOptionalView(true);
ActivityManager activityManager = new ActivityManager(
new ChildActivities(embeddedEditor), eventBus);
activityManager.setDisplay(new ChildEditorDisplay(previewContainer));
}
示例12: ImportPresenter
import com.google.gwt.place.shared.PlaceController; //导入依赖的package包/类
public ImportPresenter(ClientMessages i18n, PlaceController placeController) {
this.i18n = i18n;
selectFolderStep = new SelectFolderStep();
selectBatchStep = new SelectBatchStep();
selectParentStep = new SelectParentStep();
updateItemsStep = new UpdateItemsStep();
finishedStep = new FinishedStep();
wizard = new Wizard(i18n, selectFolderStep, selectBatchStep,
updateItemsStep, selectParentStep, finishedStep);
this.placeController = placeController;
}
示例13: parent
import com.google.gwt.place.shared.PlaceController; //导入依赖的package包/类
public static DigitalObjectNavigateAction parent(ClientMessages i18n, PlaceController places) {
return new DigitalObjectNavigateAction(i18n,
i18n.DigitalObjectNavigateAction_OpenParent_Title(),
Page.getAppDir() + "images/16/next_up.png",
i18n.DigitalObjectNavigateAction_OpenParent_Hint(),
Navigation.PARENT,
places);
}
示例14: child
import com.google.gwt.place.shared.PlaceController; //导入依赖的package包/类
public static DigitalObjectNavigateAction child(ClientMessages i18n, PlaceController places) {
return new DigitalObjectNavigateAction(i18n,
i18n.DigitalObjectNavigateAction_OpenChild_Title(),
Page.getAppDir() + "images/16/next_down.png",
i18n.DigitalObjectNavigateAction_OpenChild_Hint(),
Navigation.CHILD,
places);
}
示例15: next
import com.google.gwt.place.shared.PlaceController; //导入依赖的package包/类
public static DigitalObjectNavigateAction next(ClientMessages i18n, PlaceController places) {
return new DigitalObjectNavigateAction(i18n,
i18n.DigitalObjectNavigateAction_OpenNext_Title(),
"[SKIN]/actions/next.png",
i18n.DigitalObjectNavigateAction_OpenNext_Hint(),
Navigation.NEXT,
places);
}