/** Called when closed all components. Overrides superclass method, * also unregisters listening on node delegate. */ protected void notifyClosed() { // #27645 All components were closed, unregister weak listener on node. nodeL = null; super.notifyClosed(); }
/** Closes all opened editors (if the user agrees) and * flushes content of the document to the file. * * @param ask ask whether to save the document or not? * @return <code>false</code> if the operation is cancelled */ protected boolean close (boolean ask) { if (!super.close (ask)) { // if not all editors has been closed return false; } notifyClosed (); return true; }
/** Closes all opened editors (if the user agrees) and * flushes content of the document to the file. * * @param ask ask whether to save the document or not? * @return <code>false</code> if the operation is cancelled */ protected boolean close (boolean ask) { if (!super.close (ask)) { // if not all editors has been closed return false; } notifyClosed (); return true; }
/** When closing last view, also close the document. * @return <code>true</code> if close succeeded */ protected boolean closeLast() { if (!support.canClose ()) { // if we cannot close the last window return false; } // close everything and do not ask support.notifyClosed (); if (support.getLastSelected() == this) { support.setLastSelected(null); } return true; }
/** When closing last view, also close the document. * @return <code>true</code> if close succeeded */ protected boolean closeLast() { if (!support.canClose ()) { // if we cannot close the last window return false; } // close everything and do not ask support.notifyClosed (); if (support.getLastSelected() == this) { support.setLastSelected(null); } return true; }
/** Closes all opened editors (if the user agrees) and * flushes content of the document to the file. * * @param ask ask whether to save the document or not? * @return <code>false</code> if the operation is cancelled */ @Override protected boolean close(boolean ask) { CloneableEditorSupport redirect = CloneableEditorSupportRedirector.findRedirect(this); if (redirect != null) { return redirect.close(ask); } if (!super.close(ask)) { // if not all editors has been closed return false; } notifyClosed(); return true; }
/** Utility method to close the document. * * @param ask verify and ask the user whether a document can be closed or not? * @return true if the document was successfully closed * @since 6.37 */ protected final boolean closeLast(boolean ask) { if (ask) { if (!support.canClose()) { // if we cannot close the last window return false; } } // close everything and do not ask synchronized (CLOSE_LAST_LOCK) { if (CLOSE_LAST_LOCK[0]) { CLOSE_LAST_LOCK[0] = false; } else { support.notifyClosed(); } } if (support.getLastSelected() == this) { support.setLastSelected(null); } return true; }
synchronized (CLOSE_LAST_LOCK) { if (!CLOSE_LAST_LOCK[0]) { support.notifyClosed(); phase = Integer.MAX_VALUE;