本文整理匯總了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() );
}
示例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);
}
示例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();
}
示例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...");
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}