Revision: 18576
          http://sourceforge.net/p/jmol/code/18576
Author:   hansonr
Date:     2013-08-15 15:23:51 +0000 (Thu, 15 Aug 2013)
Log Message:
-----------
___JmolVersion="13.3.4_dev_2013.08.15"

bug fix: binding names not included in SHOW MOUSE
bug fix: "single" touch can fire double-click

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/renderbio/CartoonRenderer.java
    trunk/Jmol/src/org/jmol/renderbio/RibbonsRenderer.java
    trunk/Jmol/src/org/jmol/renderbio/RocketsRenderer.java
    trunk/Jmol/src/org/jmol/renderbio/StrandsRenderer.java
    trunk/Jmol/src/org/jmol/renderbio/TraceRenderer.java
    trunk/Jmol/src/org/jmol/thread/TimeoutThread.java
    trunk/Jmol/src/org/jmol/viewer/ActionManager.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties
    trunk/Jmol/src/org/jmol/viewer/MouseState.java
    trunk/Jmol/src/org/jmol/viewer/Viewer.java
    trunk/Jmol/src/org/jmol/viewer/binding/Binding.java

Modified: trunk/Jmol/src/org/jmol/renderbio/CartoonRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/renderbio/CartoonRenderer.java      2013-08-15 
15:22:47 UTC (rev 18575)
+++ trunk/Jmol/src/org/jmol/renderbio/CartoonRenderer.java      2013-08-15 
15:23:51 UTC (rev 18576)
@@ -43,10 +43,11 @@
   @Override
   protected void renderBioShape(BioShape bioShape) {
     if (wireframeOnly) {
-      if (wingVectors == null || isCarbohydrate)
-        renderTrace();
-      else
-        renderMeshRibbon();        
+      renderStrands();
+//      if (wingVectors == null || isCarbohydrate)
+//        renderTrace();
+//      else
+//        renderMeshRibbon();        
       return;
     }
     newRockets = true;

Modified: trunk/Jmol/src/org/jmol/renderbio/RibbonsRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/renderbio/RibbonsRenderer.java      2013-08-15 
15:22:47 UTC (rev 18575)
+++ trunk/Jmol/src/org/jmol/renderbio/RibbonsRenderer.java      2013-08-15 
15:23:51 UTC (rev 18576)
@@ -34,7 +34,9 @@
     if (wingVectors == null)
       return;
     if (wireframeOnly) {
-      renderMeshRibbon();
+      // renderMeshRibbon();
+      strandCount = 1; 
+      renderStrands();
       return;
     }
     render2Strand(true, isNucleic ? 1f : 0.5f, isNucleic ? 0f : 0.5f);

Modified: trunk/Jmol/src/org/jmol/renderbio/RocketsRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/renderbio/RocketsRenderer.java      2013-08-15 
15:22:47 UTC (rev 18575)
+++ trunk/Jmol/src/org/jmol/renderbio/RocketsRenderer.java      2013-08-15 
15:23:51 UTC (rev 18576)
@@ -37,7 +37,7 @@
 import org.jmol.util.V3;
 
 
-public class RocketsRenderer extends MeshRibbonRenderer {
+public class RocketsRenderer extends StrandsRenderer {
 
   //private final static float MIN_CONE_HEIGHT = 0.05f;
 
@@ -49,7 +49,7 @@
     if (!(bioShape.bioPolymer instanceof AlphaPolymer))
       return;
     if (wireframeOnly) {
-      renderMeshRibbon();
+      renderStrands();
       return;
     }
     boolean val = !viewer.getBoolean(T.rocketbarrels);

Modified: trunk/Jmol/src/org/jmol/renderbio/StrandsRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/renderbio/StrandsRenderer.java      2013-08-15 
15:22:47 UTC (rev 18575)
+++ trunk/Jmol/src/org/jmol/renderbio/StrandsRenderer.java      2013-08-15 
15:23:51 UTC (rev 18576)
@@ -29,9 +29,9 @@
 import org.jmol.shapebio.Strands;
 import org.jmol.util.P3i;
 
-public class StrandsRenderer extends TraceRenderer {
+public class StrandsRenderer extends BioShapeRenderer {
 
-  protected int strandCount;
+  protected int strandCount = 1;
   protected float strandSeparation;
   protected float baseStrandOffset;
 

Modified: trunk/Jmol/src/org/jmol/renderbio/TraceRenderer.java
===================================================================
--- trunk/Jmol/src/org/jmol/renderbio/TraceRenderer.java        2013-08-15 
15:22:47 UTC (rev 18575)
+++ trunk/Jmol/src/org/jmol/renderbio/TraceRenderer.java        2013-08-15 
15:23:51 UTC (rev 18576)
@@ -27,11 +27,14 @@
 import org.jmol.shapebio.BioShape;
 
 
-public class TraceRenderer extends BioShapeRenderer {
+public class TraceRenderer extends StrandsRenderer {
 
   @Override
   protected void renderBioShape(BioShape bioShape) {
-    renderTrace();
+    if (wireframeOnly)
+      renderStrands();
+    else
+      renderTrace();
   }
 
   protected void renderTrace() {

Modified: trunk/Jmol/src/org/jmol/thread/TimeoutThread.java
===================================================================
--- trunk/Jmol/src/org/jmol/thread/TimeoutThread.java   2013-08-15 15:22:47 UTC 
(rev 18575)
+++ trunk/Jmol/src/org/jmol/thread/TimeoutThread.java   2013-08-15 15:23:51 UTC 
(rev 18576)
@@ -37,7 +37,6 @@
   private Map<String, Object> timeouts;
   
   public TimeoutThread(Viewer viewer, String name, int ms, String script) {
-    super();
     setViewer(viewer, name);
     this.name = name; // no appended info
     set(ms, script);
@@ -57,7 +56,8 @@
   
   @Override
   protected void run1(int mode) throws InterruptedException {
-    while (true)
+    while (true) {
+      //System.out.println("timeoutthread run1 " + name + " " + mode + " " + 
System.currentTimeMillis() + " " + targetTime);
       switch (mode) {
       case INIT:
         if (!isJS)
@@ -85,14 +85,19 @@
           return;
         status++;
         boolean continuing = (sleepTime < 0);
-        targetTime = System.currentTimeMillis() + Math.abs(sleepTime);
-        if (!continuing)
+        if (continuing)
+          targetTime = System.currentTimeMillis() + Math.abs(sleepTime);
+        else
           timeouts.remove(name);
         if (triggered) {
           triggered = false;
           // script execution of "timeout ID <name>;" triggers the timeout 
again
-          viewer.evalStringQuiet((continuing ? script + ";\ntimeout ID \""
-              + name + "\";" : script));
+          if (name.equals("_SET_IN_MOTION_")) {
+            viewer.checkInMotion(2);
+          } else {
+            viewer.evalStringQuiet((continuing ? script + ";\ntimeout ID \""
+                + name + "\";" : script));
+          }
         }
         mode = (continuing ? MAIN : FINISH);
         break;
@@ -100,6 +105,7 @@
         timeouts.remove(name);
         return;
       }
+    }
   }
 
   public static void clear(Map<String, Object> timeouts) {

Modified: trunk/Jmol/src/org/jmol/viewer/ActionManager.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/ActionManager.java   2013-08-15 15:22:47 UTC 
(rev 18575)
+++ trunk/Jmol/src/org/jmol/viewer/ActionManager.java   2013-08-15 15:23:51 UTC 
(rev 18576)
@@ -49,54 +49,54 @@
 
 public class ActionManager {
 
-  public final static int ACTION_center = 0;
-  public final static int ACTION_translate = 1;  
-  public final static int ACTION_rotate = 2;
-  public final static int ACTION_rotateZ = 3;
-  public final static int ACTION_rotateZorZoom = 4;
-  public final static int ACTION_wheelZoom = 5;
-  public final static int ACTION_slideZoom = 6;  
-  public final static int ACTION_navTranslate = 7;
-  public final static int ACTION_swipe = 8;
-  public final static int ACTION_spinDrawObjectCW = 9;
-  public final static int ACTION_spinDrawObjectCCW = 10;
-  public final static int ACTION_slab = 11;
-  public final static int ACTION_depth = 12;
-  public final static int ACTION_slabAndDepth = 13;
-  public final static int ACTION_popupMenu = 14;
-  public final static int ACTION_clickFrank = 15;
-  public final static int ACTION_select = 16;
-  public final static int ACTION_selectNone = 17;
-  public final static int ACTION_selectToggle = 18;  
-  public final static int ACTION_selectAndNot = 19;
-  public final static int ACTION_selectOr = 20;
-  public final static int ACTION_selectToggleExtended = 21;
-  public final static int ACTION_dragSelected = 22;
-  public final static int ACTION_selectAndDrag = 23;
-  public final static int ACTION_dragZ = 24;
-  public final static int ACTION_rotateSelected = 25;
-  public final static int ACTION_rotateBranch = 26;
-  public final static int ACTION_dragAtom = 27;
-  public final static int ACTION_dragMinimize = 28;
-  public final static int ACTION_dragMinimizeMolecule = 29;
-  public final static int ACTION_dragLabel = 30;
-  public final static int ACTION_dragDrawPoint = 31;
-  public final static int ACTION_dragDrawObject = 32;
-  public final static int ACTION_pickAtom = 33;
-  public final static int ACTION_pickPoint = 34;
-  public final static int ACTION_pickLabel = 35;
-  public final static int ACTION_pickMeasure = 36;
-  public final static int ACTION_setMeasure = 37;
-  public final static int ACTION_pickIsosurface = 38;
-  public final static int ACTION_pickNavigate = 39;
-  public final static int ACTION_deleteAtom = 40;
-  public final static int ACTION_deleteBond = 41;
-  public final static int ACTION_connectAtoms = 42;
-  public final static int ACTION_assignNew = 43;
-  public final static int ACTION_reset = 44;
-  public final static int ACTION_stopMotion = 45;
-  public final static int ACTION_multiTouchSimulation = 46;
-  public final static int ACTION_count = 47;
+  public final static int ACTION_assignNew            = 0;
+  public final static int ACTION_center               = 1;
+  public final static int ACTION_clickFrank           = 2;
+  public final static int ACTION_connectAtoms         = 3;
+  public final static int ACTION_deleteAtom           = 4;
+  public final static int ACTION_deleteBond           = 5;
+  public final static int ACTION_depth                = 6;
+  public final static int ACTION_dragAtom             = 7;
+  public final static int ACTION_dragDrawObject       = 8;
+  public final static int ACTION_dragDrawPoint        = 9;
+  public final static int ACTION_dragLabel            = 10;
+  public final static int ACTION_dragMinimize         = 11;
+  public final static int ACTION_dragMinimizeMolecule = 12;
+  public final static int ACTION_dragSelected         = 13;
+  public final static int ACTION_dragZ                = 14;
+  public final static int ACTION_multiTouchSimulation = 15;
+  public final static int ACTION_navTranslate         = 16;
+  public final static int ACTION_pickAtom             = 17;
+  public final static int ACTION_pickIsosurface       = 18;
+  public final static int ACTION_pickLabel            = 19;
+  public final static int ACTION_pickMeasure          = 20;
+  public final static int ACTION_pickNavigate         = 21;
+  public final static int ACTION_pickPoint            = 22;
+  public final static int ACTION_popupMenu            = 23;
+  public final static int ACTION_reset                = 24;
+  public final static int ACTION_rotate               = 25;
+  public final static int ACTION_rotateBranch         = 26;
+  public final static int ACTION_rotateSelected       = 27;
+  public final static int ACTION_rotateZ              = 28;
+  public final static int ACTION_rotateZorZoom        = 29;
+  public final static int ACTION_select               = 30;
+  public final static int ACTION_selectAndDrag        = 31;
+  public final static int ACTION_selectAndNot         = 32;
+  public final static int ACTION_selectNone           = 33;
+  public final static int ACTION_selectOr             = 34;
+  public final static int ACTION_selectToggle         = 35;
+  public final static int ACTION_selectToggleExtended = 36;
+  public final static int ACTION_setMeasure           = 37;
+  public final static int ACTION_slab                 = 38;
+  public final static int ACTION_slabAndDepth         = 39;
+  public final static int ACTION_slideZoom            = 40;
+  public final static int ACTION_spinDrawObjectCCW    = 41;
+  public final static int ACTION_spinDrawObjectCW     = 42;
+  public final static int ACTION_stopMotion           = 43;
+  public final static int ACTION_swipe                = 44;
+  public final static int ACTION_translate            = 45;
+  public final static int ACTION_wheelZoom            = 46;
+  public final static int ACTION_count                = 47;
 
   private final static String[] actionInfo = new String[ACTION_count];
   private final static String[] actionNames = new String[ACTION_count];
@@ -107,53 +107,54 @@
   }
   
   static {
+    newAction(ACTION_assignNew,             "_assignNew",            
GT._("assign/new atom or bond (requires {0})", "set picking 
assignAtom_??/assignBond_?"));
     newAction(ACTION_center,                "_center",               
GT._("center"));
-    newAction(ACTION_translate,             "_translate",            
GT._("translate"));
-    newAction(ACTION_rotate,                "_rotate",               
GT._("rotate"));
-    newAction(ACTION_rotateZ,               "_rotateZ",              
GT._("rotate Z"));
-    newAction(ACTION_rotateZorZoom,         "_rotateZorZoom",        
GT._("rotate Z (horizontal motion of mouse) or zoom (vertical motion of 
mouse)"));
-    newAction(ACTION_wheelZoom,             "_wheelZoom",            
GT._("zoom"));
-    newAction(ACTION_slideZoom,             "_slideZoom",            
GT._("zoom (along right edge of window)"));
-    newAction(ACTION_navTranslate,          "_navTranslate",         
GT._("translate navigation point (requires {0} and {1})", new String[] {"set 
NAVIGATIONMODE", "set picking NAVIGATE"}));
-    newAction(ACTION_swipe,                 "_swipe",                
GT._("spin model (swipe and release button and stop motion simultaneously)"));
-    newAction(ACTION_spinDrawObjectCW,      "_spinDrawObjectCW",     
GT._("click on two points to spin around axis clockwise (requires {0})", "set 
picking SPIN"));
-    newAction(ACTION_spinDrawObjectCCW,     "_spinDrawObjectCCW",    
GT._("click on two points to spin around axis counterclockwise (requires {0})", 
"set picking SPIN"));
-    newAction(ACTION_slab,                  "_slab",                 
GT._("adjust slab (front plane; requires {0})", "SLAB ON"));
+    newAction(ACTION_clickFrank,            "_clickFrank",           GT._("pop 
up recent context menu (click on Jmol frank)"));
+    newAction(ACTION_deleteAtom,            "_deleteAtom",           
GT._("delete atom (requires {0})", "set picking DELETE ATOM"));
+    newAction(ACTION_deleteBond,            "_deleteBond",           
GT._("delete bond (requires {0})", "set picking DELETE BOND"));
     newAction(ACTION_depth,                 "_depth",                
GT._("adjust depth (back plane; requires {0})", "SLAB ON"));
-    newAction(ACTION_slabAndDepth,          "_slabAndDepth",         
GT._("move slab/depth window (both planes; requires {0})", "SLAB ON"));
-    newAction(ACTION_popupMenu,             "_popupMenu",            GT._("pop 
up the full context menu"));
-    newAction(ACTION_clickFrank,            "_clickFrank",           GT._("pop 
up recent context menu (click on Jmol frank)"));
-    newAction(ACTION_select,                "_select",               
GT._("select an atom (requires {0})", "set pickingStyle EXTENDEDSELECT"));
-    newAction(ACTION_selectNone,            "_selectNone",           
GT._("select NONE (requires {0})", "set pickingStyle EXTENDEDSELECT"));
-    newAction(ACTION_selectToggle,          "_selectToggle",         
GT._("toggle selection (requires {0})", "set pickingStyle 
DRAG/EXTENDEDSELECT/RASMOL"));
-    newAction(ACTION_selectAndNot,          "_selectAndNot",         
GT._("unselect this group of atoms (requires {0})", "set pickingStyle 
DRAG/EXTENDEDSELECT"));
-    newAction(ACTION_selectOr,              "_selectOr",             GT._("add 
this group of atoms to the set of selected atoms (requires {0})", "set 
pickingStyle DRAG/EXTENDEDSELECT"));
-    newAction(ACTION_selectToggleExtended,  "_selectToggleOr",       GT._("if 
all are selected, unselect all, otherwise add this group of atoms to the set of 
selected atoms (requires {0})", "set pickingStyle DRAG"));
-    newAction(ACTION_dragSelected,          "_dragSelected",         
GT._("move selected atoms (requires {0})", "set DRAGSELECTED"));
-    newAction(ACTION_selectAndDrag,         "_selectAndDrag",        
GT._("select and drag atoms (requires {0})", "set DRAGSELECTED"));
-    newAction(ACTION_dragZ,                 "_dragZ",                
GT._("drag atoms in Z direction (requires {0})", "set DRAGSELECTED"));
-    newAction(ACTION_rotateSelected,        "_rotateSelected",       
GT._("rotate selected atoms (requires {0})", "set DRAGSELECTED"));
-    newAction(ACTION_rotateBranch,          "_rotateBranch",         
GT._("rotate branch around bond (requires {0})", "set picking ROTATEBOND"));
     newAction(ACTION_dragAtom,              "_dragAtom",             
GT._("move atom (requires {0})", "set picking DRAGATOM"));
+    newAction(ACTION_dragDrawObject,        "_dragDrawObject",       
GT._("move whole DRAW object (requires {0})", "set picking DRAW"));
+    newAction(ACTION_dragDrawPoint,         "_dragDrawPoint",        
GT._("move specific DRAW point (requires {0})", "set picking DRAW"));
+    newAction(ACTION_dragLabel,             "_dragLabel",            
GT._("move label (requires {0})", "set picking LABEL"));
     newAction(ACTION_dragMinimize,          "_dragMinimize",         
GT._("move atom and minimize molecule (requires {0})", "set picking 
DRAGMINIMIZE"));
     newAction(ACTION_dragMinimizeMolecule,  "_dragMinimizeMolecule", 
GT._("move and minimize molecule (requires {0})", "set picking 
DRAGMINIMIZEMOLECULE"));
-    newAction(ACTION_dragLabel,             "_dragLabel",            
GT._("move label (requires {0})", "set picking LABEL"));
-    newAction(ACTION_dragDrawPoint,         "_dragDrawPoint",        
GT._("move specific DRAW point (requires {0})", "set picking DRAW"));
-    newAction(ACTION_dragDrawObject,        "_dragDrawObject",       
GT._("move whole DRAW object (requires {0})", "set picking DRAW"));
+    newAction(ACTION_dragSelected,          "_dragSelected",         
GT._("move selected atoms (requires {0})", "set DRAGSELECTED"));
+    newAction(ACTION_dragZ,                 "_dragZ",                
GT._("drag atoms in Z direction (requires {0})", "set DRAGSELECTED"));
+    newAction(ACTION_multiTouchSimulation,  "_multiTouchSimulation", 
GT._("simulate multi-touch using the mouse)"));
+    newAction(ACTION_navTranslate,          "_navTranslate",         
GT._("translate navigation point (requires {0} and {1})", new String[] {"set 
NAVIGATIONMODE", "set picking NAVIGATE"}));
     newAction(ACTION_pickAtom,              "_pickAtom",             
GT._("pick an atom"));
-    newAction(ACTION_pickPoint,             "_pickPoint",            
GT._("pick a DRAW point (for measurements) (requires {0}", "set DRAWPICKING"));
+    newAction(ACTION_connectAtoms,          "_pickConnect",          
GT._("connect atoms (requires {0})", "set picking CONNECT"));
+    newAction(ACTION_pickIsosurface,        "_pickIsosurface",       
GT._("pick an ISOSURFACE point (requires {0}", "set DRAWPICKING"));
     newAction(ACTION_pickLabel,             "_pickLabel",            
GT._("pick a label to toggle it hidden/displayed (requires {0})", "set picking 
LABEL"));
     newAction(ACTION_pickMeasure,           "_pickMeasure",          
GT._("pick an atom to include it in a measurement (after starting a measurement 
or after {0})", "set picking DISTANCE/ANGLE/TORSION"));
-    newAction(ACTION_setMeasure,            "_setMeasure",           
GT._("pick an atom to initiate or conclude a measurement"));
-    newAction(ACTION_pickIsosurface,        "_pickIsosurface",       
GT._("pick an ISOSURFACE point (requires {0}", "set DRAWPICKING"));
     newAction(ACTION_pickNavigate,          "_pickNavigate",         
GT._("pick a point or atom to navigate to (requires {0})", "set 
NAVIGATIONMODE"));
-    newAction(ACTION_deleteAtom,            "_deleteAtom",           
GT._("delete atom (requires {0})", "set picking DELETE ATOM"));
-    newAction(ACTION_deleteBond,            "_deleteBond",           
GT._("delete bond (requires {0})", "set picking DELETE BOND"));
-    newAction(ACTION_connectAtoms,          "_pickConnect",          
GT._("connect atoms (requires {0})", "set picking CONNECT"));
-    newAction(ACTION_assignNew,             "_assignNew",            
GT._("assign/new atom or bond (requires {0})", "set picking 
assignAtom_??/assignBond_?"));
+    newAction(ACTION_pickPoint,             "_pickPoint",            
GT._("pick a DRAW point (for measurements) (requires {0}", "set DRAWPICKING"));
+    newAction(ACTION_popupMenu,             "_popupMenu",            GT._("pop 
up the full context menu"));
     newAction(ACTION_reset,                 "_reset",                
GT._("reset (when clicked off the model)"));
+    newAction(ACTION_rotate,                "_rotate",               
GT._("rotate"));
+    newAction(ACTION_rotateBranch,          "_rotateBranch",         
GT._("rotate branch around bond (requires {0})", "set picking ROTATEBOND"));
+    newAction(ACTION_rotateSelected,        "_rotateSelected",       
GT._("rotate selected atoms (requires {0})", "set DRAGSELECTED"));
+    newAction(ACTION_rotateZ,               "_rotateZ",              
GT._("rotate Z"));
+    newAction(ACTION_rotateZorZoom,         "_rotateZorZoom",        
GT._("rotate Z (horizontal motion of mouse) or zoom (vertical motion of 
mouse)"));
+    newAction(ACTION_select,                "_select",               
GT._("select an atom (requires {0})", "set pickingStyle EXTENDEDSELECT"));
+    newAction(ACTION_selectAndDrag,         "_selectAndDrag",        
GT._("select and drag atoms (requires {0})", "set DRAGSELECTED"));
+    newAction(ACTION_selectAndNot,          "_selectAndNot",         
GT._("unselect this group of atoms (requires {0})", "set pickingStyle 
DRAG/EXTENDEDSELECT"));
+    newAction(ACTION_selectNone,            "_selectNone",           
GT._("select NONE (requires {0})", "set pickingStyle EXTENDEDSELECT"));
+    newAction(ACTION_selectOr,              "_selectOr",             GT._("add 
this group of atoms to the set of selected atoms (requires {0})", "set 
pickingStyle DRAG/EXTENDEDSELECT"));
+    newAction(ACTION_selectToggle,          "_selectToggle",         
GT._("toggle selection (requires {0})", "set pickingStyle 
DRAG/EXTENDEDSELECT/RASMOL"));
+    newAction(ACTION_selectToggleExtended,  "_selectToggleOr",       GT._("if 
all are selected, unselect all, otherwise add this group of atoms to the set of 
selected atoms (requires {0})", "set pickingStyle DRAG"));
+    newAction(ACTION_setMeasure,            "_setMeasure",           
GT._("pick an atom to initiate or conclude a measurement"));
+    newAction(ACTION_slab,                  "_slab",                 
GT._("adjust slab (front plane; requires {0})", "SLAB ON"));
+    newAction(ACTION_slabAndDepth,          "_slabAndDepth",         
GT._("move slab/depth window (both planes; requires {0})", "SLAB ON"));
+    newAction(ACTION_slideZoom,             "_slideZoom",            
GT._("zoom (along right edge of window)"));
+    newAction(ACTION_spinDrawObjectCCW,     "_spinDrawObjectCCW",    
GT._("click on two points to spin around axis counterclockwise (requires {0})", 
"set picking SPIN"));
+    newAction(ACTION_spinDrawObjectCW,      "_spinDrawObjectCW",     
GT._("click on two points to spin around axis clockwise (requires {0})", "set 
picking SPIN"));
     newAction(ACTION_stopMotion,            "_stopMotion",           
GT._("stop motion (requires {0})", "set waitForMoveTo FALSE"));
-    newAction(ACTION_multiTouchSimulation,  "_multiTouchSimulation", 
GT._("simulate multi-touch using the mouse)"));
+    newAction(ACTION_swipe,                 "_swipe",                
GT._("spin model (swipe and release button and stop motion simultaneously)"));
+    newAction(ACTION_translate,             "_translate",            
GT._("translate"));
+    newAction(ACTION_wheelZoom,             "_wheelZoom",            
GT._("zoom"));
+
   }
 
   public static String getActionName(int i) {
@@ -168,7 +169,7 @@
   }
   
   public String getBindingInfo(String qualifiers) {
-    return binding.getBindingInfo(actionInfo, qualifiers);  
+    return binding.getBindingInfo(actionInfo, actionNames, qualifiers);  
   }
 
   /**
@@ -392,11 +393,11 @@
     mouseWheelFactor = factor;
   }
   
-  protected final MouseState current = new MouseState();
-  protected final MouseState moved = new MouseState();
-  private final MouseState clicked = new MouseState();
-  private final MouseState pressed = new MouseState();
-  private final MouseState dragged = new MouseState();
+  protected final MouseState current = new MouseState("current");
+  protected final MouseState moved = new MouseState("moved");
+  private final MouseState clicked = new MouseState("clicked");
+  private final MouseState pressed = new MouseState("pressed");
+  private final MouseState dragged = new MouseState("dragged");
 
   protected void setCurrent(long time, int x, int y, int mods) {
     hoverOff();
@@ -1333,7 +1334,7 @@
     switch (action) {
     case Binding.MOVED:
       setCurrent(time, x, y, modifiers);
-      moved.setCurrent(current, Binding.MOVED);
+      moved.setCurrent(current, 0);
       if (measurementPending != null || hoverActive)
         checkPointOrAtomClicked(x, y, 0, 0, time, false, Binding.MOVED);
       else if (isZoomArea(x))
@@ -1355,9 +1356,12 @@
       setMouseMode();
       clickedCount = (count > 1 ? count : clicked.check(0, 0, 0, modifiers, 
time,
           MAX_DOUBLE_CLICK_MILLIS) ? clickedCount + 1 : 1);
-      if (clickedCount == 1)
-        setCurrent(time, x, y, modifiers);        
-      clicked.setCurrent(current, Binding.CLICKED);
+      if (clickedCount == 1) {
+        setCurrent(time, x, y, modifiers);
+      } else {
+        
+      }
+      clicked.setCurrent(current, clickedCount);
       viewer.setFocus();
       if (atomPickingMode != PICKING_SELECT_ATOM
           && isBound(Binding.getMouseAction(Integer.MIN_VALUE, modifiers),
@@ -1370,11 +1374,13 @@
       setMouseMode();
       pressedCount = (pressed.check(0, 0, 0, modifiers, time,
           MAX_DOUBLE_CLICK_MILLIS) ? pressedCount + 1 : 1);
-      if (pressedCount == 1)
+      if (pressedCount == 1) {
+        viewer.checkInMotion(1);
         setCurrent(time, x, y, modifiers);
+      }
       viewer.setCursor(JC.CURSOR_HAND);
-      pressed.setCurrent(current, Binding.PRESSED);
-      dragged.setCurrent(current, Binding.PRESSED);
+      pressed.setCurrent(current, 1);
+      dragged.setCurrent(current, 1);
       viewer.setFocus();
       boolean isSelectAndDrag = isBound(Binding.getMouseAction(
           Integer.MIN_VALUE, modifiers), ACTION_selectAndDrag);
@@ -1466,7 +1472,7 @@
       int deltaX = x - dragged.x;
       int deltaY = y - dragged.y;
       setCurrent(time, x, y, modifiers);
-      dragged.setCurrent(current, Binding.DRAGGED);
+      dragged.setCurrent(current, -1);
       if (atomPickingMode != PICKING_ASSIGN_ATOM)
         exitMeasurementMode();
       action = Binding.getMouseAction(pressedCount, modifiers);
@@ -1478,6 +1484,7 @@
       viewer.spinXYBy(0, 0, 0);
       boolean dragRelease = !pressed.check(xyRange, x, y, modifiers, time,
           Long.MAX_VALUE);
+      viewer.checkInMotion(0);
       viewer.setInMotion(false);
       viewer.setCursor(JC.CURSOR_DEFAULT);
       action = Binding.getMouseAction(pressedCount, modifiers);

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2013-08-15 15:22:47 UTC 
(rev 18575)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2013-08-15 15:23:51 UTC 
(rev 18576)
@@ -11,8 +11,10 @@
 #  The quotes above look odd for a parameter file, but they are 
 #  important for the JavaScript version of Jmol.
 
-___JmolVersion="13.3.4_dev_2013.08.14"
+___JmolVersion="13.3.4_dev_2013.08.15"
 
+bug fix: binding names not included in SHOW MOUSE
+bug fix: "single" touch can fire double-click
 bug fix: {x}.tensor() command fails when no atom tensors
 FEATURE CHANGE: set wireframeRotation expanded to include bioshapes and 
isosurfaces
 bug fix: isosurface slab not allowing two different slabs for two diffrent 
isosurfaces

Modified: trunk/Jmol/src/org/jmol/viewer/MouseState.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/MouseState.java      2013-08-15 15:22:47 UTC 
(rev 18575)
+++ trunk/Jmol/src/org/jmol/viewer/MouseState.java      2013-08-15 15:23:51 UTC 
(rev 18576)
@@ -34,7 +34,10 @@
   int modifiers = 0;
   public long time = -1;
   
-  MouseState() {
+  public String name;
+  
+  MouseState(String name) {
+    this.name = name;
   }
   
   void set(long time, int x, int y, int modifiers) {
@@ -46,12 +49,14 @@
 
   /**
    * @param current 
-   * @param why  - for debugging purposes 
+   * @param clickCount 
    */
-  void setCurrent(MouseState current, int why) {
+  void setCurrent(MouseState current, int clickCount) {
     time = current.time;
-    x = current.x;
-    y = current.y;
+    if (clickCount < 2) {
+      x = current.x;
+      y = current.y;
+    }
     modifiers = current.modifiers;
   }
 
@@ -59,10 +64,11 @@
     return (Math.abs(this.x - x) <= xyRange && Math.abs(this.y - y) <= 
xyRange);
   }
   
+  private final static int MIN_DELAY_MS = 20;
   public boolean check(int xyRange, int x, int y, int modifiers, long time, 
long delayMax) {
     return (this.modifiers == modifiers 
         && (delayMax >= Integer.MAX_VALUE ? inRange(xyRange, x, y) 
-            : (time - this.time) < delayMax));
+            : time - this.time < delayMax && time - this.time > MIN_DELAY_MS));
   }
 
   public boolean is(MouseState current) {

Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Viewer.java  2013-08-15 15:22:47 UTC (rev 
18575)
+++ trunk/Jmol/src/org/jmol/viewer/Viewer.java  2013-08-15 15:23:51 UTC (rev 
18576)
@@ -3964,7 +3964,6 @@
     global.setB("_animMovie", animationManager.isMovie);
   }
 
-  private boolean wasInMotion = false;
   private int motionEventNumber;
   private boolean inMotion;
 
@@ -3979,8 +3978,7 @@
 
   @Override
   public void setInMotion(boolean inMotion) {
-    // MouseManager, TransformManager
-    if (wasInMotion ^ inMotion) {
+    if (this.inMotion ^ inMotion) {
       this.inMotion = inMotion;
       if (inMotion) {
         startHoverWatcher(false);
@@ -3989,7 +3987,6 @@
         startHoverWatcher(true);
         refresh(3, "viewer setInMotion " + inMotion);
       }
-      wasInMotion = inMotion;
     }
   }
 
@@ -10275,4 +10272,20 @@
     animationManager.setModulationFps(fps);
   }
 
+  public void checkInMotion(int state) {
+    switch (state) {
+    case 0: // off
+      setTimeout("_SET_IN_MOTION_", 0, null);
+      break;
+    case 1: // start timer
+      if (getBoolean(T.wireframerotation) && !inMotion)
+        setTimeout("_SET_IN_MOTION_", global.hoverDelayMs * 2, "!setInMotion");
+      break;
+    case 2: // trigger
+      setInMotion(true);
+      refresh(3, "timeoutThread set in motion");
+      break;
+    }
+  }
+
 }

Modified: trunk/Jmol/src/org/jmol/viewer/binding/Binding.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/binding/Binding.java 2013-08-15 15:22:47 UTC 
(rev 18575)
+++ trunk/Jmol/src/org/jmol/viewer/binding/Binding.java 2013-08-15 15:23:51 UTC 
(rev 18576)
@@ -195,14 +195,14 @@
   }
 
   @SuppressWarnings("unchecked")
-  public String getBindingInfo(String[] actionNames, String qualifiers) {
+  public String getBindingInfo(String[] actionInfo, String[] actionNames, 
String qualifiers) {
     SB sb = new SB();
     String qlow = (qualifiers == null || qualifiers.equalsIgnoreCase("all") ? 
null
         : qualifiers.toLowerCase());
-    JmolList<String>[] names = new JmolList[actionNames.length];
-    for (int i = 0; i < actionNames.length; i++)
+    JmolList<String>[] names = new JmolList[actionInfo.length];
+    for (int i = 0; i < actionInfo.length; i++)
       names[i] = (qlow == null
-          || actionNames[i].toLowerCase().indexOf(qlow) >= 0 ? new  
JmolList<String>()
+          || actionInfo[i].toLowerCase().indexOf(qlow) >= 0 ? new  
JmolList<String>()
           : null);
     for (Object obj: bindings.values()) {
       if (!Escape.isAI(obj))
@@ -213,20 +213,23 @@
         continue;
       names[i].addLast(getMouseActionName(info[0], true));
     }
-    for (int i = 0; i < actionNames.length; i++) {
+    for (int i = 0; i < actionInfo.length; i++) {
       int n;
       if (names[i] == null || (n = names[i].size()) == 0)
         continue;
       String[] list = names[i].toArray(new String[n]);
       Arrays.sort(list);
-      sb.append(actionNames[i]).append("\t");
+      sb.append((actionNames[i] + "                  ").substring(0, 
22)).append("\t");
       String sep = "";
+      int len = sb.length();
       for (int j = 0; j < n; j++) {
-        sb.append(sep);
-        sb.append(list[j].substring(7));
+        sb.append(sep).append(list[j].substring(7));
         sep = ", ";
       }
-      sb.appendC('\n');
+      len = sb.length() - len;
+      if (len < 20)
+        sb.append("                 ".substring(0, 20 - len));
+      sb.append("\t").append(actionInfo[i]).appendC('\n');
     }
     return sb.toString();
   }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to