Пример #1
0
 /**
  * Removes one registered listener method. The given method owned by the given object will no
  * longer be called when the specified events are generated by this component.
  *
  * <p>This version of <code>removeListener</code> gets the name of the activation method as a
  * parameter. The actual method is reflected from <code>target</code>, and unless exactly one
  * match is found, <code>java.lang.IllegalArgumentException</code> is thrown.
  *
  * <p>For more information on the inheritable event mechanism see the {@link com.vaadin.event
  * com.vaadin.event package documentation}.
  *
  * @param eventType the exact event type the <code>object</code> listens to.
  * @param target the target object that has registered to listen to events of type <code>eventType
  *     </code> with one or more methods.
  * @param methodName the name of the method owned by <code>target</code> that's registered to
  *     listen to events of type <code>eventType</code>.
  * @deprecated As of 7.0. This method should be avoided. Use {@link #removeListener(Class, Object,
  *     Method)} instead.
  */
 @Deprecated
 @Override
 public void removeListener(Class<?> eventType, Object target, String methodName) {
   if (eventRouter != null) {
     eventRouter.removeListener(eventType, target, methodName);
   }
 }
Пример #2
0
 /**
  * Removes all registered listeners matching the given parameters. Since this method receives the
  * event type and the listener object as parameters, it will unregister all <code>object</code>'s
  * methods that are registered to listen to events of type <code>eventType</code> generated by
  * this component.
  *
  * <p>This method additionally informs the event-api to stop routing events with the given
  * eventIdentifier to the components handleEvent function call.
  *
  * <p>For more information on the inheritable event mechanism see the {@link com.vaadin.event
  * com.vaadin.event package documentation}.
  *
  * @param eventIdentifier the identifier of the event to stop listening for
  * @param eventType the exact event type the <code>object</code> listens to.
  * @param target the target object that has registered to listen to events of type <code>eventType
  *     </code> with one or more methods.
  * @since 6.2
  */
 protected void removeListener(String eventIdentifier, Class<?> eventType, Object target) {
   if (eventRouter != null) {
     eventRouter.removeListener(eventType, target);
     if (!eventRouter.hasListeners(eventType)) {
       ComponentStateUtil.removeRegisteredEventListener(getState(), eventIdentifier);
     }
   }
 }
Пример #3
0
 /**
  * Removes one registered listener method. The given method owned by the given object will no
  * longer be called when the specified events are generated by this component.
  *
  * <p>For more information on the inheritable event mechanism see the {@link com.vaadin.event
  * com.vaadin.event package documentation}.
  *
  * @param eventType the exact event type the <code>object</code> listens to.
  * @param target target object that has registered to listen to events of type <code>eventType
  *     </code> with one or more methods.
  * @param method the method owned by <code>target</code> that's registered to listen to events of
  *     type <code>eventType</code>.
  */
 @Override
 public void removeListener(Class<?> eventType, Object target, Method method) {
   if (eventRouter != null) {
     eventRouter.removeListener(eventType, target, method);
   }
 }
Пример #4
0
 /**
  * Removes all registered listeners matching the given parameters. Since this method receives the
  * event type and the listener object as parameters, it will unregister all <code>object</code>'s
  * methods that are registered to listen to events of type <code>eventType</code> generated by
  * this component.
  *
  * @param eventType the exact event type the <code>object</code> listens to.
  * @param listener the target object that has registered to listen to events of type <code>
  *     eventType</code> with one or more methods.
  */
 protected void removeListener(Class<?> eventType, DataProviderListener listener) {
   if (eventRouter != null) {
     eventRouter.removeListener(eventType, listener);
   }
 }