Package com.actelion.research.gui
Class FileHelper
- java.lang.Object
-
- com.actelion.research.chem.io.CompoundFileHelper
-
- com.actelion.research.gui.FileHelper
-
public class FileHelper extends CompoundFileHelper
-
-
Field Summary
-
Fields inherited from class com.actelion.research.chem.io.CompoundFileHelper
cFileTypeDataWarrior, cFileTypeDataWarriorCompatibleData, cFileTypeDataWarriorMacro, cFileTypeDataWarriorQuery, cFileTypeDataWarriorTemplate, cFileTypeDataWarriorTemplateContaining, cFileTypeDirectory, cFileTypeJPG, cFileTypeMask, cFileTypePictureFile, cFileTypePNG, cFileTypeRD, cFileTypeRDV2, cFileTypeRDV3, cFileTypeRXN, cFileTypeSD, cFileTypeSDV2, cFileTypeSDV3, cFileTypeSOM, cFileTypeSVG, cFileTypeText, cFileTypeTextCommaSeparated, cFileTypeTextTabDelimited, cFileTypeUnknown
-
-
Constructor Summary
Constructors Constructor Description FileHelper(java.awt.Component parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
fileExists(java.io.File file, long timeOutMillis)
static java.util.ArrayList<java.io.File>
getCompatibleFileList(java.io.File directory, int filetypes)
static java.io.File
getFile(java.awt.Component parent, java.lang.String title, int filetypes)
For compatibility reasons...java.io.File
selectFileToOpen(java.lang.String title, int filetypes)
java.io.File
selectFileToOpen(java.lang.String title, int filetypes, java.lang.String initialFileName)
Shows a file-open-dialog, lets the user choose and returns the selected file.java.lang.String
selectFileToSave(java.lang.String title, int filetype, java.lang.String newFileName)
Shows a file-save-dialog, lets the user choose and return the file's path and name.java.lang.String
selectOption(java.lang.String message, java.lang.String title, java.lang.String[] option)
void
showMessage(java.lang.String message)
-
Methods inherited from class com.actelion.research.chem.io.CompoundFileHelper
createFileFilter, getCurrentDirectory, getErrorCount, getExtension, getExtensionList, getFileType, getRecordCount, readIDCodesFromFile, readIDCodesFromFile, readIDCodesWithNamesFromFile, readStructuresFromFile, readStructuresFromFile, removeExtension, removePathAndExtension, saveRXNFile, setCurrentDirectory
-
-
-
-
Method Detail
-
selectOption
public java.lang.String selectOption(java.lang.String message, java.lang.String title, java.lang.String[] option)
- Specified by:
selectOption
in classCompoundFileHelper
-
showMessage
public void showMessage(java.lang.String message)
- Specified by:
showMessage
in classCompoundFileHelper
-
getFile
public static java.io.File getFile(java.awt.Component parent, java.lang.String title, int filetypes)
For compatibility reasons...- Parameters:
parent
-title
-filetypes
-- Returns:
-
getCompatibleFileList
public static java.util.ArrayList<java.io.File> getCompatibleFileList(java.io.File directory, int filetypes)
-
selectFileToOpen
public java.io.File selectFileToOpen(java.lang.String title, int filetypes)
- Specified by:
selectFileToOpen
in classCompoundFileHelper
-
selectFileToOpen
public java.io.File selectFileToOpen(java.lang.String title, int filetypes, java.lang.String initialFileName)
Shows a file-open-dialog, lets the user choose and returns the selected file.- Parameters:
title
- of the dialog shownfiletypes
- one or more file types defined in CompoundFileHelperinitialFileName
- null or a suggested file name with or without complete path- Returns:
- null or selected file
-
selectFileToSave
public java.lang.String selectFileToSave(java.lang.String title, int filetype, java.lang.String newFileName)
Shows a file-save-dialog, lets the user choose and return the file's path and name.- Specified by:
selectFileToSave
in classCompoundFileHelper
- Parameters:
title
- of the dialog shownfiletype
- one of the file types defined in CompoundFileHelpernewFileName
- null or a suggested file name with or without extension- Returns:
- null or complete file path and name
-
fileExists
public static boolean fileExists(java.io.File file, long timeOutMillis)
-
-