<AWT Dev> RFE: Windows awt FileDialog in JDK9
Hendrik Schreiber
hs at tagtraum.com
Fri Mar 11 07:26:04 UTC 2016
> On Mar 10, 2016, at 09:54, Semyon Sadetsky <semyon.sadetsky at oracle.com> wrote:
>
> On 3/10/2016 10:22 AM, Hendrik Schreiber wrote:
>>> On Mar 10, 2016, at 07:26, Semyon Sadetsky <semyon.sadetsky at oracle.com> wrote:
>>>
>>> In my opinion the switching to old/new file dialog should be presented in more explicit way. The automatic fallback may cause unexpected behavior. May be it is worth to introduce a new system property to regulate the file dialog version.
>> Hey Semyon,
>>
>> I don’t have any strong feelings regarding an implicit switch or using a system property.
>>
>> Assuming the user has set the system property to use the new dialog (old dialog as default), what do you suggest should happen when the user calls setFilenameFilter()?
> the best what is reachable with the selected version and the platform API.
The best that’s reachable with a plain vanilla FilenameFilter would be to throw an exception. That’s why I suggested that FileTypeFilter in one of my previous mails: To offer at least some filter functionality while maintaining compatibility.
> But the default should be the most functional version i.e. GetOpenFileName.
Agreed.
> Yet another trouble is the IFileDialog returns a shell item while AWT dialog expects a path string. It s not always possible to convert shell folder to a f/s path string which can be correctly interpreted after.
Just because I’m curious: What’s an example for such a shell folder that does not correspond to a f/s path?
-hendrik
More information about the awt-dev
mailing list