1 16 package com.google.gwt.user.client.ui; 17 18 import com.google.gwt.user.client.DOM; 19 import com.google.gwt.user.client.Event; 20 21 import java.util.ArrayList ; 22 import java.util.Iterator ; 23 24 29 public class MouseWheelListenerCollection extends ArrayList { 30 31 37 public void fireMouseWheel(Widget sender, MouseWheelVelocity velocity) { 38 39 for (Iterator it = iterator(); it.hasNext();) { 40 MouseWheelListener listener = (MouseWheelListener) it.next(); 41 listener.onMouseWheel(sender, velocity); 42 } 43 } 44 45 51 public void fireMouseWheelEvent(Widget sender, Event event) { 52 if (DOM.eventGetType(event) == Event.ONMOUSEWHEEL) { 53 MouseWheelVelocity velocity = new MouseWheelVelocity(event); 54 55 fireMouseWheel(sender, velocity); 56 } 57 } 58 } 59 | Popular Tags |