Java 8 ComponentInputMap - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ComponentInputMap class.

This code example shows how to use the following methods:put
			} else { 
				//special logic to support accelerator on JButton (issue 86) 
				if (button instanceof JButton) {
					InputMap keyMap = new ComponentInputMap(button);
					keyMap.put(def.getAccelerator(), "action");
					ActionMap actionMap = new ActionMapUIResource();
					actionMap.put("action", new AbstractAction() {
						public void actionPerformed(ActionEvent e) {
							ActionEvent evt = new ActionEvent(button, ActionEvent.ACTION_PERFORMED, "action");
							//fire event listeners 
							if (button.getActionListeners() != null) {
								for(ActionListener listener : button.getActionListeners()) {
See Code Examples for Java 8 ComponentInputMap Methods: