positioning WaitForUserDialog() via macro command?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

positioning WaitForUserDialog() via macro command?

Bill Christens-Barry-2
I've noticed that the macro command waitForUser() places the dialog in the center of the screen. While the WaitForUserDialog class uses the variables int xloc, yloc to specify the position of this dialog, there apparently is no constructor or macro language syntax allowing the user to pass values for xloc and yloc in the macro language command. Is there an alternative means in the macro language for specifying where the dialog will be positioned on screen?

Thanks.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: positioning WaitForUserDialog() via macro command?

Rasband, Wayne (NIH/NIMH) [E]
> On Oct 9, 2015, at 10:26 PM, Bill Christens-Barry <[hidden email]> wrote:
>
> I've noticed that the macro command waitForUser() places the dialog in the center of the screen. While the WaitForUserDialog class uses the variables int xloc, yloc to specify the position of this dialog, there apparently is no constructor or macro language syntax allowing the user to pass values for xloc and yloc in the macro language command. Is there an alternative means in the macro language for specifying where the dialog will be positioned on screen?

In the latest ImageJ daily build (1.50d12), the WaitForUserDialog class has a setNextLocation(x,y) method that can be called from a macro. Here is an example:

  x=50; y=200;
  call("ij.gui.WaitForUserDialog.setNextLocation",x,y);
  waitForUser("This dialog is displayed at "+x+","+y);

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: positioning WaitForUserDialog() via macro command?

Bill Christens-Barry-2
In reply to this post by Bill Christens-Barry-2
Wayne,

Perfect - this does just what I was asking about. Thanks.

Bill Christens-Barry

> In the latest ImageJ daily build (1.50d12), the WaitForUserDialog class has a setNextLocation(x,y) method that can be called from a macro. > Here is an example:
>
>   x=50; y=200;
>   call("ij.gui.WaitForUserDialog.setNextLocation",x,y);
>   waitForUser("This dialog is displayed at "+x+","+y);
>
> -wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html