예제 #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);
 }
예제 #2
0
 @Override
 public void fireEvent(SquirrelEvent event) {
   if (eventDispatcher != null && isNotifiable()) {
     eventDispatcher.fireEvent(event);
   }
 }
예제 #3
0
 @Override
 public void removeAllListeners() {
   if (eventDispatcher != null) eventDispatcher.unregisterAll();
 }
예제 #4
0
 @Override
 public void removeListener(Class<?> eventType, Object listener) {
   if (eventDispatcher != null) {
     eventDispatcher.unregister(eventType, listener);
   }
 }
예제 #5
0
 @Override
 public int getListenerSize() {
   return eventDispatcher != null ? eventDispatcher.getListenerSize() : 0;
 }
예제 #6
0
 public void removeListener(Predicate<ListenerMethod> predicate) {
   if (eventDispatcher != null) {
     eventDispatcher.unregister(predicate);
   }
 }