APIdia Launch Partner
Top Description Fields Constructors Methods
sun.awt.X11

public final Class XDesktopPeer

extends Object
implements DesktopPeer
Class Inheritance
All Implemented Interfaces
java.awt.peer.DesktopPeer
Imports
sun.awt.UNIXToolkit, java.io.File, .IOException, java.net.MalformedURLException, .URI, java.awt.Desktop.Action, java.awt.peer.DesktopPeer, java.util.ArrayList, .Arrays, .List

Concrete implementation of the interface DesktopPeer for the Gnome desktop on Linux and Unix platforms.
See Also
DesktopPeer

Field Summary

Modifier and TypeField and Description
private static boolean
private static boolean
private static final List<Desktop.Action>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
browse(URI uri)

Implements java.awt.peer.DesktopPeer.browse.

Launches the user default browser to display the given URI.

public void
edit(File file)

Implements java.awt.peer.DesktopPeer.edit.

Launches the associated editor and opens the given file for editing.

private native boolean
gnome_url_show(byte[] url)

private static native boolean
init(int gtkVersion, boolean verbose)

private static void
pack-priv static boolean
public boolean
isSupported(Desktop.Action type)

Implements java.awt.peer.DesktopPeer.isSupported.

Returns whether the given action is supported on the current platform.

private void
launch(URI uri)

public void
mail(URI uri)

Implements java.awt.peer.DesktopPeer.mail.

Launches the mail composing window of the user default mail client, filling the message fields including to, cc, etc, with the values specified by the given mailto URL.

public void
open(File file)

Implements java.awt.peer.DesktopPeer.open.

Launches the associated application to open the given file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

initExecutedback to summary
private static boolean initExecuted
nativeLibraryLoadedback to summary
private static boolean nativeLibraryLoaded
supportedActionsback to summary
private static final List<Desktop.Action> supportedActions

Constructor Detail

XDesktopPeerback to summary
pack-priv XDesktopPeer()

Method Detail

browseback to summary
public void browse(URI uri) throws IOException

Implements java.awt.peer.DesktopPeer.browse.

Doc from java.awt.peer.DesktopPeer.browse.

Launches the user default browser to display the given URI.

Annotations
@Override
Exceptions
IOException:
If the user default browser is not found, or it fails to be launched.
editback to summary
public void edit(File file) throws IOException

Implements java.awt.peer.DesktopPeer.edit.

Doc from java.awt.peer.DesktopPeer.edit.

Launches the associated editor and opens the given file for editing. The associated editor is registered to be the default editor for the file type of the given file.

Annotations
@Override
Exceptions
IOException:
If the given file has no associated editor, or the associated application fails to be launched.
gnome_url_showback to summary
private native boolean gnome_url_show(byte[] url)
initback to summary
private static native boolean init(int gtkVersion, boolean verbose)
initWithLockback to summary
private static void initWithLock()
isDesktopSupportedback to summary
pack-priv static boolean isDesktopSupported()
isSupportedback to summary
public boolean isSupported(Desktop.Action type)

Implements java.awt.peer.DesktopPeer.isSupported.

Doc from java.awt.peer.DesktopPeer.isSupported.

Returns whether the given action is supported on the current platform.

Annotations
@Override
launchback to summary
private void launch(URI uri) throws IOException
mailback to summary
public void mail(URI uri) throws IOException

Implements java.awt.peer.DesktopPeer.mail.

Doc from java.awt.peer.DesktopPeer.mail.

Launches the mail composing window of the user default mail client, filling the message fields including to, cc, etc, with the values specified by the given mailto URL.

Annotations
@Override
Exceptions
IOException:
If the user default mail client is not found, or it fails to be launched.
openback to summary
public void open(File file) throws IOException

Implements java.awt.peer.DesktopPeer.open.

Doc from java.awt.peer.DesktopPeer.open.

Launches the associated application to open the given file. The associated application is registered to be the default file viewer for the file type of the given file.

Annotations
@Override
Exceptions
IOException:
If the given file has no associated application, or the associated application fails to be launched.