info.aduna.platform.desktop.support
Class PosixGnomeDesktop

java.lang.Object
  extended by info.aduna.platform.desktop.DesktopBase
      extended by info.aduna.platform.desktop.support.PosixDesktop
          extended by info.aduna.platform.desktop.support.PosixGnomeDesktop
All Implemented Interfaces:
Desktop

public class PosixGnomeDesktop
extends PosixDesktop

Platform implementation for gnome environments under UNIX.


Field Summary
 
Fields inherited from class info.aduna.platform.desktop.support.PosixDesktop
EXECUTABLE_EXTENSIONS
 
Constructor Summary
PosixGnomeDesktop(Platform platform)
          Constructor, which goes to work and parses the various gnome config files.
 
Method Summary
 String getCommandForMimeType(String mimeType)
          Looks up the command for the given mimetype, as read from the gnome configuration files.
protected  String getDefaultApplication(String resource)
          Tries to return the default executable for the given resource by reading the gnome configuration files.
protected  int gnomeOpen(String resource, boolean forceGnomeOpen)
           
 int openResource(String resource)
          Runs "gnome-open" if it exists, otherwise uses parent class implementation, that invokes "getDefaultApplication" in this class.
 
Methods inherited from class info.aduna.platform.desktop.support.PosixDesktop
isExecutable, openResource
 
Methods inherited from class info.aduna.platform.desktop.DesktopBase
getPlatform, isExecutable, warnsWhenOpeningExecutable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PosixGnomeDesktop

public PosixGnomeDesktop(Platform platform)
Constructor, which goes to work and parses the various gnome config files.

Method Detail

openResource

public int openResource(String resource)
                 throws IOException
Runs "gnome-open" if it exists, otherwise uses parent class implementation, that invokes "getDefaultApplication" in this class.

Specified by:
openResource in interface Desktop
Overrides:
openResource in class PosixDesktop
Returns:
exit code of the external process
Throws:
IOException - when an I/O error occurs.

gnomeOpen

protected int gnomeOpen(String resource,
                        boolean forceGnomeOpen)
                 throws IOException
Throws:
IOException

getDefaultApplication

protected String getDefaultApplication(String resource)
Tries to return the default executable for the given resource by reading the gnome configuration files.

Overrides:
getDefaultApplication in class PosixDesktop

getCommandForMimeType

public String getCommandForMimeType(String mimeType)
Looks up the command for the given mimetype, as read from the gnome configuration files.



Copyright © 1997-2008 Aduna. All Rights Reserved.