public class JBCefBrowser extends java.lang.Object implements JBCefDisposable
CefBrowser
.
Use getComponent()
as the browser's UI component.
Use loadURL(String)
or loadHTML(String)
for loading.
Disposable.Parent
Constructor and Description |
---|
JBCefBrowser()
Creates a browser with default
JBCefClient . |
JBCefBrowser(CefBrowser cefBrowser) |
JBCefBrowser(JBCefClient client,
java.lang.String url)
Creates a browser with the provided
JBCefClient and initial URL. |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
CefBrowser |
getCefBrowser() |
javax.swing.JComponent |
getComponent() |
protected static JBCefBrowser |
getJBCefBrowser(CefBrowser browser) |
JBCefClient |
getJBCefClient() |
boolean |
isDisposed() |
void |
loadHTML(java.lang.String html)
Loads html content.
|
void |
loadHTML(java.lang.String html,
java.lang.String url)
Loads html content.
|
void |
loadURL(java.lang.String url)
Loads URL.
|
public JBCefBrowser(JBCefClient client, java.lang.String url)
JBCefClient
and initial URL. The client's lifecycle is the responsibility of the caller.public JBCefBrowser(CefBrowser cefBrowser)
public JBCefBrowser()
JBCefClient
. The default client is disposed with this browser and may not be used with other browsers.public void loadURL(java.lang.String url)
public void loadHTML(java.lang.String html, java.lang.String url)
html
- content to loadurl
- a dummy URL that may affect restriction policy applied to the contentpublic void loadHTML(java.lang.String html)
public javax.swing.JComponent getComponent()
public CefBrowser getCefBrowser()
public JBCefClient getJBCefClient()
public void dispose()
Disposable
dispose
in interface Disposable
public boolean isDisposed()
isDisposed
in interface JBCefDisposable
protected static JBCefBrowser getJBCefBrowser(CefBrowser browser)