public class GralFileSelectWindow extends java.lang.Object implements GralFileDialog_ifc
GralFileSelector#createWindowConfirmSearchGthread(GralMngBuild_ifc)
.
The user can invoke #confirmSearchInFiles(GralFileSelector, Appendable)
to open that window.Modifier and Type | Field and Description |
---|---|
(package private) GralUserAction |
actionOk
Action of OK button or enter button.
|
(package private) GralUserAction |
actionOkForUser |
(package private) GralUserAction |
actionSelectFile |
private java.io.File |
dir |
GralFileSelector |
fileSelector |
static int |
version
Version, history and license.
|
private GralButton |
widgButtonOk |
private GralTextField |
widgFilename |
private GralWindow |
wind |
directory, multi
Constructor and Description |
---|
GralFileSelectWindow(java.lang.String name,
GralMng mng)
Creates the window to confirm search in files.
|
Modifier and Type | Method and Description |
---|---|
void |
closeDialog()
Set the window invisible, after select.
|
void |
closeWindow() |
java.lang.String[] |
getMultiSelection() |
java.lang.String |
getSelection()
Returns the last selected local path and file.
|
boolean |
open(java.lang.String sTitle,
int mode) |
void |
openDialog(FileRemote startDir,
java.lang.String sTitle,
boolean bForWrite,
GralUserAction actionSelect)
Prepares the action and appearance and shows the window.
|
java.lang.String |
show(java.lang.String sBaseDir,
java.lang.String sLocalDir,
java.lang.String sMask,
java.lang.String sTitle)
Shows the file dialog.
|
public static final int version
closeDialog()
systematically because openDialog(FileRemote, String, boolean, GralUserAction)
is given.
GralFileDialog_ifc
because it should be so. TODO tuning with the
other possibility SwtFileDialog
which uses the standard file dialog of windows or linux
GralFileSelector
private final GralWindow wind
public final GralFileSelector fileSelector
private final GralTextField widgFilename
private final GralButton widgButtonOk
GralUserAction actionOkForUser
private java.io.File dir
GralUserAction actionOk
GralUserAction actionSelectFile
public GralFileSelectWindow(java.lang.String name, GralMng mng)
public void openDialog(FileRemote startDir, java.lang.String sTitle, boolean bForWrite, GralUserAction actionSelect)
GralUserAction.exec(int, GralWidget_ifc, Object...)
is called with null for the widget (a widget should not
necessary for the user) but with the selected File(s) as Object parameter.
If one file is selected the first Object is instanceof File. If more as one files are selected
a ListstartDir
- sTitle
- shown in title bar of the windowbForWrite
- true then the name field is editable and "Save" is shown on button. False then the name Field
is readonly and "select" is shown on buttonactionSelect
- Action which is called on Button ok. The first Object of exec(...,object) is the selected File
or a File[] or Listpublic void closeDialog()
public boolean open(java.lang.String sTitle, int mode)
open
in interface GralFileDialog_ifc
public java.lang.String show(java.lang.String sBaseDir, java.lang.String sLocalDir, java.lang.String sMask, java.lang.String sTitle)
GralFileDialog_ifc
show
in interface GralFileDialog_ifc
sBaseDir
- Part of start path, which should not be leave in selection. May be nullsLocalDir
- Part of start path which is shown as default. May be null.
If both sBaseDir and sLocalDir are null, the dialog may start with the last saved base dir.sMask
- If not null, then mask for file selection. If null, all files will be shown.sTitle
- The title in the dialog's title. If null, then the title is unchanged.public java.lang.String[] getMultiSelection()
getMultiSelection
in interface GralFileDialog_ifc
public java.lang.String getSelection()
GralFileDialog_ifc
getSelection
in interface GralFileDialog_ifc
public void closeWindow()