/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Provides a javax.swing.DefaultFocusManager view onto an arbitrary
* java.awt.KeyboardFocusManager. We subclass DefaultFocusManager instead of
* FocusManager because it seems more backward-compatible. It is likely that
* some pre-1.4 code assumes that the object returned by
* FocusManager.getCurrentManager is an instance of DefaultFocusManager unless
* set explicitly.
*/
}
return delegate;
}
// Legacy methods which first appeared in javax.swing.FocusManager.
// Client code is most likely to invoke these methods.
}
}
}
// Make sure that we delegate all new methods in KeyboardFocusManager
// as well as the legacy methods from Swing. It is theoretically possible,
// although unlikely, that a client app will treat this instance as a
// new-style KeyboardFocusManager. We might as well be safe.
//
// The JLS won't let us override the protected methods in
// KeyboardFocusManager such that they invoke the corresponding methods on
// the delegate. However, since client code would never be able to call
// those methods anyways, we don't have to worry about that problem.
return delegate.getFocusOwner();
}
public void clearGlobalFocusOwner() {
}
return delegate.getPermanentFocusOwner();
}
return delegate.getFocusedWindow();
}
return delegate.getActiveWindow();
}
return delegate.getDefaultFocusTraversalPolicy();
}
// Will be null when invoked from supers constructor.
}
}
public void
{
}
}
return delegate.getCurrentFocusCycleRoot();
}
}
}
}
}
}
}
}
}
}
}
}
return delegate.dispatchEvent(e);
}
return delegate.dispatchKeyEvent(e);
}
}
}
}