org.jopendocument.util
Class DesktopEnvironment

java.lang.Object
  extended by org.jopendocument.util.DesktopEnvironment
Direct Known Subclasses:
DesktopEnvironment.Gnome, DesktopEnvironment.KDE, DesktopEnvironment.Mac, DesktopEnvironment.Unknown, DesktopEnvironment.Windows, DesktopEnvironment.XFCE

public abstract class DesktopEnvironment
extends Object

A desktop environment like Gnome or MacOS.

Author:
Sylvain CUAZ
See Also:
getDE()

Nested Class Summary
static class DesktopEnvironment.Gnome
           
static class DesktopEnvironment.KDE
           
static class DesktopEnvironment.Mac
           
static class DesktopEnvironment.Unknown
           
static class DesktopEnvironment.Windows
           
static class DesktopEnvironment.XFCE
           
 
Method Summary
static String cmdSubstitution(Process p)
           
protected abstract  String findVersion()
           
static DesktopEnvironment getDE()
           
 File getDocumentsFolder()
           
 File getPreferencesFolder(String appName)
           
 String getVersion()
           
static void main(String[] args)
           
 String quoteParamForExec(String s)
           
static void resetDE()
           
static boolean test(String... command)
          Execute the passed command and test its return code.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

test

public static final boolean test(String... command)
                          throws RTInterruptedException
Execute the passed command and test its return code.

Parameters:
command - the command to execute.
Returns:
false if the return code is not 0 or an exception is thrown.
Throws:
RTInterruptedException - if this is interrupted while waiting.

cmdSubstitution

public static final String cmdSubstitution(Process p)
                                    throws IOException
Throws:
IOException

getDE

public static final DesktopEnvironment getDE()

resetDE

public static final void resetDE()

findVersion

protected abstract String findVersion()

getVersion

public final String getVersion()

getDocumentsFolder

public File getDocumentsFolder()

getPreferencesFolder

public File getPreferencesFolder(String appName)

quoteParamForExec

public String quoteParamForExec(String s)

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)


Copyright © 2010 jOpenDocument All Rights Reserved.