label work; adds preliminary _j2sclasslist.txt
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Thu, 20 Dec 2018 07:26:10 +0000 (01:26 -0600)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Thu, 20 Dec 2018 07:26:10 +0000 (01:26 -0600)
- use get class list link on test page to save list
- run buildcore.xml, which creates j2s/core/core_jalview.z.js (3.8 Mb)
- open jalview_bin_JalviewJS_core.html (if it is not in site/ copy it
from site-resources -- the transpiler should do this, but not unless you
change the code)

On my machine, Chrome loads and displays the reference JAXB file in
under five seconds.

The mechanism of dynamic loading of core files (not just preloading,
like this) might not be implemented yet in SwingJS.

TODO: menus are not automatically closing on the 300-ms timer anymore. Something I did when reconfiguring CSS for menu items. Will check.

_j2sclasslist.txt [moved from coreclasses with 62% similarity]
buildcore.xml
site-resources/jalview_bin_JalviewJS_core.html [new file with mode: 0644]
src/jalview/gui/SeqPanel.java
swingjs/SwingJS-site.zip
swingjs/timestamp
swingjs/ver/3.2.4/SwingJS-site.zip
swingjs/ver/3.2.4/timestamp

similarity index 62%
rename from coreclasses
rename to _j2sclasslist.txt
index 40ff83b..27ab6a6 100644 (file)
@@ -19,7 +19,6 @@ jalview/api/BuildDetailsI.js
 jalview/api/FeatureColourI.js
 jalview/api/FeatureRenderer.js
 jalview/api/FeaturesDisplayedI.js
-jalview/api/FeaturesSourceI.js
 jalview/api/OOMHandlerI.js
 jalview/api/SequenceRenderer.js
 jalview/api/StructureSelectionManagerProvider.js
@@ -30,7 +29,7 @@ jalview/bin/ArgsParser.js
 jalview/bin/BuildDetails.js
 jalview/bin/Cache.js
 jalview/bin/Jalview.js
-jalview/bin/JalviewJS.js
+jalview/bin/JalviewJS2.js
 jalview/controller/AlignViewController.js
 jalview/datamodel/ASequence.js
 jalview/datamodel/ASequenceI.js
@@ -62,6 +61,10 @@ jalview/datamodel/SequenceFeature.js
 jalview/datamodel/SequenceGroup.js
 jalview/datamodel/SequenceI.js
 jalview/datamodel/features/FeatureLocationI.js
+jalview/datamodel/features/FeatureMatcher.js
+jalview/datamodel/features/FeatureMatcherI.js
+jalview/datamodel/features/FeatureMatcherSet.js
+jalview/datamodel/features/FeatureMatcherSetI.js
 jalview/datamodel/features/FeatureStore.js
 jalview/datamodel/features/RangeComparator.js
 jalview/datamodel/features/SequenceFeatures.js
@@ -78,6 +81,7 @@ jalview/gui/IProgressIndicator.js
 jalview/gui/IdCanvas.js
 jalview/gui/IdPanel.js
 jalview/gui/IdwidthAdjuster.js
+jalview/gui/JalviewChangeSupport.js
 jalview/gui/JvSwingUtils.js
 jalview/gui/PaintRefresher.js
 jalview/gui/ProgressBar.js
@@ -91,24 +95,26 @@ jalview/io/AlignmentFileReaderI.js
 jalview/io/AlignmentFileWriterI.js
 jalview/io/AppletFormatAdapter.js
 jalview/io/DataSourceType.js
-jalview/io/FastaFile.js
-jalview/io/FeaturesFile.js
 jalview/io/FileFormat.js
 jalview/io/FileFormatI.js
 jalview/io/FileFormats.js
 jalview/io/FileLoader.js
 jalview/io/FileParse.js
-jalview/io/FormatAdapter.js
 jalview/io/IdentifyFile.js
 jalview/io/PIRFile.js
 jalview/io/ScoreMatrixFile.js
 jalview/io/SequenceAnnotationReport.js
+jalview/javascript/log4j/ConsoleAppender.js
+jalview/javascript/log4j/Layout.js
 jalview/javascript/log4j/Level.js
 jalview/javascript/log4j/Logger.js
 jalview/javascript/log4j/Priority.js
+jalview/javascript/log4j/SimpleLayout.js
+jalview/javascript/log4j/spi/OptionHandler.js
 jalview/jbgui/GAlignFrame.js
 jalview/jbgui/GAlignmentPanel.js
 jalview/jbgui/GDesktop.js
+jalview/project/Jalview2XML.js
 jalview/renderer/AnnotationRenderer.js
 jalview/renderer/AwtRenderPanelI.js
 jalview/renderer/ResidueColourFinder.js
@@ -151,16 +157,19 @@ jalview/util/ColorUtils.js
 jalview/util/Comparison.js
 jalview/util/DBRefUtils.js
 jalview/util/Format.js
-jalview/util/LinkedIdentityHashSet.js
 jalview/util/MessageManager.js
-jalview/util/ParseHtmlBodyAndLinks.js
 jalview/util/Platform.js
-jalview/util/StringUtils.js
+jalview/util/QuickSort.js
+jalview/util/jarInputStreamProvider.js
+jalview/util/matcher/Condition.js
+jalview/util/matcher/Matcher.js
+jalview/util/matcher/MatcherI.js
 jalview/viewmodel/AlignmentViewport.js
 jalview/viewmodel/ViewportListenerI.js
 jalview/viewmodel/ViewportProperties.js
 jalview/viewmodel/ViewportRanges.js
 jalview/viewmodel/seqfeatures/FeatureRendererModel.js
+jalview/viewmodel/seqfeatures/FeatureRendererSettings.js
 jalview/viewmodel/seqfeatures/FeaturesDisplayed.js
 jalview/viewmodel/styles/ViewStyle.js
 jalview/workers/AlignCalcManager.js
@@ -168,20 +177,50 @@ jalview/workers/AlignCalcWorker.js
 jalview/workers/ConsensusThread.js
 jalview/workers/ConservationThread.js
 jalview/ws/sifts/SiftsSettings.js
+jalview/xml/binding/jalview/Annotation.js
+jalview/xml/binding/jalview/AnnotationElement.js
+jalview/xml/binding/jalview/Feature.js
+jalview/xml/binding/jalview/FeatureMatcher.js
+jalview/xml/binding/jalview/FeatureMatcherSet.js
+jalview/xml/binding/jalview/FilterBy.js
+jalview/xml/binding/jalview/JalviewModel.js
+jalview/xml/binding/jalview/NoValueColour.js
+jalview/xml/binding/jalview/Pdbentry.js
+jalview/xml/binding/jalview/Sequence.js
+jalview/xml/binding/jalview/SequenceSet.js
+jalview/xml/binding/jalview/SequenceType.js
+jalview/xml/binding/jalview/VAMSAS.js
+jalview/xml/binding/jalview/WebServiceParameterSet.js
 java/awt/AWTKeyStroke.js
 java/awt/AlphaComposite.js
 java/awt/Composite.js
+java/awt/ContainerOrderFocusTraversalPolicy.js
+java/awt/DefaultFocusTraversalPolicy.js
+java/awt/DefaultKeyboardFocusManager.js
+java/awt/FocusTraversalPolicy.js
 java/awt/GridLayout.js
-java/awt/IllegalComponentStateException.js
 java/awt/Image.js
+java/awt/KeyEventDispatcher.js
+java/awt/KeyEventPostProcessor.js
+java/awt/KeyboardFocusManager.js
+java/awt/VKCollection.js
 java/awt/datatransfer/ClipboardOwner.js
+java/awt/datatransfer/FlavorMap.js
+java/awt/datatransfer/FlavorTable.js
+java/awt/datatransfer/SystemFlavorMap.js
+java/awt/dnd/DropTarget.js
+java/awt/dnd/DropTargetContext.js
 java/awt/dnd/DropTargetListener.js
-java/awt/event/ActionEvent.js
+java/awt/dnd/peer/DropTargetPeer.js
 java/awt/event/ComponentAdapter.js
+java/awt/event/ContainerEvent.js
 java/awt/event/FocusAdapter.js
 java/awt/event/KeyAdapter.js
 java/awt/event/MouseAdapter.js
 java/awt/event/MouseMotionAdapter.js
+java/awt/geom/Path2D.js
+java/awt/geom/PathIterator.js
+java/awt/geom/RectIterator.js
 java/awt/image/BufferedImage.js
 java/awt/image/ColorModel.js
 java/awt/image/DataBuffer.js
@@ -193,10 +232,12 @@ java/awt/image/RenderedImage.js
 java/awt/image/SampleModel.js
 java/awt/image/SinglePixelPackedSampleModel.js
 java/awt/image/WritableRaster.js
+java/awt/peer/KeyboardFocusManagerPeer.js
 java/awt/print/Printable.js
 java/io/BufferedInputStream.js
 java/io/BufferedReader.js
 java/io/ByteArrayInputStream.js
+java/io/Closeable.js
 java/io/File.js
 java/io/FileDescriptor.js
 java/io/FileInputStream.js
@@ -204,14 +245,28 @@ java/io/FileSystem.js
 java/io/FilterInputStream.js
 java/io/InputStream.js
 java/io/InputStreamReader.js
+java/io/PushbackInputStream.js
 java/io/Reader.js
+java/lang/AutoCloseable.js
+java/lang/Iterable.js
 java/lang/Readable.js
 java/lang/Runtime.js
 java/lang/StringBuilder.js
+java/lang/reflect/Constructor.js
+java/lang/reflect/Method.js
+java/math/BigDecimal.js
+java/math/BigInteger.js
+java/math/MathContext.js
 java/math/RoundingMode.js
+java/net/HttpURLConnection.js
 java/net/MalformedURLException.js
 java/net/URLConnection.js
+java/net/URLDecoder.js
 java/net/URLStreamHandler.js
+java/security/AccessControlContext.js
+java/security/AccessController.js
+java/security/PrivilegedAction.js
+java/security/PrivilegedExceptionAction.js
 java/text/AttributedCharacterIterator.js
 java/text/CharacterIterator.js
 java/text/DateFormat.js
@@ -224,49 +279,92 @@ java/text/Format.js
 java/text/MessageFormat.js
 java/text/NumberFormat.js
 java/text/SimpleDateFormat.js
+java/util/AbstractQueue.js
+java/util/AbstractSequentialList.js
 java/util/ArrayDeque.js
 java/util/BitSet.js
 java/util/Calendar.js
+java/util/Collection.js
+java/util/Comparator.js
 java/util/Deque.js
+java/util/Enumeration.js
 java/util/GregorianCalendar.js
+java/util/Iterator.js
 java/util/LinkedHashMap.js
+java/util/LinkedList.js
+java/util/List.js
+java/util/ListIterator.js
 java/util/ListResourceBundle.js
+java/util/Map.js
 java/util/NavigableMap.js
 java/util/NavigableSet.js
 java/util/Objects.js
 java/util/Properties.js
 java/util/PropertyResourceBundle.js
+java/util/Queue.js
+java/util/RandomAccess.js
 java/util/ResourceBundle.js
+java/util/Set.js
 java/util/SortedMap.js
 java/util/SortedSet.js
 java/util/StringTokenizer.js
+java/util/TimSort.js
 java/util/TimeZone.js
 java/util/TreeMap.js
+java/util/concurrent/AbstractExecutorService.js
+java/util/concurrent/BlockingQueue.js
 java/util/concurrent/ConcurrentHashMap.js
 java/util/concurrent/ConcurrentMap.js
+java/util/concurrent/Executor.js
+java/util/concurrent/ExecutorService.js
+java/util/concurrent/Executors.js
+java/util/concurrent/LinkedBlockingQueue.js
+java/util/concurrent/RejectedExecutionHandler.js
+java/util/concurrent/Semaphore.js
+java/util/concurrent/ThreadFactory.js
+java/util/concurrent/ThreadPoolExecutor.js
+java/util/concurrent/TimeUnit.js
 java/util/concurrent/atomic/AtomicBoolean.js
 java/util/concurrent/atomic/AtomicInteger.js
+java/util/concurrent/locks/AbstractOwnableSynchronizer.js
+java/util/concurrent/locks/AbstractQueuedSynchronizer.js
+java/util/concurrent/locks/Condition.js
 java/util/concurrent/locks/Lock.js
 java/util/concurrent/locks/ReadWriteLock.js
+java/util/concurrent/locks/ReentrantLock.js
 java/util/concurrent/locks/ReentrantReadWriteLock.js
+java/util/jar/JarEntry.js
+java/util/jar/JarInputStream.js
+java/util/logging/Level.js
+java/util/logging/Logger.js
 java/util/regex/Pattern.js
+java/util/zip/CRC32.js
+java/util/zip/Inflater.js
+java/util/zip/InflaterInputStream.js
+java/util/zip/ZipConstants.js
+java/util/zip/ZipEntry.js
+java/util/zip/ZipInputStream.js
 javajs/api/GenericLineReader.js
 javajs/api/JSONEncodable.js
 javajs/util/AjaxURLStreamHandler.js
-javajs/util/BS.js
+javajs/util/Encoding.js
 javajs/util/Rdr.js
 javajs/util/SB.js
+javax/swing/AbstractAction.js
+javax/swing/Action.js
 javax/swing/ComponentInputMap.js
+javax/swing/DefaultDesktopManager.js
+javax/swing/DesktopManager.js
 javax/swing/InputMap.js
+javax/swing/JDesktopPane.js
+javax/swing/JDialog.js
 javax/swing/JInternalFrame.js
+javax/swing/JProgressBar.js
 javax/swing/JScrollPane.js
 javax/swing/JTabbedPane.js
 javax/swing/JToolTip.js
 javax/swing/JViewport.js
-javax/swing/JWindow.js
 javax/swing/KeyStroke.js
-javax/swing/Popup.js
-javax/swing/PopupFactory.js
 javax/swing/ScrollPaneConstants.js
 javax/swing/ScrollPaneLayout.js
 javax/swing/Scrollable.js
@@ -274,8 +372,39 @@ javax/swing/Timer.js
 javax/swing/ToolTipManager.js
 javax/swing/ViewportLayout.js
 javax/swing/border/LineBorder.js
+javax/swing/event/InternalFrameAdapter.js
+javax/swing/event/InternalFrameEvent.js
+javax/swing/event/InternalFrameListener.js
 javax/swing/event/MenuListener.js
 javax/swing/plaf/ComponentInputMapUIResource.js
+javax/xml/bind/ContextFinder.js
+javax/xml/bind/GetPropertyAction.js
+javax/xml/bind/JAXBContext.js
+javax/xml/bind/JAXBContextFactory.js
+javax/xml/bind/JAXBElement.js
+javax/xml/bind/ModuleUtil.js
+javax/xml/bind/ServiceLoaderUtil.js
+javax/xml/bind/Unmarshaller.js
+javax/xml/bind/ValidationEventHandler.js
+javax/xml/bind/annotation/adapters/CollapsedStringAdapter.js
+javax/xml/bind/annotation/adapters/XmlAdapter.js
+javax/xml/bind/helpers/AbstractUnmarshallerImpl.js
+javax/xml/bind/helpers/DefaultValidationEventHandler.js
+javax/xml/datatype/XMLGregorianCalendar.js
+javax/xml/namespace/QName.js
+javax/xml/stream/XMLInputFactory.js
+javax/xml/stream/XMLStreamReader.js
+org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.js
+org/xml/sax/AttributeList.js
+org/xml/sax/Attributes.js
+org/xml/sax/ContentHandler.js
+org/xml/sax/InputSource.js
+org/xml/sax/Parser.js
+org/xml/sax/XMLReader.js
+org/xml/sax/ext/Attributes2.js
+sun/awt/AWTAccessor.js
+sun/awt/CausedFocusEvent.js
+sun/awt/KeyboardFocusManagerPeerProvider.js
 sun/awt/SunGraphicsCallback.js
 sun/awt/image/DataStealer.js
 sun/awt/image/IntegerComponentRaster.js
@@ -295,10 +424,35 @@ sun/util/calendar/CalendarUtils.js
 sun/util/calendar/Gregorian.js
 sun/util/calendar/ZoneInfo.js
 sun/util/resources/LocaleData.js
+swingjs/JSFocusManager.js
+swingjs/a2s/Dialog.js
+swingjs/jzlib/Adler32.js
+swingjs/jzlib/CRC32.js
+swingjs/jzlib/Checksum.js
+swingjs/jzlib/InfBlocks.js
+swingjs/jzlib/InfCodes.js
+swingjs/jzlib/InfTree.js
+swingjs/jzlib/Inflate.js
+swingjs/jzlib/Inflater.js
+swingjs/jzlib/InflaterInputStream.js
+swingjs/jzlib/ZStream.js
 swingjs/plaf/JSAppletUI.js
 swingjs/plaf/JSDesktopIconUI.js
+swingjs/plaf/JSDesktopPaneUI.js
+swingjs/plaf/JSGraphicsUtils.js
 swingjs/plaf/JSInternalFrameUI.js
+swingjs/plaf/JSProgressBarUI.js
 swingjs/plaf/JSScrollPaneUI.js
 swingjs/plaf/JSTabbedPaneUI.js
 swingjs/plaf/JSToolTipUI.js
 swingjs/plaf/JSViewportUI.js
+swingjs/xml/JSJAXBClass.js
+swingjs/xml/JSJAXBContext.js
+swingjs/xml/JSJAXBContextFactory.js
+swingjs/xml/JSJAXBField.js
+swingjs/xml/JSJAXBUnmarshaller.js
+swingjs/xml/JSSAXAttributes.js
+swingjs/xml/JSSAXParser.js
+swingjs/xml/JSXMLGregorianCalendarImpl.js
+swingjs/xml/JSXMLInputFactory.js
+swingjs/xml/JSXMLStreamReader.js
\ No newline at end of file
index f4dff04..e90fe1c 100644 (file)
@@ -17,7 +17,7 @@
        <echo>creating and compressing core files - warnings are OK; "does not exist" is trouble</echo>
        <echo>reading core class list from file coreclasses</echo>      
        <loadresource property="coreclasses">
-       <file file="coreclasses"/>
+       <file file="_j2sclasslist.txt"/>
     </loadresource>
  
     <antcall target="call-core">
@@ -28,7 +28,7 @@
                " />
     </antcall>
     
-    <echo>......Now copy an html file in site/ and add   core:"core${core.name}",    to the Info block.</echo>         
+    <echo>......Now copy an html file in site/ and add   core:"${core.name}",    to the Info block.</echo>     
     
   </target>
 
diff --git a/site-resources/jalview_bin_JalviewJS_core.html b/site-resources/jalview_bin_JalviewJS_core.html
new file mode 100644 (file)
index 0000000..b883409
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>SwingJS test JalviewJS2</title><meta charset="utf-8" />
+<script src="swingjs/swingjs2.js"></script>
+<script>
+if (!self.SwingJS)alert('swingjs2.js was not found. It needs to be in swingjs folder in the same directory as ' + document.location.href)
+Info = {
+  code: null,
+  main: "jalview.bin.JalviewJS2",
+//  core: "NONE",
+       core:"_jalview",
+       width: 850,
+       height: 550,
+  readyFunction: null,
+       serverURL: 'https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol2.php',
+       j2sPath: 'swingjs/j2s',
+       console:'sysoutdiv',
+       allowjavascript: true
+}
+</script>
+</head>
+<body>
+<script>
+SwingJS.getApplet('testApplet', Info)
+getClassList = function(){J2S._saveFile('_j2sclasslist.txt', Clazz.ClassFilesLoaded.sort().join('\n'))}
+</script>
+<div style="position:absolute;left:900px;top:30px;width:600px;height:300px;">
+<div id="sysoutdiv" style="border:1px solid green;width:100%;height:95%;overflow:auto"></div>
+This is System.out. <a href="javascript:testApplet._clearConsole()">clear it</a> <br>Add ?j2snocore to URL to see full class list; ?j2sdebug to use uncompressed j2s/core files <br><a href="javascript:getClassList()">get _j2sClassList.txt</a>
+</div>
+</body>
+</html>
index 5eb97e0..7f4b89b 100644 (file)
@@ -299,6 +299,9 @@ public class SeqPanel extends JPanel
    */
   void endEditing()
   {
+         
+         System.out.println("seqPanel endEditing " + editCommand);
+
     try
     {
       if (editCommand != null && editCommand.getSize() > 0)
@@ -626,7 +629,11 @@ public class SeqPanel extends JPanel
   @Override
   public void mouseReleased(MouseEvent evt)
   {
-    boolean didDrag = mouseDragging; // did we come here after a drag
+         
+         System.out.println("seqPanel mouse evt release " + evt.isShiftDown() + " " + mouseDragging + " " + editingSeqs);
+
+         
+         boolean didDrag = mouseDragging; // did we come here after a drag
     mouseDragging = false;
     mouseWheelPressed = false;
 
@@ -656,6 +663,7 @@ public class SeqPanel extends JPanel
   @Override
   public void mousePressed(MouseEvent evt)
   {
+         System.out.println("seqPanel mouse evt " + evt.isShiftDown());
     lastMousePress = evt.getPoint();
 
     if (SwingUtilities.isMiddleMouseButton(evt))
@@ -1133,6 +1141,9 @@ public class SeqPanel extends JPanel
           newWidth = av.getCharWidth() + 1;
           av.setCharWidth(newWidth);
         }
+        System.out.println("seqPanel mouse evt " + evt.isShiftDown() + " " + newWidth);
+        
         if (newWidth > 0)
         {
           ap.paintAlignment(false, false);
index 4840662..d7afa47 100644 (file)
Binary files a/swingjs/SwingJS-site.zip and b/swingjs/SwingJS-site.zip differ
index 6aa2a2d..19803a8 100644 (file)
@@ -1 +1 @@
-20181217231419 
+20181220001942 
index 4840662..d7afa47 100644 (file)
Binary files a/swingjs/ver/3.2.4/SwingJS-site.zip and b/swingjs/ver/3.2.4/SwingJS-site.zip differ
index 6aa2a2d..19803a8 100644 (file)
@@ -1 +1 @@
-20181217231419 
+20181220001942