public void onButton (Mouse.ButtonEvent event, Mouse.Interaction iact) { iact.capture(); } });
if (hitLayer != null) currentIact = new Interaction(hitLayer, bubble, false); currentIact.add(bevent.button); currentIact.dispatch(event); boolean done = currentIact.remove(bevent.button); currentIact.dispatch(event); if (done) currentIact = null; if (currentIact != null) currentIact.dispatch(event); else if (hitLayer != null) new Interaction(hitLayer, bubble, true).dispatch(event); if (hoverLayer != null) { HoverEvent hevent = new HoverEvent(0, event.time, event.x, event.y, false); new Interaction(hoverLayer, bubble, true).dispatch(hevent); new Interaction(hitLayer, bubble, true).dispatch(hevent); if (currentIact != null) currentIact.dispatch(event);
@Override public void onDrag(Mouse.MotionEvent event, Mouse.Interaction iact) { motionLabel.set("parent mouse drag", describe(event, "")); if (capture.value() && event.time - start > 1000 && !iact.captured()) iact.capture(); } @Override public void onMotion (Mouse.MotionEvent event, Mouse.Interaction iact) {
private void dispatchSolo (Event event) { Layer hitLayer = LayerUtil.getHitLayer(root, scratch.set(event.x, event.y)); if (hitLayer != null) new Interaction(hitLayer, bubble, true).dispatch(event); } }
@Override public final void onEmit (Object event) { if (event instanceof Interaction) ((Interaction)event).emit(this); else if (event == cancelEvent) onCancel(); } }