Reworked the caret animation logic. The memory leak is fixed by: - creating caret animation on demand and properly shutting it down on `dispose()` - unregistering the listening `VFlow` from the model
As a usability feature, the caret stops blinking and remains shown when navigating, editing, or when the mouse is pressed. Unfortunately, a minor transient issue remains where the caret starts blinking when it should not (for example, in the monkey tester, right click to invoke a popup menu, then right click in the text to dismiss and show the popup again - the caret blinks). I feel this is a minor, self-healing condition that I am ok with. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - cleanup - tree showing - focus - test - fix Changes: https://git.openjdk.org/jfx/pull/2365/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2365&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8396922 Stats: 494 lines in 5 files changed: 433 ins; 15 del; 46 mod Patch: https://git.openjdk.org/jfx/pull/2365.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2365/head:pull/2365 PR: https://git.openjdk.org/jfx/pull/2365
