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

consider making sun.awt.CausedFocusEvent functionality public

    Details

    • Subcomponent:
    • Resolved In Build:
      b117

      Description

      Currently, the sun.awt.CausedFocusEvent class is used internally as a runtime value of a focus event. The class adds a "cause" field to java.awt.FocusEvent which describes an action caused the event. The set of the "cause" values is defined as below which is pretty mnemonic:

              UNKNOWN,
              MOUSE_EVENT,
              TRAVERSAL,
              TRAVERSAL_UP,
              TRAVERSAL_DOWN,
              TRAVERSAL_FORWARD,
              TRAVERSAL_BACKWARD,
              MANUAL_REQUEST,
              AUTOMATIC_TRAVERSE,
              ROLLBACK,
              NATIVE_SYSTEM,
              ACTIVATION,
              CLEAR_GLOBAL_FOCUS_OWNER,
              RETARGETED

      This information may give a client an ability to make its response to a focus event more specific.

      Also, in conjunction with it, we should consider adding appropriate focus request methods to a component:

      public boolean requestFocus(CausedFocusEvent.Cause)
      public boolean requestFocusInWindow(CausedFocusEvent.Cause)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ssadetsky Semyon Sadetsky (Inactive)
                Reporter:
                ant Anton Tarasov
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: