Re: Antwort: Re: Pause in a java plugin program

Posted by Wayne Rasband on
URL: http://imagej.273.s1.nabble.com/Pause-in-a-java-plugin-program-tp3697005p3697008.html

On Mar 5, 2008, at 8:23 AM, Joachim Wesner wrote:

> This is not yet included in the current API docs on the WebSite?! OR?
> I did not find it!

The latest ImageJ source code (1.39u) is at

     http://rsb.info.nih.gov/ij/source/

The WaitForUserDialog class is at

     http://rsb.info.nih.gov/ij/source/ij/gui/WaitForUserDialog.java

The documentation for the waitForUser() macro function is at

     http://rsbweb.nih.gov/ij/developer/macro/functions.html#waitForUser

-wayne


> Cheers
>
>
> Joachim
>
>
>
>
>              Rasband Wayne
>              <[hidden email]>
>              Gesendet von:                                            
>  An
>              ImageJ Interest            [hidden email]
>              Group                                                  
> Kopie
>              <[hidden email].
>              GOV>                                                    
> Thema
>                                         WaitForUserDialog
>
>              22.02.2008 04:46
>
>
>               Bitte antworten
>                     an
>               ImageJ Interest
>                    Group
>              <[hidden email].
>                    GOV>
>
>
>
>
>
>
>> If i wanted to put a pause in my java plugin program so that
>> the user could select and cut part of the image and then press
>> an "ok" type button to carry on with the program, is this
>> possible and if so how?
>
> You can use the WaitForUserDialog class that was added in ImageJ
> 1.39r. For example
>
>      new WaitForUserDialog("Do something, then click OK.").show();
>
> or
>
>      new WaitForUserDialog("Title", "Do something, then click
> OK.").show();
>
> if you want to use a dialog title other than the default "Action
> Required".
>
> In a macro, use
>
>      waitForUser("Do something, then click OK");
>
> or
>
>      waitForUser("Title", "Do something, then click OK");
>
> Add new lines characters ("\n") to display multiple lines in the
> dialog, for example
>
>      waitForUser("Do something\nthen something else,\nthen click OK.");
>
> -wayne
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>