32f0ad6588e8d23643a2afecefeb1b5559b7b7d8
[jalview.git] / src2 / fr / orsay / lri / varna / README_SWINGJS.txt
1
2 Status
3 ======
4
5 7/3/2018
6
7 VARNA is running in Jalview in a browser. 
8
9 The only capability not enabled is the "duplicate" menu item. 
10 This is because SwingJS does not implement serialization.
11  
12 1/10/2018
13
14 fixes VueUI handling of JFileChooser and JColorChooser callbacks not using revised SelectedFile and SelectedColor property names
15 implements blinking iterator when dragging to reposition RNA blob
16 implements annotations 
17
18 1/7/2018
19
20 JTable implemented, including editing; needs better efficiency 
21 Modal dialogs are working, including file open.
22 Drag-and-drop of Files is working 
23  - note that the dropped File object has bytes field with data
24 Animated interpolation working; switched to simple JTimer mechanism for Java and JavaScript
25
26 1/2/2018
27
28 Varna is running.
29 modal JOptionPane implemented fully
30 JColorChooser implemented fully
31 JTable implemented; still some minor issues
32  
33
34 Modal dialogs are working, except for FileOpen.
35 Popup menu is working.
36
37
38 Issues
39 ======
40
41 - JTable has minor issues:
42  - Headings are not shaded
43  - needs attention to higher efficiency 
44
45 - DnD only implemented for files. 
46   - probably x,y coord are off - untested
47   - needs checking for isolated frames (works in applet)
48   
49
50 Modifications for SwingJS
51 =========================
52
53 Search for "@j2sNative", "BH", or "SwingJS"
54
55
56 VARNA.java 
57 ----------
58
59 moved to fr.orsay.lri.varna (all SwingJS project files must be in packages)
60
61 adds default RNA JavaScript:
62
63           if (!thisApplet.__Info.sequenceDBN) {
64            thisApplet.__Info.sequenceDBN = "GGGGCCAAUAUGGCCAUCC";
65            thisApplet.__Info.structureDBN = "((((((.....))))..))";
66            thisApplet.__Info.title = prompt("Title?","Hello RNA world, from SwingJS!");
67           } 
68
69
70
71 fr.orsay.lri.varna.factories.RNAFactory
72 ---------------------------------------
73
74 Cannot depend upon Java ArrayIndexOutOfBounds for trapping when testing formats
75
76 JAVA fix: Removing unnecessary exception print stack traces during testing for formats
77 JAVA fix: RNAFactory was not closing file reader
78
79
80
81 fr.orsay.lri.varna.applications.VARNAEditor
82 -------------------------------------------
83
84 switched to RNAFactory.loadSecStr((File) o) for drag-drop allows passing byte data
85
86
87 fr.orsay.lri.varna.applications.VARNAGUI
88 ----------------------------------------
89
90 switched to RNAFactory.loadSecStr((File) o) for drag-drop allows passing byte data
91
92
93  
94 fr.orsay.lri.varna.controlers.ControleurBaseSpecialColorEditor
95 --------------------------------------------------------------
96
97 Since the editor is not modal, we have to catch the window hiding event 
98 before closing the editor.
99
100
101
102 fr.orsay.lri.varna.controlers.ControleurInterpolator
103 ----------------------------------------------------
104
105 switch to JTimer for interpolation
106 JavaScript uses 2-second delay; Java uses 15-second delay
107
108
109
110 fr.orsay.lri.varna.views.PrinterTest.java
111 -----------------------------------------
112
113 simpler test that does not use java.awt.font.TextLayout, which is not implemented.
114
115
116
117 fr.orsay.lri.varna.VarnaPanel.java
118 ----------------------------------
119
120 now implements PropertyChangeListener for asynchronous callback.
121
122
123
124 fr.orsay.lri.varna.views.VueUI.java
125 ------------------------------------
126
127 All JOptionPane, JFileChooser, and JColorChooser action made asynchronous. 
128 Basically, the results OK, CANCEL, YES, NO, CLOSED, and custom button index
129 are delivered to instances of runnable via a PropertyChangeListener callback
130 to the indicated parent frame. 
131
132 Simple ERROR_OPTION and WARN_OPTION messages are handled via JavaScript Alert;
133 fall back options for simple showConfirmDialog and showInputDialog are used
134 automatically if the parent frame does not implement PropertyChangeListener. 
135
136 Initial JavaScript-only return is:
137
138  for int-returning methods, NaN, 
139    testable as value != Math.floor(value), where value is an int, and
140  for Object-returning methods, an Object that implements UIResource,  
141    testable as event.getNewValue() instanceof UIResource. 
142  
143 This allows full compatibility in Java and JavaScript.
144
145
146 See notes in fr.orsay.lri.varna.views.VueUI.java.
147  
148
149
150 fr.orsay.lri.varna.views.VueMenu.java
151 -------------------------------------
152
153 changes JLabel to JMenuItem - not 100% sure why that is necessary. 
154 changes JSeparator to JPopupMenu.Separator
155
156
157
158 fr.orsay.lri.varna.views.VueAbout.java
159 --------------------------------------
160
161 added simple JTimer for asynchronous animation
162 added asynchronous callback modal option for JavaScript
163