|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
public interface BrowserControl
AR Service: Control the desktop webbrowser. Trivial interface to display a URL in the desktop's webbrowser.
Example of use| Method Summary | |
|---|---|
void |
openRelative(String relativeURL)
Display a page from the internal AR webserver in the system webbrowser |
void |
openURL(URL url)
Display a page in the system webbrowser. |
| Method Detail |
|---|
void openURL(URL url)
throws ACRException
Python Example
# connect to the AR
from xmlrpclib import Server
from os.path import expanduser
ar = Server(file(expanduser('~/.astrogrid-desktop')).next().strip() +'xmlrpc')
#call this function
ar.system.browser.openURL('http://www.ivoa.net')
Java Example
// connect to the AR
ACR ar = new Finder().find();
// find this component
BrowserControl bc = (BrowserControl) ar.getService(BrowserControl.class);
// call this function
bc.openURL(new URL("http://www.ivoa.net"));
url - URL of the resource to display
ACRException - if the system webbrowser cannot be launched. Will not throw if after launch the webbrowser then fails to
display the page
void openRelative(String relativeURL)
throws ACRException,
InvalidArgumentException
relativeURL - relative url from root of AR webserver contextWebServer.getUrlRoot()
ACRException - if the system webbrowser cannot be launched. Will not throw if the webbrowser then fails to
display the page
InvalidArgumentException - if valid URL can't be build from parameter relativeURL
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||