Class SwtUrlContext

    • Field Detail

      • baseUrl

        protected final URL baseUrl
        The base URL providing the HTML to be displayed in this context.
      • parentSwtContext

        protected final SWTContext parentSwtContext
        The parent SWT-context containing the Eclipse-Editor.
      • cleanup

        protected final Cleanup<RuntimeException> cleanup
        The clean-up for closing the parent context and the browser as post-mortem task for this instance.
    • Constructor Detail

      • SwtUrlContext

        public SwtUrlContext​(URL baseURL,
                             SWTContext parentSWTContext)
        Creates a new URL context based on the Eclipse-Browser-widget.
        Parameters:
        baseURL - The base URL providing the HTML to be displayed in the created context.
        parentSWTContext - The parent SWT-context containing the Eclipse-Editor.
    • Method Detail

      • createBrowser

        protected org.eclipse.swt.browser.Browser createBrowser​(SWTContext parent)
        Creates and initialises the browser with the base URL of this context.
      • close

        public void close()
        Description copied from interface: GUIContext
        Closes the GUI for this context. This method has to be called by the runtime manager whenever an application has terminated (finished, failed, aborted, killed,...).
        It must be possible to call this method more than once, even if the GUIContext has already shut down. This especially applies to the disposal of SWT-widgets, that is, it is allowed to call this method after the disposal of the corresponding widgets.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface GUIContext
      • getURL

        public URL getURL()
        Description copied from interface: URLContext
        Gets the URL of the (remote) HTMLContext which provides the GUI.
        Specified by:
        getURL in interface URLContext
        Returns:
        The URL of the (remote) HTMLContext which provides the GUI.