List of usage examples for javafx.scene.input KeyCode SUBTRACT
KeyCode SUBTRACT
To view the source code for javafx.scene.input KeyCode SUBTRACT.
Click Source Link
From source file:ambroafb.general.countcombobox.CountComboBox.java
private void addKeyListeners() { KeyCode plus = KeyCode.ADD;/*from w w w. j av a 2 s . com*/ KeyCode minus = KeyCode.SUBTRACT; setOnKeyPressed((KeyEvent event) -> { KeyCode eventKey = event.getCode(); CountComboBoxItem selectedItem = getSelectionModel().getSelectedItem(); if (selectedItem == null) return; CountComboBoxContainer selectedDrawItem = containers.get(selectedItem.getUniqueIdentifier()); if (eventKey.equals(plus)) { selectedDrawItem.increaseNumberBy(counter); } else if (eventKey.equals(minus)) { selectedDrawItem.decreaseNumberBy(counter); } refreshButtonCell(); }); }