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


Java EventBus类代码示例

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


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

示例1: ApplicationController

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
@Inject
public ApplicationController( @Nonnull final RosterTypeRepository rosterTypeRepository,
                              @Nonnull final RosterRepository rosterRepository,
                              @Nonnull final PersonRepository personRepository,
                              @Nonnull final RosterService rosterService,
                              @Nonnull final FrontendContext frontendContext,
                              @Nonnull final EntityChangeBroker broker,
                              @Nonnull final EventBus eventBus )
{
  AppData.controller = this;
  _rosterTypeRepository = rosterTypeRepository;
  _rosterRepository = rosterRepository;
  _personRepository = personRepository;
  _rosterService = rosterService;
  _frontendContext = frontendContext;
  _broker = broker;
  _loginUI = new ReactWidget( React.createElement( Login_.TYPE ) );
  _rosterListUI = new RosterListUI( this );
  _rosterUI = new RosterUI( this );
  _mainPanel = new SimplePanel();
  gotoLoginActivity();
  broker.addChangeListener( this );
  eventBus.addHandler( MetaDataSubscribeCompletedEvent.TYPE, e -> goToRosterListActivity() );
}
 
开发者ID:realityforge,项目名称:replicant-example,代码行数:25,代码来源:ApplicationController.java

示例2: init

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
@Before
public void init() throws Exception {
    MockI18n.mock(ServerIneFormI18nProvider.class);
    MockitoAnnotations.initMocks(this);
    descriptorStore = TestUtil.descriptorStore;
    testKvo = (KeyValueObject) TestUtil.getTestKvo().getAssistedObject();
    when(requestBuilderFactory.createBuilder(any(Method.class), anyString()))
        .thenReturn(requestBuilder);
    restDataConnector = new RestDataConnector(
        Mockito.mock(EventBus.class),
        Mockito.mock(AsyncStatusIndicator.class),
        requestBuilderFactory,
        descriptorStore,
        new AssistedObjectHandlerFactory(descriptorStore),
        "testKvo",
        "getUrl",
        "newUrl",
        "modifyUrl",
        "deleteUrl",
        false);

}
 
开发者ID:inepex,项目名称:ineform,代码行数:23,代码来源:RestDataConnectorComplexTest.java

示例3: ApplicationPresenter

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
@Inject
public ApplicationPresenter(View view, Model model, EventBus eventBus,
                            HeaderPresenter headerPresenter, 
                            AccordionPresenter accordionPresenter, 
                            FooterPresenter footerPresenter) {
                                
    this.view = view;
    this.model = model;
    this.eventBus = eventBus;
    this.headerPresenter = headerPresenter;

    view.assemble(
        headerPresenter.getView(),
        accordionPresenter.getView(), 
        footerPresenter.getView()
    );

    bindEvents();
}
 
开发者ID:will-gilbert,项目名称:OSWf-OSWorkflow-fork,代码行数:20,代码来源:ApplicationPresenter.java

示例4: MainPanelView

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
@Inject
public MainPanelView(EventBus eventBus, ErrorFormatter errorFormatter,
		LoadingMessagePopupPanel loadingMessagePopupPanel) {
	initWidget(uiBinder.createAndBindUi(this));
	eventBinder.bindEventHandlers(this, eventBus);
	this.errorFormatter = errorFormatter;
	this.loadingMessagePopupPanel = loadingMessagePopupPanel;

	// webAppsButton.getElement().setClassName("glyphicon");
	webAppsButton.setIcon(IconType.TH);
	webAppsButton.setIconSize(IconSize.LARGE);
	
	notificationButton.setIcon(IconType.BELL);
	notificationButton.setIconSize(IconSize.LARGE);
	
	wrenchButton.setIcon(IconType.WRENCH);
	wrenchButton.setIconSize(IconSize.LARGE);

	createPopOver();

	logger.info("MainPanelView created...");
}
 
开发者ID:interseroh,项目名称:demo-gwt-springboot,代码行数:23,代码来源:MainPanelView.java

示例5: onModuleLoad

import com.google.gwt.event.shared.EventBus; //导入依赖的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

示例6: EditTermPopup

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public EditTermPopup(OntoBrowserServiceAsync service,
		EventBus eventBus, Curator curator) {
	this.service = service;
	this.eventBus = eventBus;
			
	definitionField.setCharacterWidth(MAX_LEN);
	definitionField.setVisibleLines(3);
	definitionField.addKeyPressHandler(this);
	
	urlField.setVisibleLength(MAX_LEN);
	urlField.addKeyPressHandler(this);
	
	commentsField.setCharacterWidth(MAX_LEN);
	commentsField.setVisibleLines(3);
	commentsField.addKeyPressHandler(this);
	
	dialogBox.setText("Edit Term");
	dialogBox.setGlassEnabled(true);
	dialogBox.setAnimationEnabled(true);
	dialogBox.addStyleName("gwt-ModalDialogBox");
	
	addDialogWidgets();
	updateButton.addClickHandler(this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:25,代码来源:EditTermPopup.java

示例7: AddRelationshipPopup

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public AddRelationshipPopup(final OntoBrowserServiceAsync service,
		final EventBus eventBus) {
	this.service = service;
	this.eventBus = eventBus;
			
	dialogBox.setText("Add Relationship");
	dialogBox.setGlassEnabled(false);
	dialogBox.setAnimationEnabled(true);
	
	recentlyViewedDataProvider.addDataDisplay(recentlyViewTable);
	recentlyCreatedDataProvider.addDataDisplay(recentlyCreatedTable);
	
	addRelationshipTypes();
	setupTable(recentlyViewTable);
	setupTable(recentlyCreatedTable);
	addDialogWidgets();
	
	addButton.addClickHandler(this);
					
	eventBus.addHandler(ViewTermEvent.TYPE, this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:22,代码来源:AddRelationshipPopup.java

示例8: ReplaceRelationshipPopup

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public ReplaceRelationshipPopup(final OntoBrowserServiceAsync service,
		final EventBus eventBus) {
	this.service = service;
	this.eventBus = eventBus;
			
	dialogBox.setText("Confirm relationship obsoletion");
	dialogBox.setGlassEnabled(true);
	dialogBox.setAnimationEnabled(true);
	dialogBox.addStyleName("gwt-ModalDialogBox");
	
	setupTable();
	addDialogWidgets();
	
	commentsField.getElement().getParentElement().addClassName("text-area-right-padded");
	commentsField.setWidth("100%");
	commentsField.setVisibleLines(2);
	commentsField.setCharacterWidth(64);
	
	errorLabel.addStyleName("dialog-error");
	errorLabel.setVisible(false);
	
	obsoleteButton.addClickHandler(this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:24,代码来源:ReplaceRelationshipPopup.java

示例9: CodeListView

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public CodeListView(EventBus eventBus, OntoBrowserServiceAsync service) {
	super(eventBus,service);
	
	Image emptyListWidget = new Image(ImageResources.INSTANCE.spinner());
	emptyListWidget.setStyleName("float-right");
	list.setEmptyListWidget(emptyListWidget);
	list.setKeyboardPagingPolicy(KeyboardPagingPolicy.CURRENT_PAGE);
	list.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
	list.setSelectionModel(selection);
	selection.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
		public void onSelectionChange(SelectionChangeEvent event) {
			Term selected = selection.getSelectedObject();
			if(selected != null) {
				History.newItem(selected.getReferenceId());
			}
		}
	});
			
	codelistContainer.add(list);
	
	initWidget(codelistContainer);
	addStyleName("padded-border vert-scroll");
	eventBus.addHandler(ViewTermEvent.TYPE, this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:25,代码来源:CodeListView.java

示例10: TermDetailsView

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public TermDetailsView(EventBus eventBus, OntoBrowserServiceAsync service) {
	super(eventBus, service);
	
	for(int i = 0; i < LABELS.length; i++) {
		grid.setText(i, 0, LABELS[i] + ":");
	}
			
	CellFormatter cellFormatter = grid.getCellFormatter(); 
	for(int row = 0; row < grid.getRowCount(); row++) {
		cellFormatter.addStyleName(row, 0, "label");
	}
	
	panel.add(grid);
	initWidget(panel);
	addStyleName("padded-border vert-scroll fixed-height");
	
	eventBus.addHandler(ViewTermEvent.TYPE, this);
	eventBus.addHandler(TermUpdatedEvent.TYPE, this);
	eventBus.addHandler(TermDeletedEvent.TYPE, this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:21,代码来源:TermDetailsView.java

示例11: SVGView

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public SVGView(EventBus eventBus, OntoBrowserServiceAsync service) {
	super(eventBus,service);
			
	if(supportsSVG()) {
		panel.getElement().setId("svgPanel");
		//svgContainer.getElement().getStyle().setOverflow(Overflow.AUTO);
		svgContainer.addClickHandler(this);
		
		panel.add(svgContainer);
		initWidget(panel);
		addStyleName("padded-border");
		eventBus.addHandler(ViewTermEvent.TYPE, this);
	} else {
		Label label = new Label("Your web browser does not support SVG");
		label.addStyleName("centered");
		initWidget(label);
	}
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:19,代码来源:SVGView.java

示例12: ReplaceTermPopup

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public ReplaceTermPopup(final OntoBrowserServiceAsync service,
		final EventBus eventBus) {
	this.service = service;
	this.eventBus = eventBus;
			
	dialogBox.setText("Confirm term obsoletion");
	dialogBox.setGlassEnabled(false);
	dialogBox.setAnimationEnabled(true);
	
	recentlyViewedDataProvider.addDataDisplay(recentlyViewTable);
	recentlyCreatedDataProvider.addDataDisplay(recentlyCreatedTable);
	
	setupTable(recentlyViewTable);
	setupTable(recentlyCreatedTable);
	addDialogWidgets();
	
	commentsField.getElement().getParentElement().addClassName("text-area-right-padded");
	commentsField.setWidth("100%");
	commentsField.setVisibleLines(2);
	
	obsoleteButton.addClickHandler(this);

	eventBus.addHandler(ViewTermEvent.TYPE, this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:25,代码来源:ReplaceTermPopup.java

示例13: ReplaceSynonymPopup

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public ReplaceSynonymPopup(final OntoBrowserServiceAsync service,
		final EventBus eventBus) {
	this.service = service;
	this.eventBus = eventBus;
			
	dialogBox.setText("Confirm synonym obsoletion");
	dialogBox.setGlassEnabled(true);
	dialogBox.setAnimationEnabled(true);
	dialogBox.addStyleName("gwt-ModalDialogBox");
	
	addDialogWidgets();
	
	commentsField.getElement().getParentElement().addClassName("text-area-right-padded");
	commentsField.setWidth("100%");
	commentsField.setVisibleLines(2);
	commentsField.setCharacterWidth(64);
	
	errorLabel.setVisible(false);
	
	obsoleteButton.addClickHandler(this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:22,代码来源:ReplaceSynonymPopup.java

示例14: ApproveRejectPopup

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public ApproveRejectPopup(OntoBrowserServiceAsync service,
		EventBus eventBus, Curator curator) {
	this.service = service;
	this.eventBus = eventBus;
	
	dialogBox.setText("Pending Approval");
	dialogBox.getCaption().asWidget().addStyleName("busy-icon-right-padded");
	dialogBox.setGlassEnabled(false);
	dialogBox.setAnimationEnabled(true);
	
	termTab = new ApproveRejectTermComposite(service, eventBus, curator, busyIndicator);
	relationshipTab = new ApproveRejectRelationshipComposite(service, eventBus, curator, busyIndicator);
	synonymTab = new ApproveRejectSynonymComposite(service, eventBus, curator, busyIndicator);
	
	tabPanel.add(termTab, "Terms");
	tabPanel.add(relationshipTab, "Relationships");
	tabPanel.add(synonymTab, "Synonyms");
	tabPanel.addSelectionHandler(this);
	tabPanel.selectTab(currentTabIndex);
			
	dialogBox.setWidget(tabPanel);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:23,代码来源:ApproveRejectPopup.java

示例15: RelatedTermsView

import com.google.gwt.event.shared.EventBus; //导入依赖的package包/类
public RelatedTermsView(EventBus eventBus, OntoBrowserServiceAsync service) {
	super(eventBus, service);
					
	table.addStyleName("gwt-CellTable");
	table.setWidth("100%");
	table.setKeyboardPagingPolicy(KeyboardPagingPolicy.CURRENT_PAGE);
	table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
	table.setSelectionModel(new NoSelectionModel<Relationship>());
	
	table.addColumn(new RelationshipColumn(), "Relationship");
	table.addColumn(new RelatedTermColumn(), "Related Term");
	table.addColumn(new StatusColumn(), "Status");
			
	panel.add(table);
	initWidget(panel);
	addStyleName("padded-border vert-scroll fixed-height");
	
	eventBus.addHandler(ViewTermEvent.TYPE, this);
	eventBus.addHandler(RelationshipUpdatedEvent.TYPE, this);
	eventBus.addHandler(RelationshipDeletedEvent.TYPE, this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:22,代码来源:RelatedTermsView.java


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