Class FileOutputStreamProvider
java.lang.Object
org.eclipse.nebula.widgets.nattable.export.FileOutputStreamProvider
- All Implemented Interfaces:
IOutputStreamProvider
Implementation of IOutputStreamProvider that will open a
FileDialog
on requesting an OutputStream, to let a user specify the location to write a
file.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileOutputStreamProvider(String defaultFileName, String[] defaultFilterNames, String[] defaultFilterExtensions) -
Method Summary
Modifier and TypeMethodDescriptionintExtension filter index is >= 0 if there is a selected one in the file dialog.getOutputStream(org.eclipse.swt.widgets.Shell shell) Opens aFileDialogto let a user choose the location to write the export to, and returns the correspondingPrintStreamto that file.
-
Field Details
-
defaultFileName
-
defaultFilterNames
-
defaultFilterExtensions
-
currentFileName
-
extFilterIndex
protected int extFilterIndex- Since:
- 1.5
-
-
Constructor Details
-
FileOutputStreamProvider
-
-
Method Details
-
getOutputStream
Opens aFileDialogto let a user choose the location to write the export to, and returns the correspondingPrintStreamto that file.- Specified by:
getOutputStreamin interfaceIOutputStreamProvider- Parameters:
shell- The current active Shell. Needed to add support for user interactions on specifying the OutputStream for example by opening a dialog.- Returns:
- The OutputStream to perform write operations to.
-
getResult
- Specified by:
getResultin interfaceIOutputStreamProvider- Returns:
- The result that is produced by this IOutputStreamProvider. Usually this is the place where the OutputStream that is produced by this provider is pointing to (e.g. the file to which the OutputStream points to).
-
getExtensionFilterIndex
public int getExtensionFilterIndex()Extension filter index is >= 0 if there is a selected one in the file dialog. Extension filter index is equal -1 if the file dialog is not opened or no extension is selected.- Returns:
- The extension filter index selected in the
FileDialog. - Since:
- 1.5
-