|
||||||||||
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(java.applet.Applet pApplet)
Creates a new instance of JSBridge for an applet. |
Method Summary | |
---|---|
java.lang.Object |
call(java.lang.String pMethod,
java.lang.Object... pParams)
Calls a javascript method. |
void |
close()
Closes the window. |
java.lang.Object |
get(java.lang.String pMember)
Retrieves a named member of a JavaScript object. |
java.lang.String |
getCookie(java.lang.String pName)
Gets the value of a cookie. |
java.lang.Object |
getIntern(java.lang.Object pObject,
java.lang.String pMember)
Retrieves a named member of a JavaScript object. |
java.lang.String |
getLocation()
Gets the current location. |
java.lang.String |
getTitle()
Gets the current window title. |
void |
openWindow(java.lang.String pURL,
java.lang.String pTarget,
int iX,
int iY,
int iWidth,
int iHeight,
boolean pCenter)
Opens a new browser window. |
void |
requestFocus()
Requests the focus. |
void |
set(java.lang.String pMember,
java.lang.Object pValue)
Sets a named member of a JavaScript object. |
void |
setCookie(java.lang.String pName,
java.lang.String pValue,
long pSecondsValid)
Sets the value for a cookie. |
void |
setLocation(java.lang.String pLocation)
Sets the location. |
void |
setTitle(java.lang.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(java.applet.Applet pApplet) throws java.lang.Throwable
JSBridge
for an applet.
pApplet
- the applet
java.lang.Throwable
- if it's not possible to detect the window object of the appletMethod Detail |
---|
public void setTitle(java.lang.String pTitle) throws java.lang.Throwable
pTitle
- the title
java.lang.Throwable
- if the access to the document object failspublic java.lang.String getTitle() throws java.lang.Throwable
java.lang.Throwable
- if the access to the document object failspublic void setLocation(java.lang.String pLocation) throws java.lang.Throwable
pLocation
- the location
java.lang.Throwable
- if the access to the location object failspublic java.lang.String getLocation() throws java.lang.Throwable
java.lang.Throwable
- if the access to the location object failspublic void close() throws java.lang.Throwable
java.lang.Throwable
- if the close operation failspublic void requestFocus() throws java.lang.Throwable
java.lang.Throwable
- if the focus can't be setpublic void openWindow(java.lang.String pURL, java.lang.String pTarget, int iX, int iY, int iWidth, int iHeight, boolean pCenter) throws java.lang.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)
java.lang.Throwable
- if it's not possible to open the windowpublic java.lang.Object call(java.lang.String pMethod, java.lang.Object... pParams) throws java.lang.Throwable
pMethod
- the method namepParams
- the parameters
null
if the method doesn't return a value
java.lang.Throwable
- if the method is not available or the call failedpublic void set(java.lang.String pMember, java.lang.Object pValue) throws java.lang.Throwable
pMember
- the member namepValue
- the value for the member
java.lang.Throwable
- if the member or the parent object is not availablepublic java.lang.Object get(java.lang.String pMember) throws java.lang.Throwable
pMember
- the member name
java.lang.Throwable
- if the member is or the parent object is not availablepublic java.lang.Object getIntern(java.lang.Object pObject, java.lang.String pMember) throws java.lang.Throwable
pObject
- the object from which the method should be calledpMember
- the member name
java.lang.Throwable
- if the member is or the parent object is not availablepublic void setCookie(java.lang.String pName, java.lang.String pValue, long pSecondsValid) throws java.lang.Throwable
pName
- the cookie namepValue
- the value to setpSecondsValid
- sets the maximum age of the cookie in seconds
java.lang.Throwable
- if the cookie can not be setpublic java.lang.String getCookie(java.lang.String pName) throws java.lang.Throwable
pName
- the cookie name
null
if the cookie is not available
java.lang.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 |