com.ochafik.util
Class SystemUtils

java.lang.Object
  extended by com.ochafik.util.SystemUtils

public class SystemUtils
extends Object


Constructor Summary
SystemUtils()
           
 
Method Summary
static boolean addOpenOpenWithShowDirPopupPanel(File file, JComponent component)
           
static JComponent createFileShowAndOpenWithPanel(File file)
           
static JPopupMenu createOpenOpenWithShowDirPopupPanel(File file)
           
static boolean hasUnixCommand(String name)
           
static boolean isLinux()
           
static boolean isMacOSX()
           
static boolean isPopupTrigger(MouseEvent e)
           
static boolean isSolaris()
           
static boolean isUnix()
           
static boolean isWindows()
           
static void runImageEditor(File imageFile)
           
static void runSystemCommand(String cmd)
           
static void runSystemCommand(String[] cmd)
           
static void runSystemOpenDirectory(File file)
           
static void runSystemOpenFile(File fileToOpen)
           
static void runSystemOpenFileParent(File fileToShow)
           
static void runSystemOpenFileWith(File fileToOpen)
           
static void runSystemOpenURL(URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemUtils

public SystemUtils()
Method Detail

runSystemCommand

public static final void runSystemCommand(String[] cmd)
                                   throws NoSuchMethodException
Throws:
NoSuchMethodException

runSystemCommand

public static final void runSystemCommand(String cmd)
                                   throws NoSuchMethodException
Throws:
NoSuchMethodException

isMacOSX

public static boolean isMacOSX()

isWindows

public static boolean isWindows()

isLinux

public static boolean isLinux()

isSolaris

public static boolean isSolaris()

isUnix

public static boolean isUnix()

runSystemOpenURL

public static final void runSystemOpenURL(URL url)
                                   throws NoSuchMethodException,
                                          IOException
Throws:
NoSuchMethodException
IOException

hasUnixCommand

public static final boolean hasUnixCommand(String name)

runSystemOpenFileWith

public static final void runSystemOpenFileWith(File fileToOpen)
                                        throws NoSuchMethodException,
                                               IOException
Throws:
NoSuchMethodException
IOException

runSystemOpenFile

public static final void runSystemOpenFile(File fileToOpen)
                                    throws NoSuchMethodException,
                                           IOException
Throws:
NoSuchMethodException
IOException

runSystemOpenDirectory

public static final void runSystemOpenDirectory(File file)
                                         throws NoSuchMethodException,
                                                IOException
Throws:
NoSuchMethodException
IOException

runImageEditor

public static final void runImageEditor(File imageFile)
                                 throws NoSuchMethodException,
                                        IOException
Throws:
NoSuchMethodException
IOException

runSystemOpenFileParent

public static final void runSystemOpenFileParent(File fileToShow)
                                          throws NoSuchMethodException,
                                                 IOException
Throws:
NoSuchMethodException
IOException

createFileShowAndOpenWithPanel

public static final JComponent createFileShowAndOpenWithPanel(File file)

createOpenOpenWithShowDirPopupPanel

public static final JPopupMenu createOpenOpenWithShowDirPopupPanel(File file)

addOpenOpenWithShowDirPopupPanel

public static final boolean addOpenOpenWithShowDirPopupPanel(File file,
                                                             JComponent component)

isPopupTrigger

public static boolean isPopupTrigger(MouseEvent e)


Copyright © 2009. All Rights Reserved.