List of usage examples for javafx.scene.input KeyCode ADD
KeyCode ADD
To view the source code for javafx.scene.input KeyCode ADD.
Click Source Link
From source file:ambroafb.general.countcombobox.CountComboBox.java
private void addKeyListeners() { KeyCode plus = KeyCode.ADD; KeyCode minus = KeyCode.SUBTRACT;//from w w w . j av a 2s . c o m 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(); }); }