////////////////////////////////////////////////////////////////////////////////
//																			  //
// AUTHOR:      Tevfik Metin Sezgin	                        				  //
//				Massachusetts Institute of Technology						  //
//				Department of Electrical Engineering and Computer Science	  //
//				Artificial Intelligence Laboratory							  //
//																			  //
// E-MAIL:		mtsezgin@ai.mit.edu, mtsezgin@mit.edu						  //
//																			  //
// COPYRIGHT:   Tevfik Metin Sezgin                    						  //
//              All rights reserved. This code can not be copied, modified,   //
//              or distributed in whole or partially without the written 	  //
//				permission of the author. Also see the COPYRIGHT file.		  //
//																			  //
////////////////////////////////////////////////////////////////////////////////

/** 
  * 
  * See the end of the file for the log of changes.
  * 
  * $Author: mtsezgin $
  * $Date: 2000/06/10 19:19:34 $   
  * $Revision: 1.5 $
  * $Headers$
  * $Id: VisiPad.java,v 1.5 2000/06/10 19:19:34 mtsezgin Exp $     
  * $Name:  $   
  * $Locker:  $
  * $Source: /mit/mtsezgin/CVS/Repository/REC/VisiPad.java,v $
  *  
  **/

public class
VisiPad
{
    // The main tablet to be used.
    static Tablet tablet; 
    
    public static void
    main( String args[] )
    {
        boolean platform_is_windows;	
        boolean platform_is_windowsNT;	

        double  scale               = Double.valueOf( args[0] ).doubleValue();
        double  avgscale            = Double.valueOf( args[1] ).doubleValue();
        String  cursor_image_name   = args[2];
        boolean debug               = Boolean.valueOf( args[3] ).booleanValue();

		String platform = System.getProperty( "os.name" );
		
		System.out.println( "Platform is " + platform );
		if ( platform.indexOf( "9" ) != -1 ) {
		        System.out.println( "Using native code!" );
			platform_is_windows = true;
		} else {
		        System.out.println( "Using jdk code!" );
			platform_is_windows = false;
		}

		if ( platform.indexOf( "NT" ) != -1 ) {
		        System.out.println( "Using orthogonal distance regression!" );
			platform_is_windowsNT = true;
		} else {
		        System.out.println( "Using simple method for direction!" );
			platform_is_windowsNT = false;
		}


        tablet = new Tablet( 1000, 
							 avgscale, 
							 cursor_image_name, 
							 platform_is_windows,
							 platform_is_windowsNT );

        tablet.setDebugging( debug );
        tablet.setLocation( 50, 50 );
        tablet.setSize( 350, 250 );
        tablet.setVisible( true );
    }
}

/** 
  * 
  * $Log: VisiPad.java,v $
  * Revision 1.5  2000/06/10 19:19:34  mtsezgin
  *
  * Now the platform detection is done automatically. The same script
  * should work in all platforms.
  *
  * Revision 1.4  2000/06/03 01:52:36  mtsezgin
  * *** empty log message ***
  *
  * Revision 1.3  2000/06/02 21:11:16  mtsezgin
  * *** empty log message ***
  *
  * Revision 1.2  2000/05/07 17:27:58  mtsezgin
  * *** empty log message ***
  *
  * Revision 1.1.1.1  2000/04/01 03:07:07  mtsezgin
  * Imported sources
  *
  * Revision 1.2  2000/03/31 22:41:05  mtsezgin
  *
  * Started Log tracking.
  *
  *  
  **/
