Posted by
Fernando Sales on
Jul 02, 2009; 4:54pm
URL: http://imagej.273.s1.nabble.com/setYesLabel-and-setNoLabel-tp3691928p3691931.html
That's great!
This is one of the reasons i've choosen IJ as a development platform.
IJ has been dialy updated indeed and, when a good suggestion appears, it's
fastly added to IJ.
Congratulations to Wayne and others IJ developers.
Best Regards,
Fernando Sales
_____________________________________________________
Electronic Engineer, PhD Student - Biomedical Engineering
Heart Institute (InCor) - University of Sao Paulo Medical School
Informatics Division - InCor
Av. Enéas de Carvalho Aguiar, 44
ZIP:05403-000 São Paulo- SP-Brazil
Tel.: 55-11-3069-5545 Fax : 55-11-3069-5311
http://lattes.cnpq.br/2763370548436903_____________________________________________________
On Thu, Jul 2, 2009 at 11:04 AM, Wayne Rasband <
[hidden email]> wrote:
> Hi,
>> I'm building a GUI for my plugin and I've just realised I could achieve
>> quite a bit with the GenericDialog if I could set the captions of the Yes
>> and No buttons. In my case, I want the no button to say "Add another file"
>> and the yes button to say "Run batch". I think this is a very simple way of
>> making the generic dialog more versatile.
>> So would it be possible to add two more functions to the GenericDialog
>> class?
>>
>
> The GenericDialog class in the v1.43c daily build adds a
> enableYesNoCancel(yesLabel, noLabel) method. Here is an example that shows
> how to use it:
>
> GenericDialog gd = new GenericDialog("YesNoCancel Demo");
> gd.addMessage("This is a custom YesNoCancel dialog");
> gd.enableYesNoCancel("Run batch", "Add another file");
> gd.showDialog();
> if (gd.wasCanceled())
> IJ.log("The user clicked on the 'Cancel' button");
> else if (gd.wasOKed())
> IJ. log("The user clicked on the 'Yes' button");
> else
> IJ. log("The user clicked on the 'No' button");
>
> -wayne
>
--
**************************************************
Fernando José Ribeiro Sales
**************************************************
Email:
[hidden email]
Tel: (11) 82020303
**************************************************