public abstract class Show extends Object
Modifier and Type | Method and Description |
---|---|
abstract void |
execute(Runnable command)
Executes a runnable on "UI thread".
|
abstract JSC |
jsc()
Access to JavaScriptCore API of the browser window.
|
abstract com.sun.jna.Pointer |
jsContext()
Access to JavaScriptCore context.
|
static Show |
open(Fn.Presenter presenter,
Runnable onPageLoad,
Runnable onContext,
boolean headless)
Initializes native browser window.
|
static void |
show(String impl,
URI page)
Shows a page in a browser.
|
abstract void |
show(URI page)
Loads a page into the browser window.
|
public static void show(String impl, URI page) throws IOException
impl
- the name of implementation to use, can be null
page
- the page URLIOException
- if something goes wrongpublic static Show open(Fn.Presenter presenter, Runnable onPageLoad, Runnable onContext, boolean headless)
presenter
- the presenter that will be using the returned valueonPageLoad
- callback when page finishes loadingonContext
- callback when Show.jsContext()
becomes availableheadless
- should the window appear on the monitor or not?
useful for testingpublic abstract void show(URI page) throws IOException
page
- the URL to loadIOException
- if something goes wrongpublic abstract JSC jsc()
null
if not supported
for this browserpublic abstract com.sun.jna.Pointer jsContext()
null
if not supported or not
yet availablepublic abstract void execute(Runnable command)
command
- runnable to executeCopyright © 2021 The Apache Software Foundation. All rights reserved.