Interface SWTBrowserContext

All Superinterfaces:
AutoCloseable, Closeable, GUIContext, SWTContext

public interface SWTBrowserContext extends SWTContext
The SWTBrowserContext provides a SWTContext and allows to deploy content for downloading either as local file or as download from a webservice. This allows for instance to display a PDF-file directly in a Browser widget that may be embedded in a normal SWT-context. The advantage of this is the support from a rich client environment as well as a web client environment: The rich client provides a local file URL, in case of a web client, the corresponding web server deploys the designated content internally and provides a publicly available URL for download.
  • Method Details

    • deployForDownload

      @Deprecated(since="13.0.0", forRemoval=true) default URL deployForDownload(UDTValue content, String filePrefix, String fileSuffix)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Provides the contents of the designated UDT-value as a file for download and returns the URL (including the filename) which allows to download the file.
      Parameters:
      content - The content for the file to be provided as download. The caller is responsible for closing.
      filePrefix - The simple file prefix of the file. If it is null, a random UUID is created.
      fileSuffix - the file extension to provide the designated content.
      Returns:
      The URI that allows to download the designated content with the designated file name.
    • deployForDownload

      URL deployForDownload(InputStream content, String filePrefix, String fileSuffix)
      Provides the contents of the designated InputStream as a file for download and returns the URL (including the filename) which allows to download the file.
      Parameters:
      content - The content for the file to be provided as download. The stream will be closed after the creation.
      filePrefix - The simple file prefix of the file. If it is null, a random UUID is created.
      fileSuffix - the file extension to provide the designated content.
      Returns:
      The URI that allows to download the designated content with the designated file name.