|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fuin.utils4swing.dialogs.DirectorySelector
public class DirectorySelector
Helper class for selecting a directory. Can used from a non-EDT thread.
| Nested Class Summary | |
|---|---|
static class |
DirectorySelector.Result
Immutable directory selection result. |
| Constructor Summary | |
|---|---|
DirectorySelector(java.lang.String title,
java.lang.String directory,
boolean showIncludeSubdirs,
DirectorySelectorListener listener)
Constructor with title and start directory. |
|
DirectorySelector(java.lang.String title,
java.lang.String directory,
DirectorySelectorListener listener)
Constructor with title and start directory. |
|
| Method Summary | |
|---|---|
protected void |
cancel()
The user canceled the dialog. |
protected void |
close()
Close the frame and free all resources. |
static void |
main(java.lang.String[] args)
Starts the selector for a test. |
protected void |
ok()
The dialog was successfully finished. |
static DirectorySelector.Result |
selectDirectory(java.lang.String title,
java.lang.String directory)
Blocks the current thread and waits for the result of the selection dialog. |
void |
show()
Show the monitor dialog.If called outside the EDT this method will switch to the UI thread using SwingUtilities.invokeAndWait(Runnable). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectorySelector(java.lang.String title,
java.lang.String directory,
DirectorySelectorListener listener)
title - Title of the frame and panel.directory - Start directory.listener - Listener to inform about the result.
public DirectorySelector(java.lang.String title,
java.lang.String directory,
boolean showIncludeSubdirs,
DirectorySelectorListener listener)
title - Title of the frame and panel.directory - Start directory.showIncludeSubdirs - If the checkbox "include subdirectories" should be visible
true else false.listener - Listener to inform about the result.| Method Detail |
|---|
public final void show()
SwingUtilities.invokeAndWait(Runnable).
protected final void close()
SwingUtilities.invokeAndWait(Runnable).
protected final void cancel()
protected final void ok()
public static DirectorySelector.Result selectDirectory(java.lang.String title,
java.lang.String directory)
throws CanceledException
title - Title to display for the dialog.directory - Initial directory.
CanceledException - The user canceled the dialog.
public static void main(java.lang.String[] args)
throws java.io.IOException
args - Not used.
java.io.IOException - Error creating the canonical path for the current directory.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||