public void caretUpdate(CaretEvent e) { if (!isPaneVisible()) { // cancel timer if caret moved cancelRequest(); } else { // refresh completion only if a pane is already visible refresh(true); } } };
public void removeUpdate(DocumentEvent evt) { if (evt.getLength() > 0) { invalidateLastResult(); refresh(false); } }
public void insertUpdate(DocumentEvent evt) { if (evt.getLength() > 0) { invalidateLastResult(); refresh(false); } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { if (completion.substituteText(true)) { // completion.setPaneVisible(false); } else { completion.refresh(false); } } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { completion.refresh(false); completion.substituteCommonText(); } else { super.actionPerformed(evt, target); } } }
/** * Get the help and show it in the view. If the view is already visible * perform the refresh of the view. * * @param postRequest * post the request instead of displaying the view immediately. * The <tt>ExtSettingsNames.COMPLETION_AUTO_POPUP_DELAY</tt> * setting stores the number of milliseconds before the view is * displayed. If the user presses a key until the delay expires * nothing is shown. This guarantees that the user which knows * what to write will not be annoyed with the unnecessary help. */ public synchronized void popup(boolean postRequest) { if (isPaneVisible()) { refresh(postRequest); } else { timer.stop(); if (postRequest) { timer.setInitialDelay(autoPopupDelay); timer.setDelay(autoPopupDelay); timer.start(); } else { actionPerformed(null); } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { if (completion.substituteText(false)) { completion.setPaneVisible(false); } else { completion.refresh(false); } } else { super.actionPerformed(evt, target); } } }