JDK-8080395 : consider making sun.awt.CausedFocusEvent functionality public
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-05-14
  • Updated: 2017-05-17
  • Resolved: 2016-04-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b117Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
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)
Comments
No
09-03-2016

Semyon, did you have any input from reviewers?
04-03-2016

Pending review (Sergey, Phil)
15-02-2016