Browse Source

bug fix 方向键选择bug

master
XiaXiang 7 years ago
parent
commit
fd6cdfe4f7
  1. 10
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

10
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -587,9 +587,8 @@ public class AlphaFineDialog extends UIDialog {
searchTextField.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_DOWN && searchTextField.hasFocus()) {
if (e.getKeyCode() == KeyEvent.VK_DOWN) {
searchResultList.requestFocus();
searchResultList.setSelectedIndex(searchResultList.getSelectedIndex() + 1);
}
}
});
@ -885,6 +884,13 @@ public class AlphaFineDialog extends UIDialog {
}
}
});
addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
setSelectedIndex(searchResultList.getSelectedIndex() + 1);
}
});
}

Loading…
Cancel
Save