Example usage for com.vaadin.ui AbstractField getListeners

List of usage examples for com.vaadin.ui AbstractField getListeners

Introduction

In this page you can find the example usage for com.vaadin.ui AbstractField getListeners.

Prototype

public Collection<?> getListeners(Class<?> eventType) 

Source Link

Document

Returns all listeners that are registered for the given event type or one of its subclasses.

Usage

From source file:org.eclipse.hawkbit.ui.common.CommonDialogWindow.java

License:Open Source License

private void removeItemSetChangeistener(final AbstractField<?> field) {
    if (!(field instanceof Table)) {
        return;//  ww  w .  j  av a2  s  .  co  m
    }
    for (final Object listener : field.getListeners(ItemSetChangeEvent.class)) {
        if (listener instanceof ChangeListener) {
            ((Table) field).removeItemSetChangeListener((ChangeListener) listener);
        }
    }
}

From source file:org.eclipse.hawkbit.ui.common.CommonDialogWindow.java

License:Open Source License

private void removeTextListener(final AbstractField<?> field) {
    if (!(field instanceof TextChangeNotifier)) {
        return;/*from  ww w. ja v  a2s.  c  o  m*/
    }
    for (final Object listener : field.getListeners(TextChangeEvent.class)) {
        if (listener instanceof ChangeListener) {
            ((TextChangeNotifier) field).removeTextChangeListener((ChangeListener) listener);
        }
    }
}

From source file:org.eclipse.hawkbit.ui.common.CommonDialogWindow.java

License:Open Source License

private void removeValueChangeListener(final AbstractField<?> field) {
    for (final Object listener : field.getListeners(ValueChangeEvent.class)) {
        if (listener instanceof ChangeListener) {
            field.removeValueChangeListener((ChangeListener) listener);
        }/*from   w  ww . jav  a  2  s . c o  m*/
    }
}