eff5334507721f4e1cd74ce7d0fd5388017fc7d2
[jalview.git] / src / jalview / bin / JalviewJS2.java
1 package jalview.bin;
2
3 import java.awt.event.ActionEvent;
4 import java.awt.event.ActionListener;
5
6 import javax.swing.Timer;
7
8 /**
9  * Entry point for JalviewJS development. 
10  * 
11  * 
12  * 
13  * @author RM
14  *
15  */
16 public class JalviewJS2
17 {
18
19   static {
20     /**
21      * --j2sNative
22      * 
23      *            thisApplet.__Info.args =
24      *            ["open","examples/uniref50.fa","features",
25      *            "examples/exampleFeatures.txt"];
26      */
27
28           
29             /**
30              * @j2sNative
31              * 
32              *            thisApplet.__Info.args =
33              *            ["open","examples/jaxbtest.jvx"];
34              */
35
36   }
37
38   public static void main(String[] args) throws Exception
39   {
40     Jalview.main(args);
41         showFocusTimer();
42 }
43
44 protected static int focusTime = 0;
45
46 private static void showFocusTimer() {
47         
48         Timer t = new Timer(100, new ActionListener() {
49
50                 @Override
51                 public void actionPerformed(ActionEvent e) {
52                         String s = /** @j2sNative document.activeElement.id || */
53                                         null;
54
55                         s += " " + (++focusTime);
56
57                         /** @j2sNative document.title = s; */
58                 }
59
60         });
61
62         t.setRepeats(true);
63         if (/** @j2sNative true || */
64         false)
65                 t.start();
66   }
67
68
69 }