Close the current modal component of a specific RootPaneContainer.

@param rootPane
the RootPaneContainer with a modal
541439
private static void closeCurrentModal_(RootPaneContainer rootPane) {
	synchronized (modals) {
	  Modal modal = modals.get(rootPane);
	  if (modal != null) {
		modal.closeCurrent();
		if (modal.getSize() == 0) {
		  modals.remove(rootPane);
		}
	  }
	}
  }
860741
public static RootPaneContainer findRootPaneContainer(final Component source) {
        Component comp = source;
        while ((comp != null) && !(comp instanceof RootPaneContainer)) {
            comp = comp.getParent();
        }
        if (comp instanceof RootPaneContainer) {
            return (RootPaneContainer) comp;
        }
        return null;
    }
1140667
void remove(JInternalFrame internalFrame)
    {
        Component component = frameToComponent.get(internalFrame);
        container.remove(component);
    }
478854
public void closeWindowPerformed(SwingFrame frameView) {
		if (!navigationFrames.contains(frameView)) return;
		
		if (navigationFrames.size() == 1 && !askBeforeExit(frameView)) {
			return;
		}
		
		if (frameView.tryToCloseWindow()) {
			removeNavigationFrameView(frameView);
		}
	}
584826
function(){
    var view = this.currentView;
    if (!view || view.isClosed){ return; }

    // call 'close' or 'remove', depending on which is found
    if (view.close) { view.close(); }
    else if (view.remove) { view.remove(); }

    Marionette.triggerMethod.call(this, "close");

    delete this.currentView;
  }
339081
protected void doClose(int tabIndex) {
        if (tabCloseListener == null || tabCloseListener.tabAboutToBeClosed(tabIndex)) {
            String    title     = tabPane.getTitleAt(tabIndex);
            Component component = tabPane.getComponentAt(tabIndex);

            tabPane.removeTabAt(tabIndex);

            if (tabCloseListener != null) {
                tabCloseListener.tabClosed(title, component);
            }
        }
    }
151685
public void close() {
        synchronized(factory.cnxns){
            // if this is not in cnxns then it's already closed
            if (!factory.cnxns.remove(this)) {
                return;
            }

            synchronized (factory.ipMap) {
                Set<NIOServerCnxn> s =
                    factory.ipMap.get(sock.socket().getInetAddress());
                s.remove(this);
            }

            // unregister from JMX
            try {
                if(jmxConnectionBean != null){
                    MBeanRegistry.getInstance().unregister(jmxConnectionBean);
                }
            } catch (Exception e) {
                LOG.warn("Failed to unregister with JMX", e);
            }
            jmxConnectionBean = null;

            if (zk != null) {
                zk.removeCnxn(this);
            }

            closeSock();

            if (sk != null) {
                try {
                    // need to cancel this selection key from the selector
                    sk.cancel();
                } catch (Exception e) {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("ignoring exception during selectionkey cancel", e);
                    }
                }
            }
        }
    }
1033106
protected void closePopup() {

        if (m_previewHandlerRegistration != null) {
            m_previewHandlerRegistration.removeHandler();
        }
        m_previewHandlerRegistration = null;
        CmsColorSelector picker = (CmsColorSelector)m_popup.getWidget(0);
        if (checkvalue("#" + picker.getHexColor().toUpperCase())) {
            m_popup.hide();
        }

    }
807053
private void close(Component component) {
	if (components.size() > 0) {
	  if (components.contains(component) == false) {
		return;
	  }

	  components.remove(component);
	  depths.remove(component);
	  getModalPanel().removeAll();
	  fireCloseActionListener(listeners.get(component));
	  listeners.remove(component);

	  if (components.size() > 0) {
		showNextComponent();
	  } else {
		restoreRootPane();
	  }
	}
  }
945188
void forceToEnd(@Nullable ViewGroup sceneRoot) {
        ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators();
        int numOldAnims = runningAnimators.size();
        if (sceneRoot != null) {
            Object windowId = ViewUtils.getWindowId(sceneRoot);
            for (int i = numOldAnims - 1; i >= 0; i--) {
                AnimationInfo info = runningAnimators.valueAt(i);
                if (info.view != null && windowId != null && windowId.equals(info.windowId)) {
                    Animator anim = runningAnimators.keyAt(i);
                    anim.end();
                }
            }
        }
    }
1347079
protected void closeDialog() {
		if (m_CustomEditor instanceof Container) {
			Dialog dlg = PropertyDialog.getParentDialog((Container) m_CustomEditor);
			if (dlg != null)
				dlg.setVisible(false);
		}
	}
686510
function () {
            var subWindow = this._subWindow;
            if (subWindow) {
                this._subWindow = null;
                if (!subWindow.closed) {
                    if (this._rootTplCtxtRef) {
                        this._rootTplCtxtRef.$dispose();
                    }
                    if (this._moduleCtrlRef) {
                        this._moduleCtrlRef.$dispose();
                    }
                    subWindow.close();
                }
                this._moduleCtrlRef = null;
                this._rootTplCtxtRef = null;

                ariaUtilsAriaWindow.$unregisterListeners(this);
                ariaUtilsAriaWindow.detachWindow();

                this.isOpen = false;
            }
        }
352534
public void dismiss() {
    if (isDismissing) {
      return;
    }

    outAnim.setAnimationListener(new Animation.AnimationListener() {
      @Override public void onAnimationStart(Animation animation) {

      }

      @Override public void onAnimationEnd(Animation animation) {
        decorView.post(new Runnable() {
          @Override public void run() {
            decorView.removeView(rootView);
            isDismissing = false;
            if (onDismissListener != null) {
              onDismissListener.onDismiss(DialogPlus.this);
            }
          }
        });
      }

      @Override public void onAnimationRepeat(Animation animation) {

      }
    });
    contentContainer.startAnimation(outAnim);
    isDismissing = true;
  }
1064611
public function close()
    {
        $this->out->write($this->doc->saveXML());
        $this->rootNode = null;
        $this->doc = null;
        parent::close();
    }
179893
private void removeParentPropertyChangeListener(PropertyChangeListener listener) {
        if (rootParent instanceof JFrame) {
            ((JFrame) rootParent).removePropertyChangeListener(listener);
        } else if (rootParent instanceof JDialog) {
            ((JDialog) rootParent).removePropertyChangeListener(listener);
        }
    }
219518
public void setRootElement(java.lang.String rootElement) {
        getStateHelper().put(PropertyKeys.rootElement, rootElement);
        handleAttribute("rootElement", rootElement);
    }
1193884
@Deprecated
    public void close(ComponentDescriptor<?> descriptor, Object component) {
        close(descriptor, component, true);
    }