<AWT Dev> Second patch for 6927978 (Directory Selection standard dialog support)

Costantino Cerbo c.cerbo at gmail.com
Tue May 18 14:55:50 PDT 2010

Hi everyone,

here is my second patch for the new DirectoryDialog.
In this new patch I take care of your previous annotations and I've
also implemented the XDirectoryDialogPeer as we've discussed.
XDirectoryDialogPeer is largely based on the XFileDialogPeer (there is
no inheritance because for several reasons, for example the
constructor, it wasn't a good option).

We have now the DirectoryDialog for both GTK and X11 but not yet for MS Windows!
@Damjan: Are you still going to implement the DirectoryDialog for MS
Windows? We didn't hear from you for weeks... it would be great if you
could do it!

I hope hearing from you soon!

2010/5/14 Anthony Petrov <Anthony.Petrov at sun.com>:
> Hi Costantino,
> Great progress! Thanks! I've published the patch as a webrev at:
> http://cr.openjdk.java.net/~anthony/7-45-DirectoryDialog-6927978.0/
> On 05/10/2010 01:31 AM, Costantino Cerbo wrote:
>> Regarding the XDirectoryDialogPeer (X-Windows) I don't know how the
>> original looks like.
>> My idea was to modify the XFileDialogPeer removing the columns on the
>> right (files) and leaving the one on the left (directories).
>> Also the files for the filter have to disappear. Do you agree?
>> Otherwise could you explain me how is the native X-Windows
>> DirectoryDialog?
> There's actually no such thing as 'original' directory dialog in X. Your
> idea about leaving just one column with the list of directories looks fine.
> Of course, we won't be able to support file name filters for directory names
> (seems like other platforms don't support that with their native directory
> dialogs), so removing the filter combobox sounds good as well.
> Some tiny nits:
> src/share/classes/java/awt/DirectoryDialog.java
>>  2  * Copyright 1995-2006 Sun Microsystems, Inc.  All Rights Reserved.
> The file has just been created, so I guess 2010 is enough in the copyright
> notice.
>>  150             if (peer == null)
>>  151                 peer = getToolkit().createDirectoryDialog(this);
> Please put the body of the if () in a block even though it's just one
> statement. I know, I know, that may look boring, but these are our code
> conventions that help maintain the code. :)
> src/solaris/classes/sun/awt/motif/MToolkit.java
>>  306         //TODO Still to implement?
> You can safely omit the comment! Hopefully the Mtoolkit will never come
> alive.
> --
> best regards,
> Anthony

More information about the awt-dev mailing list