Revision 9145
branches/v10/frameworks/_fwAndami/src/com/iver/andami/ui/mdiFrame/MDIFrame.java | ||
---|---|---|
45 | 45 |
import java.awt.Dimension; |
46 | 46 |
import java.awt.FlowLayout; |
47 | 47 |
import java.awt.Insets; |
48 |
import java.awt.Toolkit; |
|
48 | 49 |
import java.awt.event.ActionEvent; |
49 | 50 |
import java.awt.event.ActionListener; |
50 | 51 |
import java.awt.event.ComponentEvent; |
... | ... | |
721 | 722 |
} |
722 | 723 |
|
723 | 724 |
if (menu.getKey() != null) { |
724 |
nuevoMenu.setAccelerator(KeyStroke.getKeyStroke(KeyMapping.getKey( |
|
725 |
String osName = (String) System.getProperty("os.name"); |
|
726 |
if (osName.substring(0,6).toLowerCase().equals("mac os")) { |
|
727 |
nuevoMenu.setAccelerator(KeyStroke.getKeyStroke(KeyMapping.getKey( |
|
728 |
menu.getKey().charAt(0)), Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); |
|
729 |
} else { |
|
730 |
nuevoMenu.setAccelerator(KeyStroke.getKeyStroke(KeyMapping.getKey( |
|
725 | 731 |
menu.getKey().charAt(0)), ActionEvent.ALT_MASK)); |
732 |
} |
|
726 | 733 |
} |
727 | 734 |
|
728 | 735 |
nuevoMenu.setActionCommand(menu.getActionCommand()); |
Also available in: Unified diff