Rajarshi Guha wrote:

>Though not related to command line args, is there a method that can be
>used to make Jmol not put things when called from Java code?
>
>So for example, when I bring up the viewer, it will output stuff like
>the version, JDK version etc. Is it possible to suppress that?
>  
>
yes, that capability is a byproduct of my commandline arguments upgrade. 
I took that stuff out of the Viewer() initialization and put it into 
setAppletContext(), shown below. That last parameter, 
"appletProxyOrCommandOptions" doubles as applet proxy for the applet and 
command options for the application. From the application -- as you are 
doing, I think -- right after calling the constructor for viewer, you 
would call:

viewer.setAppletContext("", null, null, "-i")

That also sets the log level to 3, which means general information is 
not displayed -- only warnings and errors. If that's too little 
information, then send it a script to set loglevel 4 (the default); or 
send it set loglevel 0, and Jmol will be absolutely silent.

Bob


  public void setAppletContext(String htmlName, URL documentBase, URL 
codeBase,
                               String appletProxyOrCommandOptions) {
    this.htmlName = htmlName;
    isApplet = (documentBase != null);
    String str = appletProxyOrCommandOptions;
    if (!isApplet) {
      // not an applet -- used to pass along command line options
      if (str.indexOf("-i") >= 0) {
        setLogLevel(3); //no info, but warnings and errors
        isSilent = true;
      }
      if (str.indexOf("-x") >= 0) {
        autoExit = true;
      }
      if (str.indexOf("-n") >= 0) {
        haveDisplay = false;
      }
      writeInfo = null;
      if (str.indexOf("-w") >= 0) {
        int i = str.indexOf("\1");
        int j = str.lastIndexOf("\1");
        writeInfo = str.substring(i + 1,j);
      }
      mustRender = (haveDisplay || writeInfo != null);
    }
   



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to