/** * Return true when the pane exists and is visible. This is the preferred * method of testing the visibility of the pane instead of * <tt>getPane().isVisible()</tt> that forces the creation of the pane. */ public boolean isPaneVisible() { return (pane != null && pane.isVisible()); }
public void run() { CompletionQuery.Result res = lastResult; if (res != null) { getPane().setTitle(res.getTitle()); getView().setResult(res); if (isPaneVisible()) { getPane().refresh(); } else { getPane().setVisible(true); } } else { getPane().setVisible(false); caretPos = -1; } } });
/** * Show wait completion result. Always called from AWT. */ private void performWait() { getPane().setTitle(NbBundle.getBundle(org.netbeans.editor.BaseKit.class).getString("ext.Completion.wait")); getView().setResult((CompletionQuery.Result)null); if (isPaneVisible()) { getJDCPopupPanel().refresh(); } else { getJDCPopupPanel().setCompletionVisible(true); } }
/** * Set the visibility of the view. This method should be used mainly for * hiding the completion pane. If used with visible set to true it calls the * <tt>popup(false)</tt>. */ public void setPaneVisible(boolean visible) { if (visible) { if (extEditorUI.getComponent() != null) { popup(false); } } else { if (pane != null) { cancelRequest(); invalidateLastResult(); pane.setVisible(false); caretPos = -1; } } }
/** * Show wait completion result. Always called from AWT. */ private void performWait() { getPane().setTitle(LocaleSupport.getString("ext.Completion.wait")); getView().setResult((CompletionQuery.Result)null); if (isPaneVisible()) { getJDCPopupPanel().refresh(); } else { getJDCPopupPanel().setCompletionVisible(true); } }
getPane().setVisible(false); caretPos = -1; return;
/** * Show result popup. Always called from AWT. */ protected void performResults() { // sample CompletionQuery.Result res = lastResult; if (res != null) { if (instantSubstitution && res.getData().size() == 1 && !isPaneVisible() && instantSubstitution(caretPos)) return; getPane().setTitle(res.getTitle()); getView().setResult(res); if (isPaneVisible()) { getJDCPopupPanel().refresh(); } else { getJDCPopupPanel().setCompletionVisible(true); } } else { getJDCPopupPanel().setCompletionVisible(false); if (!isKeyPressed()) { caretPos=-1; } else { setKeyPressed(false); } } }
CancelableRunnable task = new QueryTask(wait, getPane().isVisible()); currentTask(task); if (provokedByAutoPopup == false) {
/** * Show result popup. Always called from AWT. */ protected void performResults() { // sample CompletionQuery.Result res = lastResult; if (res != null) { if (instantSubstitution && res.getData().size() == 1 && !isPaneVisible() && instantSubstitutionImpl(caretPos)) return; getPane().setTitle(res.getTitle()); getView().setResult(res); if (isPaneVisible()) { getJDCPopupPanel().refresh(); } else { getJDCPopupPanel().setCompletionVisible(true); } } else { getJDCPopupPanel().setCompletionVisible(false); if (!isKeyPressed()) { caretPos=-1; } else { setKeyPressed(false); } } }
CancelableRunnable task = new QueryTask(wait, getPane().isVisible()); currentTask(task); if (provokedByAutoPopup == false) {