Package org.nlogo.awt

Examples of org.nlogo.awt.UserCancelException


                    new String[]{"Why?", "Continue anyway", I18N.guiJ().get("common.buttons.cancel")});
        if (choice == 1) {
          break;
        }
        if (choice == 2) {
           throw new UserCancelException();
        }
        org.nlogo.swing.BrowserLauncher.openURL
          (FileMenu.this, "https://github.com/NetLogo/NetLogo/wiki/Applets", false);
      }
View Full Code Here


      javax.swing.JOptionPane.showMessageDialog
          (this, "Save failed.  Error: " + saver.getException().getMessage(),
              "NetLogo", javax.swing.JOptionPane.ERROR_MESSAGE);
    }
    if (!saver.getResult()) {
      throw new UserCancelException();
    }
    app.tabs().saveExternalFiles();
  }
View Full Code Here

      String message = "There is a movie in progress. " +
          "Are you sure you want to exit this model? " +
          "You will lose the contents of your movie.";
      if (org.nlogo.swing.OptionDialog.show
          (this, "NetLogo", message, options) == 1) {
        throw new UserCancelException();
      }
      app.workspace().movieEncoder.cancel();
      app.workspace().movieEncoder = null;
    }
View Full Code Here

      case 0:
        return true;
      case 1:
        return false;
      default:
        throw new UserCancelException();
    }
  }
View Full Code Here

      String message = "This model was made with " + savedVersion + ". "
          + "If you save it in " + org.nlogo.api.Version.version()
          + " it may not work in the old version anymore.";
      if (org.nlogo.swing.OptionDialog.show
          (this, "NetLogo", message, options) != 0) {
        throw new UserCancelException();
      }
      savedVersion = org.nlogo.api.Version.version();
    }
  }
View Full Code Here

        "the model was created in " + version + ".) " +
        "NetLogo can try to open the model, but it may " +
        "or may not work.";
    if (org.nlogo.swing.OptionDialog.show
        (this, "NetLogo", message, options) != 0) {
      throw new UserCancelException();
    }
  }
View Full Code Here

        "the model was created in " + version + ".) " +
        "NetLogo can try to open the model, but it may " +
        "or may not work.";
    if (org.nlogo.swing.OptionDialog.show
        (this, "NetLogo", message, options) != 0) {
      throw new UserCancelException();
    }
  }
View Full Code Here

    String message = "You are attempting to open a 2D model in " +
        org.nlogo.api.Version.version() + ". " +
        "You might need to make changes before it will work in 3D.";
    if (org.nlogo.swing.OptionDialog.show
        (this, "NetLogo", message, options) != 0) {
      throw new UserCancelException();
    }
  }
View Full Code Here

    String[] options = {I18N.guiJ().get("common.buttons.ok")};
    org.nlogo.swing.OptionDialog.show
        (this, "NetLogo",
            "The file is not a valid NetLogo model file.",
            options);
    throw new UserCancelException();
  }
View Full Code Here

TOP

Related Classes of org.nlogo.awt.UserCancelException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.