From 3b38957f36d4f89b85730755a41c00892ac70591 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 18 Nov 2011 07:23:39 +0100 Subject: NEWT InputEvent consumed: Expose special attachement Object 'consumedTag', which ends event propagation if attach to an InputEvent. --- src/newt/classes/com/jogamp/newt/event/InputEvent.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/newt') diff --git a/src/newt/classes/com/jogamp/newt/event/InputEvent.java b/src/newt/classes/com/jogamp/newt/event/InputEvent.java index 51ceccf31..d8a9235c1 100644 --- a/src/newt/classes/com/jogamp/newt/event/InputEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/InputEvent.java @@ -48,6 +48,11 @@ public abstract class InputEvent extends NEWTEvent public static final int CONFINED_MASK = 1 << 16; public static final int INVISIBLE_MASK = 1 << 17; + /** Object when attached via {@link #setAttachment(Object)} marks the event consumed, + * ie. stops propagating the event any further to the event listener. + */ + public static final Object consumedTag = new Object(); + protected InputEvent(int eventType, Object source, long when, int modifiers) { super(eventType, source, when); this.modifiers=modifiers; -- cgit v1.2.3