chrriis.dj.nativeswing.swtimpl
Class WebBrowserObject
java.lang.Object
chrriis.dj.nativeswing.swtimpl.WebBrowserObject
public abstract class WebBrowserObject
- extends Object
A helper class to simplify the development of native components that leverage a web browser plugin (like the JFlashPlayer).
- Author:
- Christopher Deckers
|
Method Summary |
protected void |
finalize()
|
static String |
getEmbeddedObjectJavascriptName()
|
protected String |
getJavascriptDefinitions()
|
String |
getLoadedResource()
|
String |
getLocalFileURL(File localFile)
|
protected abstract WebBrowserObject.ObjectHTMLConfiguration |
getObjectHtmlConfiguration()
|
Object |
getObjectProperty(String property)
|
protected static WebServer.WebServerContent |
getWebServerContent(WebServer.HTTPRequest httpRequest)
|
boolean |
hasContent()
|
void |
invokeObjectFunction(String functionName,
Object... args)
Invoke a function on the object, with optional arguments (Strings, numbers, booleans, or array). |
Object |
invokeObjectFunctionWithResult(String functionName,
Object... args)
Invoke a function on the object and waits for a result, with optional arguments (Strings, numbers, booleans, or array). |
void |
load(String resourcePath)
|
void |
setObjectProperty(String property,
Object value)
Set the value of a property of the object (a String, number, boolean, or array). |
WebBrowserObject
public WebBrowserObject(JWebBrowser webBrowser)
getLoadedResource
public String getLoadedResource()
hasContent
public boolean hasContent()
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
load
public void load(String resourcePath)
getLocalFileURL
public String getLocalFileURL(File localFile)
getEmbeddedObjectJavascriptName
public static String getEmbeddedObjectJavascriptName()
getWebServerContent
protected static WebServer.WebServerContent getWebServerContent(WebServer.HTTPRequest httpRequest)
getObjectHtmlConfiguration
protected abstract WebBrowserObject.ObjectHTMLConfiguration getObjectHtmlConfiguration()
getJavascriptDefinitions
protected String getJavascriptDefinitions()
setObjectProperty
public void setObjectProperty(String property,
Object value)
- Set the value of a property of the object (a String, number, boolean, or array).
getObjectProperty
public Object getObjectProperty(String property)
- Returns:
- The value, potentially a String, Number, boolean.
invokeObjectFunction
public void invokeObjectFunction(String functionName,
Object... args)
- Invoke a function on the object, with optional arguments (Strings, numbers, booleans, or array).
invokeObjectFunctionWithResult
public Object invokeObjectFunctionWithResult(String functionName,
Object... args)
- Invoke a function on the object and waits for a result, with optional arguments (Strings, numbers, booleans, or array).
- Returns:
- The value, potentially a String, Number, boolean.