protected boolean dispatchEvent(NodeImpl node, Event event) {
if (event == null) return false;
// Can't use anyone else's implementation, since there's no public
// API for setting the event's processing-state fields.
EventImpl evt = (EventImpl)event;
// VALIDATE -- must have been initialized at least once, must have
// a non-null non-blank name.
if(!evt.initialized || evt.type == null || evt.type.equals("")) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "UNSPECIFIED_EVENT_TYPE_ERR", null);
throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR, msg);
}
// If nobody is listening for this event, discard immediately
LCount lc = LCount.lookup(evt.getType());
if (lc.total == 0)
return evt.preventDefault;
// INITIALIZE THE EVENT'S DISPATCH STATUS
// (Note that Event objects are reusable in our implementation;