Class DirChooser

java.lang.Object
thinletcommons.DirChooser

public class DirChooser extends Object
A Thinlet directory chooser dialog.

The dialog is modal and blocks the calling frame/dialog. It is therefore displayed in a separate window.

TODO:

  • Button "Create directory"

Implementation note: This implementation uses javax.swing.filechooser.FileSystemView, because it provides directory information that looks more "native". This introduces a dependency on Swing, but since ThinG requires JDK 1.4, Swing should be there anyway. Only a minimal set of Swing classes is loaded while using javax.swing.filechooser.FileSystemView; alas, the loading of javax.swing.UIManager and javax.swing.LookAndFeel can not be avoided, although no Swing beans are actually used.

Author:
Dirk Moebius
  • Constructor Details

    • DirChooser

      public DirChooser(Frame owner, String title)
    • DirChooser

      public DirChooser(Dialog owner, String title)
  • Method Details

    • show

      public void show()
      Show the modal dialog. This halts the application until the user dismisses the dialog.
    • setSelectedDirectory

      public void setSelectedDirectory(File dir)
    • getSelectedDirectory

      public File getSelectedDirectory()
    • init

      public void init(Object tree)
      Thinlet callback.
    • ok

      public void ok(Object tree)
      Thinlet callback.
    • close

      public void close()
      Thinlet callback.
    • nodeExpanded

      public void nodeExpanded(Object tree, Object node)
      Thinlet callback.