Class Browser
java.lang.Object
com.amalgamasimulation.desktop.html.ui.Browser
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
ConstructorsConstructorDescriptionBrowser(org.eclipse.swt.widgets.Composite parent) Constructs a new Browser instance embedded in the specified SWT Composite. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes of the browser component and releases any resources associated with it.voidOpens the current HTML content in the system's default web browser.voidsetContent(HTMLPage page) Sets the HTML content of the browser using the specified HTMLPage.
-
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
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.
-