mirror of
https://github.com/nasa/trick.git
synced 2025-01-28 23:24:19 +00:00
Fix KeyStroke.getKeyStroke call.
This commit is contained in:
parent
f45a43eda0
commit
ee38f02075
@ -450,13 +450,13 @@ class PerfMenuBar extends JMenuBar implements ActionListener {
|
|||||||
JMenu traceSizeMenu = new JMenu("TraceSize");
|
JMenu traceSizeMenu = new JMenu("TraceSize");
|
||||||
JMenuItem traceSizeMenuIncrease = new JMenuItem("Increase Trace Width");
|
JMenuItem traceSizeMenuIncrease = new JMenuItem("Increase Trace Width");
|
||||||
traceSizeMenuIncrease.setActionCommand("increase-trace_width");
|
traceSizeMenuIncrease.setActionCommand("increase-trace_width");
|
||||||
KeyStroke ctrlPlus = KeyStroke.getKeyStroke(KeyEvent.VK_P, Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx());
|
KeyStroke ctrlPlus = KeyStroke.getKeyStroke('P', InputEvent.CTRL_MASK );
|
||||||
traceSizeMenuIncrease.setAccelerator(ctrlPlus);
|
traceSizeMenuIncrease.setAccelerator(ctrlPlus);
|
||||||
traceSizeMenuIncrease.addActionListener(this);
|
traceSizeMenuIncrease.addActionListener(this);
|
||||||
traceSizeMenu.add(traceSizeMenuIncrease);
|
traceSizeMenu.add(traceSizeMenuIncrease);
|
||||||
JMenuItem traceSizeMenuDecrease = new JMenuItem("Decrease Trace Width");
|
JMenuItem traceSizeMenuDecrease = new JMenuItem("Decrease Trace Width");
|
||||||
traceSizeMenuDecrease.setActionCommand("decrease-trace_width");
|
traceSizeMenuDecrease.setActionCommand("decrease-trace_width");
|
||||||
KeyStroke ctrlMinus = KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx());
|
KeyStroke ctrlMinus = KeyStroke.getKeyStroke('-', InputEvent.CTRL_MASK);
|
||||||
traceSizeMenuDecrease.setAccelerator(ctrlMinus);
|
traceSizeMenuDecrease.setAccelerator(ctrlMinus);
|
||||||
traceSizeMenuDecrease.addActionListener(this);
|
traceSizeMenuDecrease.addActionListener(this);
|
||||||
traceSizeMenu.add(traceSizeMenuDecrease);
|
traceSizeMenu.add(traceSizeMenuDecrease);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user