Package thinletcommons
Class DirChooser
java.lang.Object
thinletcommons.DirChooser
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 Summary
ConstructorsConstructorDescriptionDirChooser(Dialog owner, String title) DirChooser(Frame owner, String title) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Thinlet callback.voidThinlet callback.voidnodeExpanded(Object tree, Object node) Thinlet callback.voidThinlet callback.voidsetSelectedDirectory(File dir) voidshow()Show the modal dialog.
-
Constructor Details
-
DirChooser
-
DirChooser
-
-
Method Details
-
show
public void show()Show the modal dialog. This halts the application until the user dismisses the dialog. -
setSelectedDirectory
-
getSelectedDirectory
-
init
Thinlet callback. -
ok
Thinlet callback. -
close
public void close()Thinlet callback. -
nodeExpanded
Thinlet callback.
-