mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
Added also NumPad [+] and [-] keys, see #87
This commit is contained in:
parent
e5b96b302c
commit
c75884e6ec
@ -294,7 +294,8 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
}
|
||||
}.setAccelerator("control PLUS");
|
||||
// enable [+] which is SHIFT+[=] on english keyboard layout
|
||||
circuitComponent.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, KeyEvent.CTRL_MASK, false), zoomIn);
|
||||
circuitComponent.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, KeyEvent.CTRL_DOWN_MASK, false), zoomIn);
|
||||
circuitComponent.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, KeyEvent.CTRL_DOWN_MASK, false), zoomIn);
|
||||
circuitComponent.getActionMap().put(zoomIn, zoomIn);
|
||||
|
||||
ToolTipAction zoomOut = new ToolTipAction(Lang.get("menu_zoomOut"), ICON_ZOOM_OUT) {
|
||||
@ -303,6 +304,9 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
circuitComponent.scaleCircuit(0.9);
|
||||
}
|
||||
}.setAccelerator("control MINUS");
|
||||
// enable [+] which is SHIFT+[=] on english keyboard layout
|
||||
circuitComponent.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, KeyEvent.CTRL_DOWN_MASK, false), zoomOut);
|
||||
circuitComponent.getActionMap().put(zoomOut, zoomOut);
|
||||
|
||||
ToolTipAction viewHelp = new ToolTipAction(Lang.get("menu_viewHelp"), ICON_HELP) {
|
||||
@Override
|
||||
|
@ -284,8 +284,10 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
ToolTipAction plus = new PlusMinusAction(1).setAccelerator("PLUS").enableAcceleratorIn(this);
|
||||
// enable [+] which is SHIFT+[=] on english keyboard layout
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, 0, false), plus);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, 0, false), plus);
|
||||
|
||||
new PlusMinusAction(-1).setAccelerator("MINUS").enableAcceleratorIn(this);
|
||||
ToolTipAction minus = new PlusMinusAction(-1).setAccelerator("MINUS").enableAcceleratorIn(this);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, 0, false), minus);
|
||||
|
||||
new ToolTipAction(Lang.get("menu_programDiode")) {
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user