List of usage examples for java.awt.event KeyEvent getKeyCode
public int getKeyCode()
From source file:ECallCenter21.java
private void statisticsPanelKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_statisticsPanelKeyPressed if (evt.getKeyCode() == 9) { statisticsPanel.getNextFocusableComponent().requestFocusInWindow(); }/* ww w .j av a2 s . c o m*/ }
From source file:ECallCenter21.java
private void phoneDisplayTabPanelKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_phoneDisplayTabPanelKeyPressed if (evt.getKeyCode() == 9) { phoneDisplayTabPanel.getNextFocusableComponent().requestFocusInWindow(); }/*from www . j a va2s. c o m*/ }
From source file:com.peterbochs.PeterBochsDebugger.java
private void jBochsCommandTextFieldKeyPressed(KeyEvent evt) { if (bochsCommandTextField.getText().equals("")) { commandHistoryIndex = 0;//from ww w .java 2 s . c o m } HashSet<String> vector = Setting.getInstance().getBochsCommandHistory(); if (evt.getKeyCode() == 38) { if (commandHistoryIndex < vector.size()) { commandHistoryIndex++; this.bochsCommandTextField .setText(vector.toArray()[vector.size() - commandHistoryIndex].toString()); } } else if (evt.getKeyCode() == 40) { if (commandHistoryIndex > 1) { commandHistoryIndex--; this.bochsCommandTextField .setText(vector.toArray()[vector.size() - commandHistoryIndex].toString()); } } }
From source file:ECallCenter21.java
private void vergunningCodeFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_vergunningCodeFieldKeyReleased if ((vergunningCodeField.getText().length() > 0) && (evt.getKeyCode() != 10)) { applyVergunningButton.setEnabled(true); requestVergunningButton.setEnabled(true); } else {/*from ww w . ja v a 2s.c o m*/ applyVergunningButton.setEnabled(false); requestVergunningButton.setEnabled(false); } }
From source file:org.simmi.GeneSetHead.java
License:asdf
public void initFSKeyListener(final Window window) { keylistener = new KeyListener() { @Override/*from www . j ava 2s. c o m*/ public void keyTyped(KeyEvent e) { } @Override public void keyReleased(KeyEvent e) { } @Override public void keyPressed(KeyEvent e) { GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); if (e.getKeyCode() == KeyEvent.VK_F11 && gd.isFullScreenSupported()) { Window w = gd.getFullScreenWindow(); if (w != null) { gd.setFullScreenWindow(null); } else { gd.setFullScreenWindow(window); } } } }; }