private final HandlerManager hm;
public EventListenerHelper(Element e, GraphicsController gc, int eventMask) {
this.e = e;
this.hm = new HandlerManager(e);
if ((Event.ONMOUSEDOWN & eventMask) > 0) {
hm.addHandler(MouseDownEvent.getType(), gc);
}
if ((Event.ONMOUSEUP & eventMask) > 0) {
hm.addHandler(MouseUpEvent.getType(), gc);