18 package org.turro.zkoss.dialog;
20 import java.util.ArrayList;
21 import java.util.Collection;
22 import java.util.Iterator;
23 import org.zkoss.zk.ui.Component;
24 import org.zkoss.zk.ui.event.EventListener;
32 public static Collection<EventListener>
cancelListener(Component component, String eventType) {
33 ArrayList<EventListener> list =
new ArrayList<>();
34 Iterator it = component.getEventListeners(eventType).iterator();
36 list.add((EventListener) it.next());
42 public static void activateListeners(Component component, String eventType, Collection<EventListener> listeners) {
43 for(EventListener el : listeners) {
44 component.addEventListener(eventType, el);
static void activateListeners(Component component, String eventType, Collection< EventListener > listeners)
static Collection< EventListener > cancelListener(Component component, String eventType)