package graphTool;

public class GraphDisplayThread implements Runnable
{
   GraphDisplayThread() {}
   
   public void run()
   {
      String os  = System.getProperty("os.name");
      String dir = System.getProperty("user.dir");
      
      if(os.equals("Linux"))
      {
         try
         {
            Runtime.getRuntime().exec("gthumb "+dir+"/*.png");
         } // end try
         catch(Throwable t)
         {
            System.out.println(t.getMessage());
         } // end catch(Throwable)
      } // end if
      else if(os.contains("Windows"))
      {
         try
         {
            // Windows doesn't like the *.png, so open to the directory
            Runtime.getRuntime().exec("rundll32.exe "+
            "C:\\WINDOWS\\System32\\shimgvw.dll,ImageView_Fullscreen "
            +dir);
         } // end try
         catch(Throwable t)
         {
            System.out.println(t.getMessage());
         } // end catch(Throwable)
      } // end else if
   } // end run()
} // end class
