com.google.gwt.event.shared.EventBus Java Examples

The following examples show how to use com.google.gwt.event.shared.EventBus. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HelloWorldView.java    From gwt-boot-samples with Apache License 2.0 6 votes vote down vote up
@Inject
public HelloWorldView(Banana banana, EventBus eventBus,
		HelloWorldViewEventHandler helloWorldViewEventHandler) {
	logger.info("HelloWorldView creating.");
	this.banana = banana;
	this.eventBus = eventBus;

	// UI Binder
	initWidget(uiBinder.createAndBindUi(this));

	// Call banana three times
	for (int i = 0; i < 3; i++) {
		callBanana();
	}

	logger.info("HelloWorldView created.");
}
 
Example #2
Source File: MainPanelView.java    From demo-gwt-springboot with Apache License 2.0 6 votes vote down vote up
@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...");
}
 
Example #3
Source File: Importing.java    From proarc with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    ImportPresenter importPresenter = presenterFactory.getImportPresenter();
    importPresenter.bind();
    switch (importPlace.getType()) {
        case CONTENT:
            importPresenter.importFolder();
            break;
        case EDIT_ITEMS:
            importPresenter.updateImportedObjects(importPlace.getBatchId());
            break;
        case EDIT_PARENT:
            importPresenter.selectParent(importPlace.getBatchId());
            break;
        default: // HISTORY
            importPresenter.selectBatchFromHistory();
            break;
    }
    panel.setWidget(importPresenter.getUI());
}
 
Example #4
Source File: LookupActivity.java    From bitcoin-transaction-explorer with MIT License 6 votes vote down vote up
@Override
public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
  if(!mustPerformLookup(place)) {
    doDeferredStart(panel, createInfo(place));
  } else {
    doLookup(place, new AsyncCallback<E>() {
      @Override
      public void onSuccess(final E result) {
        doDeferredStart(panel, result);
      }

      @Override
      public void onFailure(final Throwable caught) {
        doDeferredError(panel, caught);
      }
    });
  }
}
 
Example #5
Source File: ConfigActivity.java    From bitcoin-transaction-explorer with MIT License 5 votes vote down vote up
@Override
public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
  view.setPresenter(this);

  service.isPasswordPresent(new AppAsyncCallback<Boolean>() {
    @Override
    public void onSuccess(final Boolean result) {
      panel.setWidget(view);

      view.setCreatePassword(!result);
    }
  });
}
 
Example #6
Source File: FiltersActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view.setHandler(this);
    Page.setTitle("Filters");
    Page.setDescription("Explore the power of managing your requests by applying filters.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #7
Source File: InterceptorsActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view.setHandler(this);
    Page.setTitle("Interceptors");
    Page.setDescription("Transform incoming and outgoing payloads.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #8
Source File: RequestingActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view.setHandler(this);
    Page.setTitle("Requesting");
    Page.setDescription("A quick intro on how to request with Requestor.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #9
Source File: BuildingRequestsActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    Page.setTitle("Building Requests");
    Page.setDescription("Know the options for building a request.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #10
Source File: AuthActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view.setHandler(this);
    Page.setTitle("Authentication & Authorization");
    Page.setDescription("See how to authenticate/authorize requests in practice.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #11
Source File: FormActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view.setHandler(this);
    Page.setTitle("Form Data");
    Page.setDescription("Submit AJAX Forms easily.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #12
Source File: GettingStartedActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    Page.setTitle("Getting Started");
    Page.setDescription("The steps to download, install and set up Requestor.");
    panel.setWidget(gettingStarted);
    scrollToSection();
}
 
Example #13
Source File: SendingRequestsActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    Page.setTitle("Sending Requests");
    Page.setDescription("Know the options for sending a request.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #14
Source File: SerializationActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view.setHandler(this);

    deserializerRegistration = requestor.register(new MyDeserializer());
    serializerRegistration = requestor.register(new MySerializer());
    serdesRegistration = requestor.register(new MyJsonSerdes());

    Page.setTitle("Serialization");
    Page.setDescription("Exchange any media type with a powerful serialization mechanism.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #15
Source File: BinaryDataActivity.java    From requestor with Apache License 2.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    view.setHandler(this);
    Page.setTitle("Binary Data");
    Page.setDescription("Easily transfer binary data from/to server.");
    panel.setWidget(view);
    scrollToSection();
}
 
Example #16
Source File: CollectionGinModule.java    From gwt-boot-samples with Apache License 2.0 5 votes vote down vote up
@Override
protected void configure() {
	// Bind the SimpleEventBus as Singleton
	bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);

	// Bind ServicePreparator
	bind(ServicePreparator.class).to(RestServicePreparator.class)
			.in(Singleton.class);

	// Bind client for RestyGWT
	bind(PersonClient.class).to(RestPersonClient.class).in(Singleton.class);
}
 
Example #17
Source File: LazyLookupActivity.java    From bitcoin-transaction-explorer with MIT License 5 votes vote down vote up
@Override
public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
  doLookup(place, new AsyncCallback<E>() {
    @Override
    public void onSuccess(final E result) {
      doDeferredStart(panel, result);
    }

    @Override
    public void onFailure(final Throwable caught) {
      doDeferredError(panel, caught);
    }
  });
}
 
Example #18
Source File: AddressActivity.java    From bitcoin-transaction-explorer with MIT License 5 votes vote down vote up
@Override
public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
  address = AddressParseUtil.parseAddress(place.getPayload());

  panel.setWidget(view);

  if(address == null) {
    return;
  }

  view.setAddress(address);

  super.start(panel, eventBus);
}
 
Example #19
Source File: HelloWorldViewEventHandler.java    From gwt-boot-samples with Apache License 2.0 5 votes vote down vote up
@Inject
public HelloWorldViewEventHandler(EventBus eventBus,
		PersonClient personClient) {
	this.personClient = personClient;

	eventBinder.bindEventHandlers(this, eventBus);
}
 
Example #20
Source File: DemoGwtMockWebAppGinModule.java    From demo-gwt-springboot with Apache License 2.0 5 votes vote down vote up
@Override
protected void configure() {
	// Bind the SimpleEventBus as Singleton
	bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);

       // Bind ServicePreparator
       bind(ServicePreparator.class).to(MockServicePreparator.class).in(Singleton.class);

       // Using the mocks
	bind(PersonClient.class).to(MockPersonClient.class).in(Singleton.class);
       bind(UserClient.class).to(MockUserClient.class).in(Singleton.class);
}
 
Example #21
Source File: DigitalObjectEditing.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    panel.setWidget(editor.getUI());
    Record[] digitalObjects = place.getDigitalObjects();
    if (digitalObjects != null) {
        editor.edit(place.getEditorId(), digitalObjects);
    } else {
        editor.edit(place.getEditorId(), place.getPids());
    }
}
 
Example #22
Source File: DemoGwtGinModule.java    From demo-gwt-springboot with Apache License 2.0 5 votes vote down vote up
@Override
protected void configure() {
	// Bind the SimpleEventBus as Singleton
	bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);

	// Bind ServicePreparator
       bind(ServicePreparator.class).to(RestServicePreparator.class).in(Singleton.class);

	// Using the real RestyGwt
	bind(PersonClient.class).to(RestPersonClient.class).in(Singleton.class);
	bind(UserClient.class).to(RestUserClient.class).in(Singleton.class);
}
 
Example #23
Source File: PersonPanelView.java    From demo-gwt-springboot with Apache License 2.0 5 votes vote down vote up
@Inject
public PersonPanelView(EventBus eventbus, ErrorFormatter errorFormatter,
		LoadingMessagePopupPanel loadingMessagePopupPanel, PersonClient personClient) {
	initWidget(uiBinder.createAndBindUi(this));
	this.eventBus = eventbus;
	eventBinder.bindEventHandlers(this, eventBus);

	this.personClient = personClient;
}
 
Example #24
Source File: ToDoEvent.java    From blog with MIT License 4 votes vote down vote up
public static EventBus getGlobalEventBus() {
	return eventBus;
}
 
Example #25
Source File: SidebarPresenter.java    From gwteventbinder with Apache License 2.0 4 votes vote down vote up
SidebarPresenter(EventBus eventBus) {
  this.eventBus = eventBus;
  eventBinder.bindEventHandlers(this, eventBus);
}
 
Example #26
Source File: ServerProxy.java    From gwteventbinder with Apache License 2.0 4 votes vote down vote up
ServerProxy(EventBus eventBus) {
  this.eventBus = eventBus;
  eventBinder.bindEventHandlers(this, eventBus);
}
 
Example #27
Source File: ContactsPresenter.java    From gwteventbinder with Apache License 2.0 4 votes vote down vote up
ContactsPresenter(EventBus eventBus) {
  this.eventBus = eventBus;
}
 
Example #28
Source File: HomeActivity.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    Page.setTitle("Requestor", true);
    Page.setDescription("Requesting made easy for GWT.", true);
    panel.setWidget(home);
}
 
Example #29
Source File: PersonUtil.java    From demo-gwt-springboot with Apache License 2.0 4 votes vote down vote up
@Inject
public PersonUtil(EventBus eventBus) {
	logger.info("PersonUtil created...");
	eventBinder.bindEventHandlers(this, eventBus);
}
 
Example #30
Source File: DigitalObjectCreating.java    From proarc with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    DigitalObjectCreator doc = presenters.getDigitalObjectCreator();
    panel.setWidget(doc.getUI());
    doc.newObject(place.getModel(), place.getParent());
}