Skip to content

Commit 1034100

Browse files
committed
Add mnemonic keys to menu bar menus.
1 parent 3d6ae97 commit 1034100

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/nl/tudelft/ti2806/pl1/gui/MenuBar.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public MenuBar(final Window w) {
4646
*/
4747
private JMenu fileMenu() {
4848
JMenu ret = new JMenu("File");
49+
ret.setMnemonic('F');
4950
JMenuItem impGraph = new JMenuItem();
5051
setMenuItem(impGraph, "Import graph", 'I',
5152
"Import a sequence graph (.node.graph and .edge.graph)",
@@ -84,6 +85,7 @@ public boolean isEnabled() {
8485
*/
8586
private JMenu helpMenu() {
8687
JMenu ret = new JMenu("Help");
88+
ret.setMnemonic('H');
8789
JMenuItem help = new JMenuItem();
8890
setMenuItem(help, "Help", 'H', "Press to show shortcuts", AppEvent.HELP);
8991
setAcc(help, KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0));
@@ -107,6 +109,7 @@ public boolean isEnabled() {
107109
return window != null && window.getContent().isGraphLoaded();
108110
}
109111
};
112+
ret.setMnemonic('V');
110113

111114
JMenuItem reset = new JMenuItem();
112115
setMenuItem(reset, "Reset initial view", 'R',

0 commit comments

Comments
 (0)