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

consider making sun.awt.CausedFocusEvent functionality public

XMLWordPrintable

    • b117

      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)

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

              Created:
              Updated:
              Resolved: