Login  Register

Re: Look and Feel of Directory Chooser under Windows & Linux

Posted by Michael Schmid on Mar 11, 2021; 11:08am
URL: http://imagej.273.s1.nabble.com/Choice-of-file-chooser-in-import-sequence-is-not-respected-tp5024507p5024519.html

Hi Gabriel,

unfortunately I don't understand the reason for the error, but another
way to try would be entering
 
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());

end then Macros>evaluate Javascript [ctrl-j].
(in any case, please remove line breaks introduced by the mailer, it
should be one line).

The Warning "Nashorn engine is planned to be removed from a future JDK
release" does not hurt because javascript is only a simple way to do
what ImageJ could eventually do in Java code.

Best,

Michael
________________________________________________________________________________
On 11/03/2021 11:56 am, Gabriel Landini wrote:

> Hi Michael,
> Not sure if this helps, but in opensuse (latest version) running:
>
>> eval("js","javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSys
>> temLookAndFeelClassName());");
>
> returns in the Log window:
>
> ReferenceError: "js" is not defined in nashorn:mozilla_compat.js at line
> number 69
>
> and the console shows:
>
> Warning: Nashorn engine is planned to be removed from a future JDK release
>
> Cheers
>
> Gabriel
>  
>> For some flavors of Linux, I fear that this will not be an improvement.
>> Also note that other javax.swing windows will change their appearance as
>> well, e.g. the Command Finder (<ctrl>-L).
>>
>>
>> Thus, I would be interested to get feedback (especially Linux & Windows
>> users) whether this should be done in ImageJ by default?
>>
>> To test it, run the macro and then File>Import Image Sequence, and press
>> the 'Browse' button to get a Directory Chooser (needs at least ImageJ
>> 1.53d).
>> Also please have a look at Plugins>Utilities>Find Commands and the
>> 'Help' of Edit>Options>Point Tool, whether you like their new appearance.
>> Users of Jerome Mutterer's Action Panels will also see a changed appearance.
>>
>> My impression is that the "System Look and Feel" is not a real
>> improvement under Ubuntu Linux. On other operating systems it may be
>> different (e.g. on MacOS, where the Directory Chooser is not affected, I
>> would prefer the SystemLookAndFeel for the Command Finder).
>>
>> What is your preference?
>>
>> Michael
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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