Getting back to prioritized event handlers.
> I think it would most likely be the latter, i.e. a separate "wave" for
each priority where the event first tunnels down to the target, and
then bubbles back up.
Forgive me, this makes no sense. The point of adding priority to event
h
also need to fix the bug that is currently in FX where that's not
the case for listeners on the same node.
The rest of the questions are very specific for prioritized event
handlers. But I now think that unconsumed event handlers are a much
simpler solution to the problem, as it solve
Andy Goryachev
Date: Monday, October 30, 2023 at 12:53
To: Michael Strauß , openjfx-dev
Subject: Re: Prioritized event handlers
Dear Michael:
Thank you, this is very helpful.
Questions/Comments:
1. Does this proposal changes the way events are dispatched with respect to
priority? In other
ink?
-andy
From: openjfx-dev on behalf of Nir Lisker
Date: Tuesday, November 12, 2024 at 10:47
To: Kevin Rushforth
Cc: openjfx-dev@openjdk.org
Subject: Re: Prioritized event handlers
I'd like to understand the focus and event handling problem better. If I have a
focused TextField, al
I would encourage to continue this discussion in the focus delegation
thread, not in the prioritized event handlers thread.
On Tue, Nov 12, 2024 at 8:13 PM Nir Lisker wrote:
>
> I'd like to understand the focus and event handling problem better. If I have
> a focused TextField,
lto:openjfx-dev-r...@openjdk.org> on behalf of Michael Strauß
<mailto:michaelstr...@gmail.com>
*Date: *Friday, November 8, 2024 at 17:52
*To: *
*Cc: *openjfx-dev
<mailto:openjfx-dev@openjdk.org>
*Subject: *Re: Prioritized event handlers
Hi Andy,
to one side,
> but not the other?
>
>
>
> 2. For event filter in behaviors idea: how does it work when both behavior
> and the application register an event filter? and then the skin is
> changed? wouldn't we have the same issue?
>
>
>
> 3. Are there any example
November 8, 2024 at 17:52
*To: *
*Cc: *openjfx-dev
*Subject: *Re: Prioritized event handlers
Hi Andy,
1. What happened to this proposal?
I've come to the conclusion that we need something like that, but
probably in a different form. My current thinking is that we don't
need prioritized h
v
Subject: Re: Prioritized event handlers
Hi Andy,
1. What happened to this proposal?
I've come to the conclusion that we need something like that, but
probably in a different form. My current thinking is that we don't
need prioritized handlers, but merely a way for interested listene
Some comments in line.
On 09/11/2024 02:52, Michael Strauß wrote:
Hi Andy,
1. What happened to this proposal?
I've come to the conclusion that we need something like that, but
probably in a different form. My current thinking is that we don't
need prioritized handlers, but merely a way for int
Hi Andy,
1. What happened to this proposal?
I've come to the conclusion that we need something like that, but
probably in a different form. My current thinking is that we don't
need prioritized handlers, but merely a way for interested listeners
to say "I'll take this event, but only if no one el
I agree with this analysis, and I've taken the liberty to steal parts
of your code for this PR:
https://github.com/openjdk/jfx/pull/1632
On Thu, Nov 7, 2024 at 3:06 PM John Hendrikx wrote:
> [...]
> I now think Behaviors should always be doing their event handling in filters,
> for the simple re
t;
Date: Thursday, November 7, 2024 at 05:35
To: openjfx-dev@openjdk.org<mailto:openjfx-dev@openjdk.org>
<mailto:openjfx-dev@openjdk.org>
Subject: Re: Prioritized event handlers
Hi Andy,
Simply replacing a Skin can change the order of event handlers. In other
words, if you regist
mplexity, including
misbehaving EventDispatcher implementations.
May be it's just me, I don't see the beauty of this thing.
-andy
*From: *openjfx-dev on behalf of John
Hendrikx
*Date: *Thursday, November 7, 2024 at 05:35
*To: *openjfx-dev@openjdk.org
*Subject: *Re: Prioritized event
y be it's just me, I don't see the beauty of this thing.
-andy
*From: *openjfx-dev on behalf of John
Hendrikx
*Date: *Thursday, November 7, 2024 at 05:35
*To: *openjfx-dev@openjdk.org
*Subject: *Re: Prioritized event handlers
Hi Andy,
Simply replacing a Skin can change the order of eve
this thing.
-andy
From: openjfx-dev on behalf of John Hendrikx
Date: Thursday, November 7, 2024 at 05:35
To: openjfx-dev@openjdk.org
Subject: Re: Prioritized event handlers
Hi Andy,
Simply replacing a Skin can change the order of event handlers. In other
words, if you registered your handle
?
-andy
From: openjfx-dev on behalf of John Hendrikx
Date: Thursday, November 7, 2024 at 05:35
To: openjfx-dev@openjdk.org
Subject: Re: Prioritized event handlers
Hi Andy,
Simply replacing a Skin can change the order of event handlers. In other
words, if you registered your handler **after
plit the discussion into
separate threads.
-andy
*From: *openjfx-dev on behalf of
Michael Strauß
*Date: *Friday, October 27, 2023 at 19:41
*To: *openjfx-dev
*Subject: *Re: Prioritized event handlers
Here is the proposal:
https://gist.github.com/mstr2/4bde9c97dcf608a0501030ade1ae7d
ceed with the problem
of Controls. (I'll start a separate thread).
What do you think?
-andy
From: openjfx-dev on behalf of John Hendrikx
Date: Thursday, November 7, 2024 at 05:35
To: openjfx-dev@openjdk.org
Subject: Re: Prioritized event handlers
Hi Andy,
Simply replacing a Skin
Date: Friday, October 27, 2023 at 19:41
To: openjfx-dev
Subject: Re: Prioritized event handlers
Here is the proposal:
https://gist.github.com/mstr2/4bde9c97dcf608a0501030ade1ae7dc1
Comments are welcome.
On Fri, Oct 27, 2023 at 8:21 PM Andy Goryachev
wrote:
>
> Would it be possible to cr
> skin change, we need at least two more. So two priorities are clearly not
> enough.
>
> -andy
>
>
>
>
> From: openjfx-dev on behalf of John Hendrikx
>
> Date: Tuesday, October 31, 2023 at 15:10
> To: openjfx-dev@openjdk.org
> Subject: Re: [Extern
t 15:10
To: openjfx-dev@openjdk.org
Subject: Re: [External] : Re: Prioritized event handlers
On 31/10/2023 21:03, Andy Goryachev wrote:
Dear Martin:
I understand John’s point: you want all the user installed filters and handlers
across all levels to be processed before switching to system level proc
or am I missing some critical aspect of the proposed
solution?
Thank you
-andy
*From:*openjfx-dev on behalf of
Michael Strauß
*Date:*Friday, October 27, 2023 at 19:41
*To:*openjfx-dev
*Subject:*Re: Prioritized event handlers
Here is the proposal:
https://gist.github.com/mstr2/4bde9c97dcf608
not add any handlers, instead leaving it up to the child class? But
that’s implementation detail.
What do you think?
-andy
*From: *Martin Fox
*Date: *Tuesday, October 31, 2023 at 10:13
*To: *Andy Goryachev
*Cc: *Michael Strauß , openjfx-dev
*Subject: *[External] : Re: Prioritized event handl
d any handlers, instead leaving it up
to the child class? But that’s implementation detail.
What do you think?
-andy
From: Martin Fox
Date: Tuesday, October 31, 2023 at 10:13
To: Andy Goryachev
Cc: Michael Strauß , openjfx-dev
Subject: [External] : Re: Prioritized event handlers
I understand J
the order
> added.
>
> Would you agree, or am I missing some critical aspect of the proposed
> solution?
>
> Thank you
> -andy
>
>
>
>
>
> From: openjfx-dev on behalf of Michael Strauß
>
> Date: Friday, October 27, 2023 at 19:41
From: openjfx-dev on behalf of Michael Strauß
Date: Monday, October 23, 2023 at 16:10
To: openjfx-dev
Subject: Prioritized event handlers
Hi Andy!
In a previous mail, I observed that a method like
`BehaviorBase.addHandlerLast` suggests to me that we're lacking core
tools in the JavaFX fram
priority, they get invoked in the order added.
Would you agree, or am I missing some critical aspect of the proposed solution?
Thank you
-andy
From: openjfx-dev on behalf of Michael Strauß
Date: Friday, October 27, 2023 at 19:41
To: openjfx-dev
Subject: Re: Prioritized event handlers
Here is
Hi Michael,
What you describe in the generalization sounds excellent, and would go a
step further and avoids the registration mechanism by instead doing
multiple dispatch/bubbling phases. The registration mechanism is more a
system to avoid doing that multiple times, but it could also be enfo
Hi John,
from what I understand, you're essentially suggesting a third phase of
event dispatch:
1. The event starts at the root and travels to the event target
(capturing phase)
2. If the event is not consumed, it travels back to the root, but
default handlers are excluded (bubbling phase)
3. If
lways take priority over internal
handlers, regardless of where they are installed in the scene graph
2) Users should have control over when default handlers are allowed to
consume events, without also blocking other user event handlers
Your proposal with prioritized event handlers addresses this
Here is the proposal:
https://gist.github.com/mstr2/4bde9c97dcf608a0501030ade1ae7dc1
Comments are welcome.
On Fri, Oct 27, 2023 at 8:21 PM Andy Goryachev
wrote:
>
> Would it be possible to create a proposal in the JEP format outlining the
> proposed public API?
>
>
>
> Thank you
>
> -andy
Would it be possible to create a proposal in the JEP format outlining the
proposed public API?
Thank you
-andy
From: openjfx-dev on behalf of Michael Strauß
Date: Monday, October 23, 2023 at 16:10
To: openjfx-dev
Subject: Prioritized event handlers
Hi Andy!
In a previous mail, I observed
Hi Michael,
Yeah, I also think it is an oversight, or may even be qualified as a
bug. Now you have to be really careful to start event handlers with a
`if (!event.isConsumed())` check, just in case there is another handler
that is before you at the same level that may have consumed the event.
> - The consumed flag doesn't change any other behavior? Consumed events
> only are passed to handlers at the same level, but are not bubbled up
> (or captured down); having consumed events not be passed to event
> handlers (even at the same level) seems like a more sane default for sure
I pulled
Hi John,
> - Would an event handler like KeyEvent.ANY at Preferred priority be
> called before one for KeyEvent.KEY_PRESSED at Default or System priority?
Yes.
> - The consumed flag doesn't change any other behavior? Consumed events
> only are passed to handlers at the same level, but are not b
JavaFX framework. In this case, we want to ensure that an
event handler is always invoked before (or after) other event
handlers.
One way to do that might be to support prioritized event handlers at
the core level, instead of creating new API that seems like a
workaround. I've created a proof o
might be to support prioritized event handlers at
the core level, instead of creating new API that seems like a
workaround. I've created a proof of concept for prioritized event
handlers [0], which might be a moderate-effort but high-value addition
to JavaFX.
[0] https://github.com/openjdk/jfx/pull/1266
38 matches
Mail list logo