Imported GNU Classpath 0.20

Imported GNU Classpath 0.20
       * Makefile.am (AM_CPPFLAGS): Add classpath/include.
       * java/nio/charset/spi/CharsetProvider.java: New override file.
       * java/security/Security.java: Likewise.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r109831
This commit is contained in:
Mark Wielaard 2006-01-17 18:09:40 +00:00
parent bcb36c3e02
commit 2127637945
444 changed files with 75778 additions and 30731 deletions

View file

@ -380,12 +380,18 @@ public abstract class JTextComponent extends JComponent
public KeyStroke[] allKeys()
{
KeyStroke[] superKeys = super.allKeys();
KeyStroke[] mapKeys = map.getBoundKeyStrokes();
KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length];
for (int i = 0; i < superKeys.length; ++i)
KeyStroke[] mapKeys = map.getBoundKeyStrokes();
int skl = 0;
int mkl = 0;
if (superKeys != null)
skl = superKeys.length;
if (mapKeys != null)
mkl = mapKeys.length;
KeyStroke[] bothKeys = new KeyStroke[skl + mkl];
for (int i = 0; i < skl; ++i)
bothKeys[i] = superKeys[i];
for (int i = 0; i < mapKeys.length; ++i)
bothKeys[i + superKeys.length] = mapKeys[i];
for (int i = 0; i < mkl; ++i)
bothKeys[i + skl] = mapKeys[i];
return bothKeys;
}
}
@ -864,7 +870,7 @@ public abstract class JTextComponent extends JComponent
Hashtable acts = new Hashtable(actions.length);
for (int i = 0; i < actions.length; ++i)
acts.put(actions[i].getValue(Action.NAME), actions[i]);
for (int i = 0; i < bindings.length; ++i)
for (int i = 0; i < bindings.length; ++i)
if (acts.containsKey(bindings[i].actionName))
map.addActionForKeyStroke(bindings[i].key, (Action) acts.get(bindings[i].actionName));
}
@ -906,33 +912,16 @@ public abstract class JTextComponent extends JComponent
public JTextComponent()
{
Keymap defkeymap = getKeymap(DEFAULT_KEYMAP);
boolean creatingKeymap = false;
if (defkeymap == null)
{
defkeymap = addKeymap(DEFAULT_KEYMAP, null);
defkeymap.setDefaultAction(new DefaultEditorKit.DefaultKeyTypedAction());
creatingKeymap = true;
}
setFocusable(true);
setEditable(true);
enableEvents(AWTEvent.KEY_EVENT_MASK);
updateUI();
// need to do this after updateUI()
if (creatingKeymap)
loadKeymap(defkeymap,
new KeyBinding[] {
new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0),
DefaultEditorKit.backwardAction),
new KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0),
DefaultEditorKit.forwardAction),
new KeyBinding(KeyStroke.getKeyStroke("typed \b"),
DefaultEditorKit.deletePrevCharAction),
new KeyBinding(KeyStroke.getKeyStroke("typed \u007f"),
DefaultEditorKit.deleteNextCharAction)
},
getActions());
}
public void setDocument(Document newDoc)