Menu

#198 file open/save as dialog box

open
nobody
None
5
2004-02-25
2004-02-25
Anonymous
No

The standard windows file open/save as dialog box
allows the user to right-click on a file name to get the
standard windows explorer-style context menu to do
tasks such adding a directory, renaming files, deleting
files (which currently can't be done at all), etc.

This can be implemented very easily since all the code
for the dialog box is already built-into the windows
operating system (even if it's too time-consuming to
implement this on the UNIX version, on the Windows
version, it should be easy). The API function
GetOpenFileName() / GetSaveFileName() does
everything. Implementing this change will also allow
new features to be automatically added to the opening
dialog box to go with new versions of Windows that may
come out in the future.

Discussion

  • Charles Reis

    Charles Reis - 2004-02-25

    Logged In: YES
    user_id=429731

    Unfortunately, in Java, this requires using the
    java.awt.FileDialog class instead of
    javax.swing.JFileChooser. The AWT FileDialog is horribly
    crippled, and cannot even return multiple selected files (a
    frequently used feature in open dialogs).

    I agree that native file dialogs would be very nice to have
    (especially on Mac OS X, where the Swing JFileChooser is an
    abomination), but we shouldn't lose significant amounts of
    functionality in the process by using the AWT FileDialog.
    If there are other approaches anyone knows of or can find,
    please post them!

    Charlie

     
  • Neal Horowitz

    Neal Horowitz - 2004-02-25

    Logged In: YES
    user_id=697810

    I believe that in jdk1.5, the JFileChooser does come
    equipped with a context menu (at least in the Windows look
    and feel). Thus, once 1.5 is actually released, this will
    probably become moot, but I guess we should leave it open
    until then.

    Neal

     
  • Christopher Warrington

    Logged In: YES
    user_id=666678
    Originator: NO

    Running under Java 6, there is a context menu, but not a full Explorer context menu.