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:
parent
bcb36c3e02
commit
2127637945
444 changed files with 75778 additions and 30731 deletions
|
@ -1,5 +1,5 @@
|
|||
/* JMenuItem.java --
|
||||
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2004, 2005,2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -117,6 +117,24 @@ public class JMenuItem extends AbstractButton implements Accessible,
|
|||
super();
|
||||
super.setAction(action);
|
||||
init(null, null);
|
||||
if (action != null)
|
||||
{
|
||||
String name = (String) action.getValue(Action.NAME);
|
||||
if (name != null)
|
||||
setName(name);
|
||||
|
||||
KeyStroke accel = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
|
||||
if (accel != null)
|
||||
setAccelerator(accel);
|
||||
|
||||
Integer mnemonic = (Integer) action.getValue(Action.MNEMONIC_KEY);
|
||||
if (mnemonic != null)
|
||||
setMnemonic(mnemonic.intValue());
|
||||
|
||||
String command = (String) action.getValue(Action.ACTION_COMMAND_KEY);
|
||||
if (command != null)
|
||||
setActionCommand(command);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -273,8 +291,9 @@ public class JMenuItem extends AbstractButton implements Accessible,
|
|||
if (! (this instanceof JMenu) && action != null)
|
||||
{
|
||||
setAccelerator((KeyStroke) (action.getValue(Action.ACCELERATOR_KEY)));
|
||||
super.registerKeyboardAction(action, accelerator,
|
||||
JComponent.WHEN_IN_FOCUSED_WINDOW);
|
||||
if (accelerator != null)
|
||||
super.registerKeyboardAction(action, accelerator,
|
||||
JComponent.WHEN_IN_FOCUSED_WINDOW);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue