org.vishia.gral.swt

## Class SwtFileDialog

- java.lang.Object
- - org.vishia.gral.swt.SwtFileDialog

- All Implemented Interfaces:
    GralFileDialog_ifc

      public class SwtFileDialog
      extends java.lang.Object
      implements GralFileDialog_ifc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private org.eclipse.swt.widgets.DirectoryDialog` | `dirDialog`
    `private org.eclipse.swt.widgets.FileDialog` | `fileDialog`
    `private org.eclipse.swt.widgets.Shell` | `shell`
    `private java.lang.String` | `sOpenResult`

    - ### Fields inherited from interface org.vishia.gral.ifc.GralFileDialog_ifc

      `directory, multi, version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwtFileDialog(org.eclipse.swt.widgets.Shell shell)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `getMultiSelection()`
    `java.lang.String` | `getSelection()` Returns the last selected local path and file.
    `boolean` | `open(java.lang.String sTitle, int mode)`
    `java.lang.String` | `show(java.lang.String sBaseDir, java.lang.String sLocalDir, java.lang.String sMask, java.lang.String sTitle)` Shows the file dialog.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### fileDialog

          private org.eclipse.swt.widgets.FileDialog fileDialog

    - #### dirDialog

          private org.eclipse.swt.widgets.DirectoryDialog dirDialog

    - #### shell

          private final org.eclipse.swt.widgets.Shell shell

    - #### sOpenResult

          private java.lang.String sOpenResult

  - ### Constructor Detail

    - #### SwtFileDialog

          public SwtFileDialog(org.eclipse.swt.widgets.Shell shell)

  - ### Method Detail

    - #### open

          public boolean open(java.lang.String sTitle,
                              int mode)

      Specified by:
        `open` in interface `GralFileDialog_ifc`

    - #### show

          public java.lang.String show(java.lang.String sBaseDir,
                                       java.lang.String sLocalDir,
                                       java.lang.String sMask,
                                       java.lang.String sTitle)

      Description copied from interface: `GralFileDialog_ifc`
      Shows the file dialog.
      Specified by:
        `show` in interface `GralFileDialog_ifc`
      Parameters:
        `sBaseDir` - Part of start path, which should not be leave in selection. May be null
        `sLocalDir` - 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.
      Returns:
        null if the selection was aborted.

    - #### getMultiSelection

          public java.lang.String[] getMultiSelection()

      Specified by:
        `getMultiSelection` in interface `GralFileDialog_ifc`

    - #### getSelection

          public java.lang.String getSelection()

      Description copied from interface: `GralFileDialog_ifc`
      Returns the last selected local path and file.
      Specified by:
        `getSelection` in interface `GralFileDialog_ifc`
      Returns:
        null if the last selection was aborted.