Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8092094

Lacking concept of "inactive" focus owner

    Details

      Description

      The scenegraph lacks the concept of an "inactive" focus owner. Consider the case of a TextBox. Suppose I have some text in the TextBox and I select that text. If I transfer focus to a different application, the selection should still be valid and the selection should usually be rendered in a different color (most skins use grey). If however focus is transfered to a different control in the same application, then the selection should be cleared.

      Thus, there is a difference between having the focus (which requires the Stage to also be focused), and being the focus owner within the Stage.

      One solution is to have a focusOwner variable in addition to focused. Focused would indicate that the Node is both the focus owner and its Stage contains focus. Being the focusOwner simply indicates that this Node has the focus within the stage. If the stage loses focus, the Node would have "false" for focused but would still have "true" for focusOwner. If focus is transfered away programatically while the stage no longer has focus, the new Node would have focusOwner set to true but focused would be false.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arapte Ambarish Rapte
                Reporter:
                rbair Richard Bair
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported: