Posted by
Joachim Wesner on
URL: http://imagej.273.s1.nabble.com/Pause-in-a-java-plugin-program-tp3697005p3697007.html
This is not yet included in the current API docs on the WebSite?! OR? I did
not find it!
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
______________________________________________________________________