diff options
| author | Roman Kennke <roman@kennke.org> | 2005-10-28 16:41:15 +0000 |
|---|---|---|
| committer | Roman Kennke <roman@kennke.org> | 2005-10-28 16:41:15 +0000 |
| commit | c0d2f84ebc78a2d5926afadf032cfeeb85fc0d30 (patch) | |
| tree | a8d5ea00f10e5b0a324756fbdfa794c13e6b860b /java/awt/KeyboardFocusManager.java | |
| parent | 74aa237f5a023c6814a1312836f3aed933387220 (diff) | |
| download | classpath-c0d2f84ebc78a2d5926afadf032cfeeb85fc0d30.tar.gz | |
2005-10-28 Roman Kennke <kennke@aicas.com>
* java/awt/KeyboardFocusManager.java
(setCurrentKeyboardFocusManager): Create a DefaultKeyboardFocusManager
directly.
(createFocusManager): Removed.
* gnu/java/awt/FocusManager.java: Removed.
* javax/swing/FocusManager.java
(DisabledFocusManager): Removed inner class.
(WrappingFocusManager): New inner class.
(getCurrentManager): Return WrappingKeyboardFocusManager instance.
Diffstat (limited to 'java/awt/KeyboardFocusManager.java')
| -rw-r--r-- | java/awt/KeyboardFocusManager.java | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/java/awt/KeyboardFocusManager.java b/java/awt/KeyboardFocusManager.java index 0e8a06bf0..371ea9bdf 100644 --- a/java/awt/KeyboardFocusManager.java +++ b/java/awt/KeyboardFocusManager.java @@ -288,7 +288,7 @@ public abstract class KeyboardFocusManager KeyboardFocusManager manager; if (m == null) - manager = createFocusManager(); + manager = new DefaultKeyboardFocusManager(); else manager = m; @@ -296,46 +296,6 @@ public abstract class KeyboardFocusManager } /** - * Creates a KeyboardFocusManager. The exact class is determined by the - * system property 'gnu.java.awt.FocusManager'. If this is not set, - * we default to DefaultKeyboardFocusManager. - */ - private static KeyboardFocusManager createFocusManager() - { - String fmClassName = System.getProperty("gnu.java.awt.FocusManager", - "java.awt.DefaultKeyboardFocusManager"); - try - { - Class fmClass = Class.forName(fmClassName); - KeyboardFocusManager fm = (KeyboardFocusManager) fmClass.newInstance(); - return fm; - } - catch (ClassNotFoundException ex) - { - System.err.println("The class " + fmClassName + " cannot be found."); - System.err.println("Check the setting of the system property"); - System.err.println("gnu.java.awt.FocusManager"); - return null; - } - catch (InstantiationException ex) - { - System.err.println("The class " + fmClassName + " cannot be"); - System.err.println("instantiated."); - System.err.println("Check the setting of the system property"); - System.err.println("gnu.java.awt.FocusManager"); - return null; - } - catch (IllegalAccessException ex) - { - System.err.println("The class " + fmClassName + " cannot be"); - System.err.println("accessed."); - System.err.println("Check the setting of the system property"); - System.err.println("gnu.java.awt.FocusManager"); - return null; - } - } - - /** * Retrieve the {@link Component} that has the keyboard focus, or * null if the focus owner was not set by a thread in the current * {@link java.lang.ThreadGroup}. |
