-
Enhancement
-
Resolution: Fixed
-
P3
-
9
-
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)
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)
- 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-8306119 Many components respond to a mouse event by requesting focus without supplying the MOUSE_EVENT cause
-
- Resolved
-
-
JDK-8156592 JFXPanel should use the new FocusEvent.getCause() API
-
- Resolved
-
-
JDK-8065418 Migrate use of sun.{applet, awt, font, java2d, print, swing}.** to supported API
-
- Closed
-