<AWT Dev> <AWT dev>[9] Review request for 8154434: Open the request focus methods of the java.awt.Component which accept FocusEvent.Cause

Semyon Sadetsky semyon.sadetsky at oracle.com
Tue Apr 19 09:30:38 UTC 2016


Please review fix for JDK9:

bug: https://bugs.openjdk.java.net/browse/JDK-8154434
webrev: http://cr.openjdk.java.net/~ssadetsky/8154434/webrev.00/

To support the new FocusEvent cause concept introduced by JDK-8080395 
the next package-private methods of the java.awt.Component class are 
opened in the fix:

boolean requestFocus(FocusEvent.Cause cause)  -> public void 
requestFocus(FocusEvent.Cause cause)

boolean requestFocus(boolean temporary, FocusEvent.Cause cause) -> 
protected boolean requestFocus(boolean temporary, FocusEvent.Cause cause)

boolean requestFocusInWindow(FocusEvent.Cause cause) -> public boolean 
requestFocusInWindow(FocusEvent.Cause cause)

The methods are changed to be symmetric with the focus request methods 
of the same class which do not accept the cause parameter.
The method requestFocus(FocusEvent.Cause cause) was changed to return no 
value similarly to the requestFocus() because the returning boolean true 
cannot guarantee the focus gain.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160419/8e09c644/attachment.html>

More information about the awt-dev mailing list