Commit b1e45cbf authored by Petri Hintukainen's avatar Petri Hintukainen

BDFramePeer: Fix Java 9+ compatibility

parent 3af11f0a
/*
* This file is part of libbluray
* Copyright (C) 2012 Petri Hintukainen <phintuka@users.sourceforge.net>
* Copyright (C) 2012-2019 Petri Hintukainen <phintuka@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -173,7 +173,20 @@ public class BDFramePeer extends BDComponentPeer implements FramePeer
return ((BDToolkit)BDToolkit.getDefaultToolkit()).createImage((Component)null, width, height);
}
/* Java >= 9 */
public boolean requestFocus(Component c/*lightweightChild*/, boolean a/*temporary*/,
boolean b/*focusedWindowChangeAllowed*/, long l/*time*/,
java.awt.event.FocusEvent.Cause cause
) {
return requestFocusHelper(c, a, b, l);
}
/* Java < 9 */
public boolean requestFocus(Component c, boolean a, boolean b, long l, sun.awt.CausedFocusEvent.Cause d) {
return requestFocusHelper(c, a, b, l);
}
private boolean requestFocusHelper(Component c, boolean a, boolean b, long l) {
if (c == null) {
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment