java.lang.Object
com.amalgamasimulation.desktop.html.ui.Browser

public class Browser extends Object
The Browser class provides a web browser component that can be embedded into an SWT application. It uses JavaFX's WebView to render HTML content and allows opening the content in the system's default browser.
Author:
Alexey Glazyrin
  • Constructor Summary

    Constructors
    Constructor
    Description
    Browser(org.eclipse.swt.widgets.Composite parent)
    Constructs a new Browser instance embedded in the specified SWT Composite.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disposes of the browser component and releases any resources associated with it.
    void
    Opens the current HTML content in the system's default web browser.
    void
    Sets the HTML content of the browser using the specified HTMLPage.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Browser

      public Browser(org.eclipse.swt.widgets.Composite parent)
      Constructs a new Browser instance embedded in the specified SWT Composite.
      Parameters:
      parent - the parent SWT Composite to embed the browser in
  • Method Details

    • setContent

      public void setContent(HTMLPage page)
      Sets the HTML content of the browser using the specified HTMLPage.
      Parameters:
      page - the HTMLPage containing the content to display
    • openInSystemBrowser

      public void openInSystemBrowser()
      Opens the current HTML content in the system's default web browser.
    • dispose

      public void dispose()
      Disposes of the browser component and releases any resources associated with it.