/** @param container */
  public void closeContainer(SshToolsApplicationContainer container) {
    if (log.isDebugEnabled()) {
      log.debug("Asking " + container + " if it can close");
    }

    if (container.getApplicationPanel().canClose()) {
      if (log.isDebugEnabled()) {
        log.debug("Closing");

        for (Iterator i = containers.iterator(); i.hasNext(); ) {
          log.debug(i.next() + " is currently open");
        }
      }

      container.getApplicationPanel().close();
      container.closeContainer();
      containers.removeElement(container);

      if (containers.size() == 0) {
        exit(true);
      } else {
        log.debug("Not closing completely because there are containers still open");

        for (Iterator i = containers.iterator(); i.hasNext(); ) {
          log.debug(i.next() + " is still open");
        }
      }
    }
  }
Beispiel #2
0
 public void exit() {
   super.exit(true);
 }