public void keyReleased(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_BACK_SPACE || e.getKeyCode() == KeyEvent.VK_ENTER) { String text = textEditor.getText(); if (comboBox.isShowing()) { suggestionList.hide(); suggestionList.filter(text); suggestionList.show(); } } }
private void showHideFields() { if (typeSelection.getSelectedItem() == MappingTypes.LITERAL) { if (!literalEntry.isShowing()) { changeableContentContainer.remove(fieldDrop); changeableContentContainer.add(literalEntry); } } else { if (!fieldSelection.isShowing()) { changeableContentContainer.remove(literalEntry); changeableContentContainer.add(fieldDrop); } } changeableContentContainer.validate(); changeableContentContainer.repaint(); }
public void run() { String text = textEditor.getText(); // need to hide first because Swing incorrectly updates popups (getSize() returns // dimension not the same as seen on the screen) suggestionList.hide(); if (comboBox.isShowing()) { suggestionList.filter(text); if (suggestionList.getItemCount() > 0) { suggestionList.show(); } } }