- java.lang.Object
-
- org.tentackle.fx.rdc.FileUtilities
-
@Service(FileUtilities.class) public class FileUtilities extends Object
File-related utility methods.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description FileUtilities()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FileUtilitiesgetInstance()The singleton.FileselectFile(String prefName, String prefKey, String fileExtension, String fileType, javafx.stage.Stage owner)Selects a file via filechooser dialog and remembers the decision in the user preferences.
-
-
-
Method Detail
-
getInstance
public static FileUtilities getInstance()
The singleton.- Returns:
- the singleton
-
selectFile
public File selectFile(String prefName, String prefKey, String fileExtension, String fileType, javafx.stage.Stage owner)
Selects a file via filechooser dialog and remembers the decision in the user preferences.- Parameters:
prefName- the preferences nameprefKey- the preferences keyfileExtension- the filename extension (including the leading dot)fileType- the localized name of the file typeowner- the dialog owner for the selection dialog, null if none- Returns:
- the selected file, null if aborted
-
-