GenericDialog and its font

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

GenericDialog and its font

Fred Damen
Greetings,

Dialog with a null parent initially has a null font.
GenericDialog now defaults to having a null parent and thus a null font.

gd.setFont(((new Dialog(IJ.getInstance())).getFont()));

Fred

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

Re: GenericDialog and its font

Kenneth R Sloan-2
Is there any chance of a fix that does not involve searching through hundreds of files to find and fix every GenericDialog?

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.

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

Re: GenericDialog and its font

Fred Damen
Yes.  The line provided can be added to the GenericDialog constructor just
after super.

Fred


On Fri, November 13, 2020 10:03 pm, Kenneth Sloan wrote:

> Is there any chance of a fix that does not involve searching through
> hundreds of files to find and fix every GenericDialog?
>
> --
> Kenneth Sloan
> [hidden email]
> Vision is the art of seeing what is invisible to others.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: GenericDialog and its font

Wayne Rasband-2
In reply to this post by Fred Damen
> On Nov 13, 2020, at 7:28 PM, Fred Damen <[hidden email]> wrote:
>
> Greetings,
>
> Dialog with a null parent initially has a null font.
> GenericDialog now defaults to having a null parent and thus a null font.

The GenericDialog.getFont() method in the 1.53g25 daily build only returns null when there is no “ImageJ” window.

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