更新时间:2023-12-04 14:45:37
您可以添加特定的 ChildNode#onMouse ...
处理程序,它将消耗所有事件。
You can add specific ChildNode#onMouse...
handlers which will consume all events.
或提供你自己的 EventDispatcher
:
child.setEventDispatcher(new EventDispatcher() {
@Override
public Event dispatchEvent(Event event, EventDispatchChain tail) {
boolean valid = myValidationLogicForEvents(event);
return valid ? tail.dispatchEvent(event) : null;
}
});