Exemplo n.º 1
0
 @Override
 public void addListener(Class<?> eventType, Object listener, Method method) {
   if (eventDispatcher == null) {
     eventDispatcher = SquirrelProvider.getInstance().newInstance(PolymEventDispatcher.class);
   }
   eventDispatcher.register(eventType, listener, method);
 }
Exemplo n.º 2
0
 @Override
 public void fireEvent(SquirrelEvent event) {
   if (eventDispatcher != null && isNotifiable()) {
     eventDispatcher.fireEvent(event);
   }
 }
Exemplo n.º 3
0
 @Override
 public void removeAllListeners() {
   if (eventDispatcher != null) eventDispatcher.unregisterAll();
 }
Exemplo n.º 4
0
 @Override
 public void removeListener(Class<?> eventType, Object listener) {
   if (eventDispatcher != null) {
     eventDispatcher.unregister(eventType, listener);
   }
 }
Exemplo n.º 5
0
 @Override
 public int getListenerSize() {
   return eventDispatcher != null ? eventDispatcher.getListenerSize() : 0;
 }
Exemplo n.º 6
0
 public void removeListener(Predicate<ListenerMethod> predicate) {
   if (eventDispatcher != null) {
     eventDispatcher.unregister(predicate);
   }
 }