Code example for EventBus

Methods: post

0
		final xcb_destroy_notify_event_t destroy_notify_event = cast(event_t);
 
		LOG.debug(	"Received X event={}", 
					destroy_notify_event.getClass().getSimpleName());
 
		this.xEventBus.post(destroy_notify_event);
 
		return Optional.of(new DestroyNotify());
	} 
 
	public xcb_destroy_notify_event_t cast(final xcb_generic_event_t event_t) {
		return new xcb_destroy_notify_event_t(	xcb_generic_event_t.getCPtr(event_t),
												false); 
	} 
 
	@Override 
	public Optional<DisplaySurface> getTarget(final xcb_generic_event_t event_t) {
		final xcb_destroy_notify_event_t destroy_notify_event_t = cast(event_t);
		final int eventWindow = destroy_notify_event_t.getWindow();
		return Optional.of(this.xWindowCache.getWindow(eventWindow));
Connect your IDE to all the code out there  Get Codota for Java