|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.ui.swing.impl.JSBridge
public class JSBridge
The JSBridge
encapsulates the access to javascript functions. It's only
possible to access javascript in a web browser. The constructor will throw an exception
if it's not possible to access the javascript engine.
Constructor Summary | |
---|---|
JSBridge(Applet pApplet)
Creates a new instance of JSBridge for an applet. |
Method Summary | |
---|---|
Object |
call(String pMethod,
Object... pParams)
Calls a javascript method. |
void |
close()
Closes the window. |
Object |
get(String pMember)
Retrieves a named member of a JavaScript object. |
String |
getCookie(String pName)
Gets the value of a cookie. |
Object |
getIntern(Object pObject,
String pMember)
Retrieves a named member of a JavaScript object. |
String |
getLocation()
Gets the current location. |
String |
getTitle()
Gets the current window title. |
void |
openWindow(String pURL,
String pTarget,
int iX,
int iY,
int iWidth,
int iHeight,
boolean pCenter)
Opens a new browser window. |
void |
requestFocus()
Requests the focus. |
void |
set(String pMember,
Object pValue)
Sets a named member of a JavaScript object. |
void |
setCookie(String pName,
String pValue,
long pSecondsValid)
Sets the value for a cookie. |
void |
setLocation(String pLocation)
Sets the location. |
void |
setTitle(String pTitle)
Sets the window title. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSBridge(Applet pApplet) throws Throwable
JSBridge
for an applet.
pApplet
- the applet
Throwable
- if it's not possible to detect the window object of the appletMethod Detail |
---|
public void setTitle(String pTitle) throws Throwable
pTitle
- the title
Throwable
- if the access to the document object failspublic String getTitle() throws Throwable
Throwable
- if the access to the document object failspublic void setLocation(String pLocation) throws Throwable
pLocation
- the location
Throwable
- if the access to the location object failspublic String getLocation() throws Throwable
Throwable
- if the access to the location object failspublic void close() throws Throwable
Throwable
- if the close operation failspublic void requestFocus() throws Throwable
Throwable
- if the focus can't be setpublic void openWindow(String pURL, String pTarget, int iX, int iY, int iWidth, int iHeight, boolean pCenter) throws Throwable
pURL
- the url for the windowpTarget
- the target nameiX
- the x location on screeniY
- the y location on screeniWidth
- the window widthiHeight
- the window heightpCenter
- true
to center the window (only used if height or width are defined)
Throwable
- if it's not possible to open the windowpublic Object call(String pMethod, Object... pParams) throws Throwable
pMethod
- the method namepParams
- the parameters
null
if the method doesn't return a value
Throwable
- if the method is not available or the call failedpublic void set(String pMember, Object pValue) throws Throwable
pMember
- the member namepValue
- the value for the member
Throwable
- if the member or the parent object is not availablepublic Object get(String pMember) throws Throwable
pMember
- the member name
Throwable
- if the member is or the parent object is not availablepublic Object getIntern(Object pObject, String pMember) throws Throwable
pObject
- the object from which the method should be calledpMember
- the member name
Throwable
- if the member is or the parent object is not availablepublic void setCookie(String pName, String pValue, long pSecondsValid) throws Throwable
pName
- the cookie namepValue
- the value to setpSecondsValid
- sets the maximum age of the cookie in seconds
Throwable
- if the cookie can not be setpublic String getCookie(String pName) throws Throwable
pName
- the cookie name
null
if the cookie is not available
Throwable
- if it's not possible to access the cookie list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |