Re: RFR: 8090456: Focus Management [v12]

2024-10-18 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request wit

Re: RFR: 8090456: Focus Management [v11]

2024-10-14 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request inc

Re: RFR: 8090456: Focus Management [v10]

2024-10-14 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request wit

Re: RFR: 8090456: Focus Management [v8]

2024-10-12 Thread John Hendrikx
On Fri, 11 Oct 2024 17:40:45 GMT, Michael Strauß wrote: > > You say a "bunch of event handlers" is less optimal; then optimize that. > > It's already there. In fact, a simple utility makes it a one-liner... > > Let me know if I understood you correctly: > > Let's consider an example where the

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Andy Goryachev
On Fri, 11 Oct 2024 18:59:43 GMT, Michael Strauß wrote: > It's more like the existing tools are sufficient for this particular > scenario. Or put another way: a custom TraversalPolicy is not less complex > than what I've described, since it needs to solve exactly the same problems > (namely, s

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Michael Strauß
On Fri, 11 Oct 2024 18:59:43 GMT, Michael Strauß wrote: >>> So, inside of the single event filter, I'm going to call requestFocus() on >>> the next element as dictated by my business rules. >> >> so basically reinvent TraversalPolicy? > >> > So, inside of the single event filter, I'm going to c

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Michael Strauß
On Fri, 11 Oct 2024 17:47:19 GMT, Andy Goryachev wrote: > > So, inside of the single event filter, I'm going to call requestFocus() on > > the next element as dictated by my business rules. > > so basically reinvent TraversalPolicy? It's more like the existing tools are sufficient for this par

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Andy Goryachev
On Fri, 11 Oct 2024 17:40:45 GMT, Michael Strauß wrote: > So, inside of the single event filter, I'm going to call requestFocus() on > the next element as dictated by my business rules. so basically reinvent TraversalPolicy? - PR Comment: https://git.openjdk.org/jfx/pull/1555#issu

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Michael Strauß
On Fri, 11 Oct 2024 16:49:30 GMT, Andy Goryachev wrote: > > You say a "bunch of event handlers" is less optimal; then optimize that. > > It's already there. In fact, a simple utility makes it a one-liner... > > Let me know if I understood you correctly: > > Let's consider an example where the

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Andy Goryachev
On Fri, 11 Oct 2024 17:33:00 GMT, Michael Strauß wrote: >>> > My suggestion for a better API is: have two separate knobs to configure >>> > directional and logical focus traversal, and provide a very small set of >>> > curated policies. We should only consider opening up the API to allow >>> >

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Michael Strauß
On Thu, 10 Oct 2024 08:46:25 GMT, Michael Strauß wrote: >>> My suggestion for a better API is: have two separate knobs to configure >>> directional and logical focus traversal, and provide a very small set of >>> curated policies. We should only consider opening up the API to allow more >>> cu

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Andy Goryachev
On Thu, 10 Oct 2024 08:46:25 GMT, Michael Strauß wrote: > Martin says [this](https://bugs.openjdk.org/browse/JDK-8095467) about > NEXT_IN_LINE back in 2014 Let me see if we can get rid of it. - PR Comment: https://git.openjdk.org/jfx/pull/1555#issuecomment-2407799910

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Andy Goryachev
On Thu, 10 Oct 2024 08:46:25 GMT, Michael Strauß wrote: >>> My suggestion for a better API is: have two separate knobs to configure >>> directional and logical focus traversal, and provide a very small set of >>> curated policies. We should only consider opening up the API to allow more >>> cu

Re: RFR: 8090456: Focus Management [v8]

2024-10-11 Thread Andy Goryachev
On Thu, 10 Oct 2024 23:26:27 GMT, John Hendrikx wrote: > You say a "bunch of event handlers" is less optimal; then optimize that. It's > already there. In fact, a simple utility makes it a one-liner... Let me know if I understood you correctly: Let's consider an example where the application h

Re: RFR: 8090456: Focus Management [v8]

2024-10-10 Thread John Hendrikx
On Thu, 10 Oct 2024 22:48:42 GMT, John Hendrikx wrote: >>> I did my best to actually find some use cases... >> >> Allow me to refer to some of the linked tickets in RFE >> https://bugs.openjdk.org/browse/JDK-8090456: >> >> [JDK-8091524](https://bugs.openjdk.org/browse/JDK-8091524) >> Introduce

Re: RFR: 8090456: Focus Management [v8]

2024-10-10 Thread Andy Goryachev
On Thu, 10 Oct 2024 22:48:42 GMT, John Hendrikx wrote: >>> I did my best to actually find some use cases... >> >> Allow me to refer to some of the linked tickets in RFE >> https://bugs.openjdk.org/browse/JDK-8090456: >> >> [JDK-8091524](https://bugs.openjdk.org/browse/JDK-8091524) >> Introduce

Re: RFR: 8090456: Focus Management [v8]

2024-10-10 Thread John Hendrikx
On Thu, 10 Oct 2024 21:32:29 GMT, Andy Goryachev wrote: > > I did my best to actually find some use cases... > > Allow me to refer to some of the linked tickets in RFE > https://bugs.openjdk.org/browse/JDK-8090456: > > [JDK-8091524](https://bugs.openjdk.org/browse/JDK-8091524) Introduce a "foc

Re: RFR: 8090456: Focus Management [v8]

2024-10-10 Thread Andy Goryachev
On Thu, 10 Oct 2024 20:12:25 GMT, John Hendrikx wrote: > I did my best to actually find some use cases... Allow me to refer to some of the linked tickets in RFE https://bugs.openjdk.org/browse/JDK-8090456: [JDK-8091524](https://bugs.openjdk.org/browse/JDK-8091524) Introduce a "focus container"

Re: RFR: 8090456: Focus Management [v8]

2024-10-10 Thread John Hendrikx
On Thu, 10 Oct 2024 16:56:42 GMT, Andy Goryachev wrote: > > I struggle to see what problem this will be solving that isn't already > > solved with the above. > > Let me try to explain this (again). ... > At high level, there might be _application-level requirements_ for > conditional travers

Re: RFR: 8090456: Focus Management [v8]

2024-10-10 Thread Andy Goryachev
On Wed, 9 Oct 2024 23:49:24 GMT, John Hendrikx wrote: > I struggle to see what problem this will be solving that isn't already solved > with the above. Let me try to explain this (again). At high level, there might be _application-level requirements_ for conditional traversal, which should b

Re: RFR: 8090456: Focus Management [v9]

2024-10-10 Thread Andy Goryachev
On Wed, 9 Oct 2024 22:46:32 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v8]

2024-10-10 Thread Martin Fox
On Thu, 10 Oct 2024 08:46:25 GMT, Michael Strauß wrote: >>> My suggestion for a better API is: have two separate knobs to configure >>> directional and logical focus traversal, and provide a very small set of >>> curated policies. We should only consider opening up the API to allow more >>> cu

Re: RFR: 8090456: Focus Management [v8]

2024-10-10 Thread Michael Strauß
On Thu, 10 Oct 2024 00:12:54 GMT, Martin Fox wrote: > > My suggestion for a better API is: have two separate knobs to configure > > directional and logical focus traversal, and provide a very small set of > > curated policies. We should only consider opening up the API to allow more > > custom

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Martin Fox
On Wed, 9 Oct 2024 21:43:09 GMT, Michael Strauß wrote: > My suggestion for a better API is: have two separate knobs to configure > directional and logical focus traversal, and provide a very small set of > curated policies. We should only consider opening up the API to allow more > customizati

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread John Hendrikx
On Wed, 2 Oct 2024 17:33:15 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v9]

2024-10-09 Thread Michael Strauß
On Wed, 9 Oct 2024 22:50:23 GMT, Andy Goryachev wrote: > Are there any objections to the new public APIs (and not the implementation)? > Is there something the application developer or custom component developer > _cannot_ do with the proposed API? If we add the `traversalPolicy` API now, this

Re: RFR: 8090456: Focus Management [v9]

2024-10-09 Thread Andy Goryachev
On Wed, 9 Oct 2024 22:46:32 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v9]

2024-10-09 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request wit

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Michael Strauß
On Wed, 2 Oct 2024 17:33:15 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Andy Goryachev
On Wed, 9 Oct 2024 20:16:58 GMT, Nir Lisker wrote: > Adding an external class makes it more difficult to do focus management. How so? There are two parts to the focus management: focus traversal which effects the focusOwner change, and traversal policy that allows for custom logic. The third

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Andy Goryachev
On Wed, 9 Oct 2024 20:16:58 GMT, Nir Lisker wrote: > I would have used a `Focusable` interface only for those subclasses that can > have focus. a good point! I can add one more to that: why are we creating copies of Events during the dispatch? Doing so breaks `isConsumed()` contract and caus

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Andy Goryachev
On Wed, 2 Oct 2024 17:33:15 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Nir Lisker
On Wed, 2 Oct 2024 17:33:15 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Martin Fox
On Wed, 2 Oct 2024 17:33:15 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Andy Goryachev
On Wed, 2 Oct 2024 17:33:15 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v8]

2024-10-09 Thread Nir Lisker
On Tue, 8 Oct 2024 14:44:37 GMT, Andy Goryachev wrote: > FocusTraversal accepts null nodes, making the code more resilient In what way is it more resilient? `traverse` does nothing if the node is `null`, which means that passing `null` is a bug more often than not. `null` nodes can't be displa

Re: RFR: 8090456: Focus Management [v8]

2024-10-08 Thread Andy Goryachev
On Mon, 7 Oct 2024 23:08:43 GMT, Nir Lisker wrote: > I'm missing the explanation in the proposal for why the API needs to be > static methods called on nodes, and not have these methods on the nodes > themselves. I would say 1. `FocusTraversal` accepts `null` nodes, making the code more resili

Re: RFR: 8090456: Focus Management [v8]

2024-10-07 Thread Nir Lisker
On Wed, 2 Oct 2024 17:33:15 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v8]

2024-10-07 Thread Andy Goryachev
On Wed, 2 Oct 2024 17:33:15 GMT, Andy Goryachev wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~j

Re: RFR: 8090456: Focus Management [v8]

2024-10-02 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request wit

Re: RFR: 8090456: Focus Management [v7]

2024-09-26 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request inc

Re: RFR: 8090456: Focus Management [v6]

2024-09-25 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request inc

Re: RFR: 8090456: Focus Management [v5]

2024-09-25 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request inc

Re: RFR: 8090456: Focus Management [v4]

2024-09-24 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request inc

Re: RFR: 8090456: Focus Management [v3]

2024-09-24 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request wit

Re: RFR: 8090456: Focus Management [v2]

2024-09-13 Thread Andy Goryachev
> Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/8061673/ Andy Goryachev has updated the pull request wit

Re: RFR: 8090456: Focus Management

2024-09-13 Thread Andy Goryachev
On Tue, 10 Sep 2024 16:42:22 GMT, Kevin Rushforth wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/

Re: RFR: 8090456: Focus Management

2024-09-13 Thread Andy Goryachev
On Tue, 10 Sep 2024 16:26:17 GMT, Kevin Rushforth wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/

Re: RFR: 8090456: Focus Management

2024-09-13 Thread Andy Goryachev
On Tue, 10 Sep 2024 16:21:30 GMT, Kevin Rushforth wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/

Re: RFR: 8090456: Focus Management

2024-09-13 Thread Andy Goryachev
On Wed, 11 Sep 2024 17:18:58 GMT, Michael Strauß wrote: >> Thank you @mstr2 for a detailed writeup! >> >> I fully agree with you that the majority of use cases can be handled with >> the existing policies. >> >> The default one seems to be geometry-based ("directional") _where >> supported_,

Re: RFR: 8090456: Focus Management

2024-09-11 Thread Andy Goryachev
On Tue, 10 Sep 2024 16:38:26 GMT, Kevin Rushforth wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/

Re: RFR: 8090456: Focus Management

2024-09-11 Thread Michael Strauß
On Wed, 11 Sep 2024 15:06:07 GMT, Andy Goryachev wrote: > The default one seems to be geometry-based ("directional") _where supported_, > and the other being a "logical" one which is not explicitly accessible. The > question, therefore, is do we need a static getter for that kind of a policy?

Re: RFR: 8090456: Focus Management

2024-09-11 Thread Andy Goryachev
On Tue, 10 Sep 2024 16:30:51 GMT, Kevin Rushforth wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/

Re: RFR: 8090456: Focus Management

2024-09-11 Thread Andy Goryachev
On Wed, 11 Sep 2024 01:05:33 GMT, Michael Strauß wrote: >> Public APIs for focus traversal and the focus traversal policy: >> >> https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md >> >> This work is loosely based on the patch >> https://cr.openjdk.org/~

Re: RFR: 8090456: Focus Management

2024-09-10 Thread Michael Strauß
On Tue, 3 Sep 2024 19:09:15 GMT, Andy Goryachev wrote: > Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/

Re: RFR: 8090456: Focus Management

2024-09-10 Thread Kevin Rushforth
On Tue, 3 Sep 2024 19:09:15 GMT, Andy Goryachev wrote: > Public APIs for focus traversal and the focus traversal policy: > > https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md > > This work is loosely based on the patch > https://cr.openjdk.org/~jgiles/

RFR: 8090456: Focus Management

2024-09-09 Thread Andy Goryachev
Public APIs for focus traversal and the focus traversal policy: https://github.com/andy-goryachev-oracle/Test/blob/main/doc/FocusTraversal/FocusTraversal.md This work is loosely based on the patch https://cr.openjdk.org/~jgiles/8061673/ - Commit messages: - Merge remote-tracking br