org.gnu.gnome
Class Url

java.lang.Object
  |
  +--org.gnu.glib.Boxed
        |
        +--org.gnu.gnome.Url

public class Url
extends Boxed


Constructor Summary
Url()
           
 
Method Summary
static boolean show(java.lang.String url)
          This method displays the given URL in he appropriate viewer.
 
Methods inherited from class org.gnu.glib.Boxed
equals, getHandle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Url

public Url()
Method Detail

show

public static boolean show(java.lang.String url)
This method displays the given URL in he appropriate viewer. The appropriate viewer is user defined, according to these rules:

1. Extract the protocol from URL. This is defined as everything before the first colon

2. Check if the key /desktop/gnome/url-handlers/protocol-show exists in the gnome config database. If it does, use this as a command template. If it doesn't, check for the key /desktop/gnome/url-handlers/default-show, and if that doesn't exist fall back on the compiled in default.

3. Substitute the %s in the template with the URL.

4.Call GnomeExecute.shell, with the expanded command as the second argument.

Parameters:
url - The url.
Returns:
True if the url was shown. False if there was an error

Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net