001         package com.croftsoft.apps.tag3d;
002    
003         /*********************************************************************
004         *
005         * Tag3D main application class.
006         *
007         * @author
008         *   <A HREF="http://www.alumni.caltech.edu/~croft/">David W. Croft</A>
009         * @version
010         *   1999-02-07
011         *********************************************************************/
012    
013         public final class  Tag3D implements Tag3DConstants
014         //////////////////////////////////////////////////////////////////////
015         //////////////////////////////////////////////////////////////////////
016         {
017    
018         public static void  main ( String [ ]  args )
019         //////////////////////////////////////////////////////////////////////
020         {
021           if ( System.getSecurityManager ( ) == null )
022           {
023             System.setSecurityManager ( new Tag3DSecurityManager ( ) );
024           }
025    
026           Tag3DWorld  tag3DWorld = Tag3DWorld.build ( );
027    
028           String  id = ( args.length > 0 ? args [ 0 ] : DEFAULT_ID );
029    
030           Tag3DStateManager  tag3DStateManager
031             = new Tag3DStateManager ( tag3DWorld, id );
032    
033           tag3DWorld.canvas3D.addKeyListener (
034             new Tag3DKeyListener (
035               DELTA_ROTATION,
036               DELTA_TRANSLATION,
037               id,
038               tag3DStateManager,
039               tag3DWorld.viewTransformGroup ) );
040    
041           new Tag3DFrame ( 0, 0, 256, 256, id, tag3DWorld.canvas3D ).show ( );
042    
043           if ( args.length > 1 ) tag3DStateManager.setupRemote ( args [ 1 ] );
044         }
045    
046         //////////////////////////////////////////////////////////////////////
047         //////////////////////////////////////////////////////////////////////
048         }