Details
-
Type:
Enhancement
-
Status: Resolved
-
Priority:
P3
-
Resolution: Fixed
-
Affects Version/s: 9
-
Fix Version/s: 9
-
Component/s: client-libs
-
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)
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
- relates to
-
JDK-8154434 Open the request focus methods of the java.awt.Component which accept FocusEvent.Cause
-
- Resolved
-
-
JDK-8156591 IllegalAccessError in JFXPanel after fix for JDK-8080395
-
- Resolved
-
-
JDK-8065418 Migrate use of sun.{applet, awt, font, java2d, print, swing}.** to supported API
-
- Resolved
-
-
JDK-8156592 JFXPanel should use the new FocusEvent.getCause() API
-
- Resolved
-