On Mon, 8 Mar 2021 13:22:07 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:

> Fix updated after first round of review.

src/java.desktop/share/classes/javax/swing/filechooser/FileSystemView.java line 
260:

> 258: 
> 259:    /**
> 260:     * Icon for a file, directory, or folder as it would be displayed in

*Returns an icon* for a file…

src/java.desktop/share/classes/javax/swing/filechooser/FileSystemView.java line 
276:

> 274:     *
> 275:     * @param f a <code>File</code> object
> 276:     * @param size width and height of the icon in pixels

Pixels could be ambiguous now. Usually, Swing deals with user's space. That is 
16×16 icon should actually be 32×32 if the scale factor of the current display 
is 200%.

Yes, this issue is somewhat irrelevant because the method returns 
multi-resolution icon. However, the terminology used must be unambiguous and 
clear; for consistency with other Swing API, it should be in terms of user's 
space coordinates, *virtual pixels*.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2875

Reply via email to