Class SaveFileDataSourceQueryChooser
- java.lang.Object
-
- com.vividsolutions.jump.workbench.datasource.FileDataSourceQueryChooser
-
- com.vividsolutions.jump.workbench.datasource.SaveFileDataSourceQueryChooser
-
- All Implemented Interfaces:
DataSourceQueryChooser
public class SaveFileDataSourceQueryChooser extends FileDataSourceQueryChooser
UI for picking a file-based dataset to save. Does not automatically append an extension if user does not specify one because, unlike Windows, on Unix it is common for files not to have extensions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vividsolutions.jump.workbench.datasource.FileDataSourceQueryChooser
FileDataSourceQueryChooser.FileChooserPanel
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILE_CHOOSER_PANEL_KEY
-
Constructor Summary
Constructors Constructor Description SaveFileDataSourceQueryChooser(Class dataSourceClass, String description, String[] extensions, WorkbenchContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<DataSourceQuery>
getDataSourceQueries()
protected FileDataSourceQueryChooser.FileChooserPanel
getFileChooserPanel()
File[]
getSelectedFiles()
selected files get the default (first) file extension appended if they do not carry a valid extension already, as save file chooser is supposed toboolean
isInputValid()
The user has pressed the OK button.-
Methods inherited from class com.vividsolutions.jump.workbench.datasource.FileDataSourceQueryChooser
addFileFilters, getComponent, getDataSourceClass, getDescription, getExtensions, getFileFilter, getSouthComponent1, getSouthComponent2, main, toDataSourceQueries, toDataSourceQuery, toProperties, toString
-
-
-
-
Field Detail
-
FILE_CHOOSER_PANEL_KEY
public static final String FILE_CHOOSER_PANEL_KEY
-
-
Constructor Detail
-
SaveFileDataSourceQueryChooser
public SaveFileDataSourceQueryChooser(Class dataSourceClass, String description, String[] extensions, WorkbenchContext context)
- Parameters:
extensions
- e.g. txt
-
-
Method Detail
-
getFileChooserPanel
protected FileDataSourceQueryChooser.FileChooserPanel getFileChooserPanel()
- Specified by:
getFileChooserPanel
in classFileDataSourceQueryChooser
-
getDataSourceQueries
public Collection<DataSourceQuery> getDataSourceQueries()
- Specified by:
getDataSourceQueries
in interfaceDataSourceQueryChooser
- Overrides:
getDataSourceQueries
in classFileDataSourceQueryChooser
-
getSelectedFiles
public File[] getSelectedFiles()
selected files get the default (first) file extension appended if they do not carry a valid extension already, as save file chooser is supposed to- Specified by:
getSelectedFiles
in classFileDataSourceQueryChooser
- Returns:
- array of file objects
-
isInputValid
public boolean isInputValid()
Description copied from interface:DataSourceQueryChooser
The user has pressed the OK button.- Specified by:
isInputValid
in interfaceDataSourceQueryChooser
- Overrides:
isInputValid
in classFileDataSourceQueryChooser
-
-