Revision: 20447
          http://sourceforge.net/p/jmol/code/20447
Author:   hansonr
Date:     2015-04-12 12:21:49 +0000 (Sun, 12 Apr 2015)
Log Message:
-----------
Jmol.___JmolVersion="14.3.13_2015.04.12"

code: refactoring PT.isAxxx to AU.isAxxx  (array type testing)

Modified Paths:
--------------
    trunk/Jmol/src/javajs/util/AU.java
    trunk/Jmol/src/javajs/util/PT.java
    trunk/Jmol/src/org/jmol/awt/Image.java
    trunk/Jmol/src/org/jmol/io/FileReader.java
    trunk/Jmol/src/org/jmol/io/JmolUtil.java
    trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java
    trunk/Jmol/src/org/jmol/modelset/AtomCollection.java
    trunk/Jmol/src/org/jmol/modelset/LabelToken.java
    trunk/Jmol/src/org/jmol/script/SV.java
    trunk/Jmol/src/org/jmol/script/ScriptEval.java
    trunk/Jmol/src/org/jmol/script/ScriptManager.java
    trunk/Jmol/src/org/jmol/scriptext/IsoExt.java
    trunk/Jmol/src/org/jmol/scriptext/MathExt.java
    trunk/Jmol/src/org/jmol/shape/Measures.java
    trunk/Jmol/src/org/jmol/util/Escape.java
    trunk/Jmol/src/org/jmol/viewer/ActionManager.java
    trunk/Jmol/src/org/jmol/viewer/DataManager.java
    trunk/Jmol/src/org/jmol/viewer/FileManager.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties
    trunk/Jmol/src/org/jmol/viewer/OutputManager.java
    trunk/Jmol/src/org/jmol/viewer/PropertyManager.java
    trunk/Jmol/src/org/jmol/viewer/binding/Binding.java

Modified: trunk/Jmol/src/javajs/util/AU.java
===================================================================
--- trunk/Jmol/src/javajs/util/AU.java  2015-04-09 21:28:01 UTC (rev 20446)
+++ trunk/Jmol/src/javajs/util/AU.java  2015-04-12 12:21:49 UTC (rev 20447)
@@ -502,5 +502,130 @@
     return list.size();
   }
 
+  public static boolean isAS(Object x) {
+    /**
+     * 
+     * look also for array with first null element
+     * so untypable -- just call it a String[]
+     * (group3Lists, created in ModelLoader)
+     * 
+     * @j2sNative
+     *  return Clazz.isAS(x);
+     */
+    {
+    return x instanceof String[];
+    }
+  }
 
+  public static boolean isASS(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isASS(x);
+     */
+    {
+    return x instanceof String[][];
+    }
+  }
+
+  public static boolean isAP(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAP(x);
+     */
+    {
+    return x instanceof T3[];
+    }
+  }
+
+  public static boolean isAF(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAF(x);
+     */
+    {
+    return x instanceof float[];
+    }
+  }
+
+  public static boolean isAFloat(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAFloat(x);
+     */
+    {
+    return x instanceof Float[];
+    }
+  }
+
+  public static boolean isAD(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAF(x);
+     */
+    {
+    return x instanceof double[];
+    }
+  }
+
+  public static boolean isADD(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAFF(x);
+     */
+    {
+    return x instanceof double[][];
+    }
+  }
+
+  public static boolean isAB(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAI(x);
+     */
+    {
+    return x instanceof byte[];
+    }
+  }
+
+  public static boolean isAI(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAI(x);
+     */
+    {
+    return x instanceof int[];
+    }
+  }
+
+  public static boolean isAII(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAII(x);
+     */
+    {
+    return (x instanceof int[][]);
+    }
+  }
+
+  public static boolean isAFF(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAFF(x);
+     */
+    {
+    return x instanceof float[][];
+    }
+  }
+
+  public static boolean isAFFF(Object x) {
+    /**
+     * @j2sNative
+     *  return Clazz.isAFFF(x);
+     */
+    {
+    return x instanceof float[][][];
+    }
+  }
+
+
 }

Modified: trunk/Jmol/src/javajs/util/PT.java
===================================================================
--- trunk/Jmol/src/javajs/util/PT.java  2015-04-09 21:28:01 UTC (rev 20446)
+++ trunk/Jmol/src/javajs/util/PT.java  2015-04-12 12:21:49 UTC (rev 20447)
@@ -894,131 +894,6 @@
     return (infoType == null ? info : "\"" + infoType + "\": " + info);
   }
 
-  public static boolean isAS(Object x) {
-    /**
-     * 
-     * look also for array with first null element
-     * so untypable -- just call it a String[]
-     * (group3Lists, created in ModelLoader)
-     * 
-     * @j2sNative
-     *  return Clazz.isAS(x);
-     */
-    {
-    return x instanceof String[];
-    }
-  }
-
-  public static boolean isASS(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isASS(x);
-     */
-    {
-    return x instanceof String[][];
-    }
-  }
-
-  public static boolean isAP(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAP(x);
-     */
-    {
-    return x instanceof T3[];
-    }
-  }
-
-  public static boolean isAF(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAF(x);
-     */
-    {
-    return x instanceof float[];
-    }
-  }
-
-  public static boolean isAFloat(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAFloat(x);
-     */
-    {
-    return x instanceof Float[];
-    }
-  }
-
-  public static boolean isAD(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAF(x);
-     */
-    {
-    return x instanceof double[];
-    }
-  }
-
-  public static boolean isADD(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAFF(x);
-     */
-    {
-    return x instanceof double[][];
-    }
-  }
-
-  public static boolean isAB(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAI(x);
-     */
-    {
-    return x instanceof byte[];
-    }
-  }
-
-  public static boolean isAI(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAI(x);
-     */
-    {
-    return x instanceof int[];
-    }
-  }
-
-  public static boolean isAII(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAII(x);
-     */
-    {
-    return (x instanceof int[][]);
-    }
-  }
-
-  public static boolean isAFF(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAFF(x);
-     */
-    {
-    return x instanceof float[][];
-    }
-  }
-
-  public static boolean isAFFF(Object x) {
-    /**
-     * @j2sNative
-     *  return Clazz.isAFFF(x);
-     */
-    {
-    return x instanceof float[][][];
-    }
-  }
-
   public static String escapeUrl(String url) {
     url = rep(url, "\n", "");
     url = rep(url, "%", "%25");

Modified: trunk/Jmol/src/org/jmol/awt/Image.java
===================================================================
--- trunk/Jmol/src/org/jmol/awt/Image.java      2015-04-09 21:28:01 UTC (rev 
20446)
+++ trunk/Jmol/src/org/jmol/awt/Image.java      2015-04-12 12:21:49 UTC (rev 
20447)
@@ -48,7 +48,6 @@
 import javajs.api.PlatformViewer;
 import javajs.img.BMPDecoder;
 import javajs.util.AU;
-import javajs.util.PT;
 
 import javax.swing.JPanel;
 
@@ -69,7 +68,7 @@
       return Toolkit.getDefaultToolkit().createImage((URL) data);
     if (data instanceof String)
       return Toolkit.getDefaultToolkit().createImage((String) data);
-    if (PT.isAB(data)) {
+    if (AU.isAB(data)) {
       // for the SUN processor, we need to fix the CRC
       byte[] b = (byte[]) data;
       if (b.length < 3)

Modified: trunk/Jmol/src/org/jmol/io/FileReader.java
===================================================================
--- trunk/Jmol/src/org/jmol/io/FileReader.java  2015-04-09 21:28:01 UTC (rev 
20446)
+++ trunk/Jmol/src/org/jmol/io/FileReader.java  2015-04-12 12:21:49 UTC (rev 
20447)
@@ -34,6 +34,7 @@
 
 import javajs.api.GenericBinaryDocument;
 import javajs.api.ZInputStream;
+import javajs.util.AU;
 import javajs.util.PT;
 
 import org.jmol.api.Interface;
@@ -67,7 +68,7 @@
     nameAsGivenIn = nameAsGiven;
     fileTypeIn = type;
     this.reader = (reader instanceof BufferedReader ? reader : reader 
instanceof Reader ? new BufferedReader((Reader) reader) : null);
-    this.bytes = (PT.isAB(reader) ? (byte[]) reader : null);
+    this.bytes = (AU.isAB(reader) ? (byte[]) reader : null);
     this.htParams = htParams;
     this.isAppend = isAppend;
   }

Modified: trunk/Jmol/src/org/jmol/io/JmolUtil.java
===================================================================
--- trunk/Jmol/src/org/jmol/io/JmolUtil.java    2015-04-09 21:28:01 UTC (rev 
20446)
+++ trunk/Jmol/src/org/jmol/io/JmolUtil.java    2015-04-12 12:21:49 UTC (rev 
20447)
@@ -33,6 +33,7 @@
 import javajs.api.GenericPlatform;
 import javajs.api.GenericZipTools;
 import javajs.api.GenericBinaryDocument;
+import javajs.util.AU;
 import javajs.util.LimitedLineReader;
 import javajs.util.OC;
 import javajs.util.Rdr;
@@ -696,7 +697,7 @@
       boolean isBMP = fullPathName.toUpperCase().endsWith("BMP");
       if (fullPathName.indexOf("|") > 0 || isBMP) {
         Object ret = vwr.fm.getFileAsBytes(fullPathName, null);
-        if (!PT.isAB(ret))
+        if (!AU.isAB(ret))
           return "" + ret;
         image = (vwr.isJS ? ret : apiPlatform.createImage(ret));
       } else if (vwr.isJS) {

Modified: trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java
===================================================================
--- trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java  2015-04-09 
21:28:01 UTC (rev 20446)
+++ trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java  2015-04-12 
12:21:49 UTC (rev 20447)
@@ -311,7 +311,7 @@
       if (value == null) {
         params.title = null;
         return true;
-      } else if (PT.isAS(value)) {
+      } else if (AU.isAS(value)) {
         params.title = (String[]) value;
         for (int i = 0; i < params.title.length; i++)
           if (params.title[i].length() > 0)
@@ -612,7 +612,7 @@
     if ("contour" == propertyName) {
       params.isContoured = true;
       int n;
-      if (PT.isAF(value)) {
+      if (AU.isAF(value)) {
         // discrete values
         params.contoursDiscrete = (float[]) value;
         params.nContours = params.contoursDiscrete.length;
@@ -710,7 +710,7 @@
     if ("ellipsoid" == propertyName) {
       if (value instanceof P4)
         params.setEllipsoidP4((P4) value);
-      else if (PT.isAF(value))
+      else if (AU.isAF(value))
         params.setEllipsoidAF((float[]) value);
       else
         return true;

Modified: trunk/Jmol/src/org/jmol/modelset/AtomCollection.java
===================================================================
--- trunk/Jmol/src/org/jmol/modelset/AtomCollection.java        2015-04-09 
21:28:01 UTC (rev 20446)
+++ trunk/Jmol/src/org/jmol/modelset/AtomCollection.java        2015-04-12 
12:21:49 UTC (rev 20447)
@@ -462,7 +462,7 @@
       if ((nValues = v.size()) == 0)
         return;
       type = 1;
-    } else if (PT.isAP(xyzValues)) {
+    } else if (AU.isAP(xyzValues)) {
       values = (P3[]) xyzValues;
       if ((nValues = values.length) == 0)
         return;

Modified: trunk/Jmol/src/org/jmol/modelset/LabelToken.java
===================================================================
--- trunk/Jmol/src/org/jmol/modelset/LabelToken.java    2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/modelset/LabelToken.java    2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -30,6 +30,7 @@
 
 
 
+import javajs.util.AU;
 import javajs.util.Lst;
 import javajs.util.P3;
 import javajs.util.PT;
@@ -434,7 +435,7 @@
             lt.data = ((Object[]) lt.data)[1];
             if (lt.data instanceof String)
               lt.data = PT.split((String) lt.data, "\n");
-            if (!(PT.isAS(lt.data)))
+            if (!(AU.isAS(lt.data)))
               lt.data = null;
           }
           if (lt.data == null) {

Modified: trunk/Jmol/src/org/jmol/script/SV.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/SV.java      2015-04-09 21:28:01 UTC (rev 
20446)
+++ trunk/Jmol/src/org/jmol/script/SV.java      2015-04-12 12:21:49 UTC (rev 
20447)
@@ -273,27 +273,27 @@
     // rest are specific array types supported
     if (Escape.isAV(x))
       return getVariableAV((SV[]) x);
-    if (PT.isAI(x))
+    if (AU.isAI(x))
       return getVariableAI((int[]) x);
-    if (PT.isAB(x))
+    if (AU.isAB(x))
       return getVariableAB((byte[]) x);
-    if (PT.isAF(x))
+    if (AU.isAF(x))
       return getVariableAF((float[]) x);
-    if (PT.isAD(x))
+    if (AU.isAD(x))
       return getVariableAD((double[]) x);
-    if (PT.isAS(x))
+    if (AU.isAS(x))
       return getVariableAS((String[]) x);
-    if (PT.isAP(x))
+    if (AU.isAP(x))
       return getVariableAP((T3[]) x);
-    if (PT.isAII(x))
+    if (AU.isAII(x))
       return getVariableAII((int[][]) x);
-    if (PT.isAFF(x))
+    if (AU.isAFF(x))
       return getVariableAFF((float[][]) x);
-    if (PT.isASS(x))
+    if (AU.isASS(x))
       return getVariableASS((String[][]) x);
-    if (PT.isADD(x))
+    if (AU.isADD(x))
       return getVariableADD((double[][]) x);
-    if (PT.isAFloat(x))
+    if (AU.isAFloat(x))
       return newV(listf, x);
     return newS(x.toString());
   }
@@ -1283,7 +1283,7 @@
     for (int i = 1; i < format.length; i++) {
       Object ret = sprintf(PT.formatCheck("%" + format[i]),
           (i < args.length ? args[i] : null));
-      if (PT.isAS(ret)) {
+      if (AU.isAS(ret)) {
         String[] list = (String[]) ret;
         for (int j = 0; j < list.length; j++)
           sb.append(list[j]).append("\n");

Modified: trunk/Jmol/src/org/jmol/script/ScriptEval.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/ScriptEval.java      2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/script/ScriptEval.java      2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -62,6 +62,7 @@
 import org.jmol.util.Parser;
 
 import javajs.util.A4;
+import javajs.util.AU;
 import javajs.util.BArray;
 import javajs.util.Base64;
 import javajs.util.Measure;
@@ -4966,7 +4967,7 @@
     if (scriptLevel == 0 && !isAppend && (isConcat || nFiles < 2))
       vwr.showString((String) vwr.ms.getInfoM("modelLoadNote"), false);
     Object centroid = vwr.ms.getInfoM("centroidMinMax");
-    if (PT.isAI(centroid) && vwr.ms.ac > 0) {
+    if (AU.isAI(centroid) && vwr.ms.ac > 0) {
       BS bs = BSUtil.newBitSet2(isAppend ? ac0 : 0, vwr.ms.ac);
       vwr.ms.setCentroid(bs, (int[]) centroid);
     }

Modified: trunk/Jmol/src/org/jmol/script/ScriptManager.java
===================================================================
--- trunk/Jmol/src/org/jmol/script/ScriptManager.java   2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/script/ScriptManager.java   2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -27,6 +27,7 @@
 import java.io.BufferedReader;
 
 import javajs.api.ZInputStream;
+import javajs.util.AU;
 import javajs.util.Rdr;
 import javajs.util.Lst;
 import javajs.util.P3;
@@ -601,7 +602,7 @@
       return vwr.getModelAdapter().getFileTypeName(
           Rdr.getBR(zipDirectory));
     }
-    if (PT.isAS(br)) {
+    if (AU.isAS(br)) {
       return ((String[]) br)[0];
     }
     return null;

Modified: trunk/Jmol/src/org/jmol/scriptext/IsoExt.java
===================================================================
--- trunk/Jmol/src/org/jmol/scriptext/IsoExt.java       2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/scriptext/IsoExt.java       2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -3161,7 +3161,7 @@
       Object volume = getShapeProperty(JC.SHAPE_CONTACT, "volume");
       double v;
       boolean isFull = (displayType == T.full);
-      if (PT.isAD(volume)) {
+      if (AU.isAD(volume)) {
         double[] vs = (double[]) volume;
         v = 0;
         for (int i = 0; i < vs.length; i++)

Modified: trunk/Jmol/src/org/jmol/scriptext/MathExt.java
===================================================================
--- trunk/Jmol/src/org/jmol/scriptext/MathExt.java      2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/scriptext/MathExt.java      2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -2719,7 +2719,7 @@
     Lst<SV> sv = null;
     int ndata = 0;
     while (true) {
-      if (PT.isAF(floatOrSVArray)) {
+      if (AU.isAF(floatOrSVArray)) {
         data = (float[]) floatOrSVArray;
         ndata = data.length;
         if (ndata == 0)

Modified: trunk/Jmol/src/org/jmol/shape/Measures.java
===================================================================
--- trunk/Jmol/src/org/jmol/shape/Measures.java 2015-04-09 21:28:01 UTC (rev 
20446)
+++ trunk/Jmol/src/org/jmol/shape/Measures.java 2015-04-12 12:21:49 UTC (rev 
20447)
@@ -40,6 +40,7 @@
 import org.jmol.script.T;
 
 import javajs.awt.Font;
+import javajs.util.AU;
 import javajs.util.Lst;
 import javajs.util.PT;
 
@@ -443,7 +444,7 @@
       deleteI(((Integer)value).intValue());
     } else if (value instanceof String) {
       doAction(null, (String) value, T.delete);
-    } else if (PT.isAI(value)) {
+    } else if (AU.isAI(value)) {
       defineAll(Integer.MIN_VALUE, new Measurement().setPoints(ms, 
(int[])value, null, null), true, false, false);
     }
   }

Modified: trunk/Jmol/src/org/jmol/util/Escape.java
===================================================================
--- trunk/Jmol/src/org/jmol/util/Escape.java    2015-04-09 21:28:01 UTC (rev 
20446)
+++ trunk/Jmol/src/org/jmol/util/Escape.java    2015-04-12 12:21:49 UTC (rev 
20447)
@@ -28,6 +28,7 @@
 import java.util.Iterator;
 import java.util.Map;
 
+import javajs.util.AU;
 import javajs.util.Lst;
 import javajs.util.M34;
 import javajs.util.PT;
@@ -116,7 +117,7 @@
       return eP((T3) x);
     if (x instanceof P4)
       return eP4((P4) x);
-    if (PT.isAS(x))
+    if (AU.isAS(x))
       return eAS((String[]) x, true);
     if (x instanceof M34) 
       return PT.rep(x.toString(), "\t", ",\t");
@@ -400,7 +401,7 @@
       return packageReadable(name, null, PT.esc((String) info));
     if (info instanceof SV)
       return packageReadable(name, null, ((SV) info).escape());
-    if (PT.isAS(info)) {
+    if (AU.isAS(info)) {
       sb.append("[");
       int imax = ((String[]) info).length;
       for (int i = 0; i < imax; i++) {
@@ -410,7 +411,7 @@
       sb.append("]");
       return packageReadableSb(name, "String[" + imax + "]", sb);
     }
-    if (PT.isAI(info)) {
+    if (AU.isAI(info)) {
       sb.append("[");
       int imax = ((int[]) info).length;
       for (int i = 0; i < imax; i++) {
@@ -420,7 +421,7 @@
       sb.append("]");
       return packageReadableSb(name, "int[" + imax + "]", sb);
     }
-    if (PT.isAF(info)) {
+    if (AU.isAF(info)) {
       sb.append("[");
       int imax = ((float[]) info).length;
       for (int i = 0; i < imax; i++) {
@@ -430,7 +431,7 @@
       sb.append("]");
       return packageReadableSb(name, "float[" + imax + "]", sb);
     }
-    if (PT.isAD(info)) {
+    if (AU.isAD(info)) {
       sb.append("[");
       int imax = ((double[]) info).length;
       for (int i = 0; i < imax; i++) {
@@ -440,7 +441,7 @@
       sb.append("]");
       return packageReadableSb(name, "double[" + imax + "]", sb);
     }
-    if (PT.isAP(info)) {
+    if (AU.isAP(info)) {
       sb.append("[");
       int imax = ((T3[]) info).length;
       for (int i = 0; i < imax; i++) {
@@ -450,7 +451,7 @@
       sb.append("]");
       return packageReadableSb(name, "point3f[" + imax + "]", sb);
     }
-    if (PT.isASS(info)) {
+    if (AU.isASS(info)) {
       sb.append("[");
       int imax = ((String[][]) info).length;
       for (int i = 0; i < imax; i++) {
@@ -460,7 +461,7 @@
       sb.append("]");
       return packageReadableSb(name, "String[" + imax + "][]", sb);
     }
-    if (PT.isAII(info)) {
+    if (AU.isAII(info)) {
       sb.append("[");
       int imax = ((int[][]) info).length;
       for (int i = 0; i < imax; i++) {
@@ -470,7 +471,7 @@
       sb.append("]");
       return packageReadableSb(name, "int[" + imax + "][]", sb);
     }
-    if (PT.isAFF(info)) {
+    if (AU.isAFF(info)) {
       sb.append("[\n");
       int imax = ((float[][]) info).length;
       for (int i = 0; i < imax; i++) {
@@ -480,7 +481,7 @@
       sb.append("]");
       return packageReadableSb(name, "float[][]", sb);
     }
-    if (PT.isADD(info)) {
+    if (AU.isADD(info)) {
       sb.append("[\n");
       int imax = ((double[][]) info).length;
       for (int i = 0; i < imax; i++) {

Modified: trunk/Jmol/src/org/jmol/viewer/ActionManager.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/ActionManager.java   2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/viewer/ActionManager.java   2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -27,6 +27,7 @@
 import javajs.api.GenericPlatform;
 import javajs.api.EventManager;
 import javajs.awt.event.Event;
+import javajs.util.AU;
 import javajs.util.PT;
 import java.util.Map;
 
@@ -1411,7 +1412,7 @@
     Map<String, Object> ht = b.getBindings();
     String mkey = mouseAction + "\t";
     for (String key : ht.keySet()) {
-      if (key.indexOf(mkey) != 0 || !PT.isAS(obj = ht.get(key)))
+      if (key.indexOf(mkey) != 0 || !AU.isAS(obj = ht.get(key)))
         continue;
       String script = ((String[]) obj)[1];
       P3 nearestPoint = null;

Modified: trunk/Jmol/src/org/jmol/viewer/DataManager.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/DataManager.java     2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/viewer/DataManager.java     2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -122,8 +122,8 @@
     if (depth == JmolDataManager.DATA_TYPE_UNKNOWN)
       data[DATA_TYPE] = Integer
           .valueOf(depth = (val instanceof String ? 
JmolDataManager.DATA_TYPE_STRING
-              : PT.isAF(val) ? JmolDataManager.DATA_TYPE_AF
-                  : PT.isAFF(val) ? JmolDataManager.DATA_TYPE_AFF : PT
+              : AU.isAF(val) ? JmolDataManager.DATA_TYPE_AF
+                  : AU.isAFF(val) ? JmolDataManager.DATA_TYPE_AFF : AU
                       .isAFFF(val) ? JmolDataManager.DATA_TYPE_AFFF
                       : JmolDataManager.DATA_TYPE_UNKNOWN));
     if (data[DATA_SELECTION_MAP] != null && arrayCount > 0) {

Modified: trunk/Jmol/src/org/jmol/viewer/FileManager.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/FileManager.java     2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/viewer/FileManager.java     2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -316,7 +316,7 @@
 
   static DataReader newDataReader(Viewer vwr, Object data) {
     String reader = (data instanceof String ? "String"
-        : PT.isAS(data) ? "Array" 
+        : AU.isAS(data) ? "Array" 
         : data instanceof Lst<?> ? "List" : null);
     if (reader == null)
       return null;
@@ -450,7 +450,7 @@
             if (allowReader && !Rdr.isBase64(sb))
               return Rdr.getBR(sb.toString());
             bytes = Rdr.getBytesFromSB(sb);
-          } else if (PT.isAB(ret)) {
+          } else if (AU.isAB(ret)) {
             bytes = (byte[]) ret;
           }
           if (bytes != null)
@@ -534,7 +534,7 @@
                                                  boolean isBinary,
                                                  boolean doSpecialLoad) {
     Object data = cacheGet(name, false);
-    boolean isBytes = PT.isAB(data);
+    boolean isBytes = AU.isAB(data);
     byte[] bytes = (isBytes ? (byte[]) data : null);
     if (name.startsWith("cache://")) {
       if (data == null)
@@ -1307,7 +1307,7 @@
     Map<String, Integer> map = new Hashtable<String, Integer>();
     for (Map.Entry<String, Object> entry : cache.entrySet())
       map.put(entry.getKey(), Integer
-          .valueOf(PT.isAB(entry.getValue()) ? ((byte[]) entry
+          .valueOf(AU.isAB(entry.getValue()) ? ((byte[]) entry
               .getValue()).length : entry.getValue().toString().length()));
     return map;
   }

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -14,8 +14,12 @@
 
 TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT 
command for problems)
 
-Jmol.___JmolVersion="14.3.13_2015.04.09b"
+Jmol.___JmolVersion="14.3.13_2015.04.12"
 
+code: refactoring PT.isAxxx to AU.isAxxx  (array type testing)
+
+JmolVersion="14.3.13_2015.04.09b"
+
 feature update: EBI validation site updated from wwwdev.ebi to www.ebi
  -- for example, LOAD *1crn/val
 
@@ -418,7 +422,7 @@
   -- third parameter TRUE writes all trajectories
 
 bug fix: show mouse  fails in JavaScript
-  -- we cannot test using PT.isAI() in org.jmol.viewer.binding.Binding 
+  -- we cannot test using AU.isAI() in org.jmol.viewer.binding.Binding 
   -- because of a Java2Script compiler creates standard array [...] 
   -- from new int[] {....} whereas it should create Clazz.newArray() and fill 
it
 bug fix: writing of file formats was inconsistent between WRITE and data()  
(not fixed in 14.2)          

Modified: trunk/Jmol/src/org/jmol/viewer/OutputManager.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/OutputManager.java   2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/viewer/OutputManager.java   2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -14,6 +14,7 @@
 import org.jmol.java.BS;
 
 import javajs.api.GenericImageEncoder;
+import javajs.util.AU;
 import javajs.util.Rdr;
 import javajs.util.OC;
 import javajs.util.Lst;
@@ -308,10 +309,10 @@
     try {
       if (type.equals("Gif") && vwr.getTestFlag(2))
         params.put("reducedColors", Boolean.TRUE);
-      int w = objImage == null ? -1 : PT.isAI(objImage) ? ((Integer) params
+      int w = objImage == null ? -1 : AU.isAI(objImage) ? ((Integer) params
           .get("width")).intValue() : vwr.apiPlatform
           .getImageWidth(objImage);
-      int h = objImage == null ? -1 : PT.isAI(objImage) ? ((Integer) params
+      int h = objImage == null ? -1 : AU.isAI(objImage) ? ((Integer) params
           .get("height")).intValue() : vwr.apiPlatform
           .getImageHeight(objImage);
       params.put("imageWidth", Integer.valueOf(w));
@@ -347,7 +348,7 @@
     if (width < 0)
       return null;
     int[] pixels;
-    if (PT.isAI(objImage)) {
+    if (AU.isAI(objImage)) {
       pixels = (int[]) objImage;
     } else {
       /**
@@ -948,7 +949,7 @@
           // all remote files, and any file that was opened from a ZIP 
collection
           Object ret = (isSparDir ? spardirCache.get(name) : fm.getFileAsBytes(
               name, null));
-          if (!PT.isAB(ret))
+          if (!AU.isAB(ret))
             return (String) ret;
           newName = addPngFileBytes(name, (byte[]) ret, iFile, crcMap,
               isSparDir, newName, ptSlash, v);
@@ -1084,7 +1085,7 @@
         if (fnameShort == null)
           fnameShort = fname;
         if (data != null)
-          bytes = (PT.isAB(data) ? (byte[]) data : ((String) data).getBytes());
+          bytes = (AU.isAB(data) ? (byte[]) data : ((String) data).getBytes());
         if (bytes == null)
           bytes = (byte[]) fileNamesAndByteArrays.get(i + 2);
         String key = ";" + fnameShort + ";";

Modified: trunk/Jmol/src/org/jmol/viewer/PropertyManager.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/PropertyManager.java 2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/viewer/PropertyManager.java 2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -331,7 +331,7 @@
           return extractProperty(f, args, --ptr, null, true);
         return "";
       }
-      if (PT.isAI(property)) {
+      if (AU.isAI(property)) {
         int[] ilist = (int[]) property;
         if (pt < 0)
           pt += ilist.length;
@@ -339,7 +339,7 @@
           return Integer.valueOf(ilist[pt]);
         return "";
       }
-      if (PT.isAD(property)) {
+      if (AU.isAD(property)) {
         double[] dlist = (double[]) property;
         if (pt < 0)
           pt += dlist.length;
@@ -347,7 +347,7 @@
           return Double.valueOf(dlist[pt]);
         return "";
       }
-      if (PT.isAF(property)) {
+      if (AU.isAF(property)) {
         float[] flist = (float[]) property;
         if (pt < 0)
           pt += flist.length;
@@ -355,7 +355,7 @@
           return Float.valueOf(flist[pt]);
         return "";
       }
-      if (PT.isAII(property)) {
+      if (AU.isAII(property)) {
         int[][] iilist = (int[][]) property;
         if (pt < 0)
           pt += iilist.length;
@@ -363,7 +363,7 @@
           return extractProperty(iilist[pt], args, ptr, null, true);
         return "";
       }
-      if (PT.isAFF(property)) {
+      if (AU.isAFF(property)) {
         float[][] fflist = (float[][]) property;
         if (pt < 0)
           pt += fflist.length;
@@ -371,7 +371,7 @@
           return extractProperty(fflist[pt], args, ptr, null, true);
         return "";
       }
-      if (PT.isAS(property)) {
+      if (AU.isAS(property)) {
         String[] slist = (String[]) property;
         if (pt < 0)
           pt += slist.length;
@@ -1680,7 +1680,7 @@
     for (Object obj : am.b.getBindings().values()) {
       if (obj instanceof Boolean)
         continue;
-      if (PT.isAI(obj)) {
+      if (AU.isAI(obj)) {
         int[] binding = (int[]) obj;
         obj = new String[] { Binding.getMouseActionName(binding[0], false),
             ActionManager.getActionName(binding[1]) };

Modified: trunk/Jmol/src/org/jmol/viewer/binding/Binding.java
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/binding/Binding.java 2015-04-09 21:28:01 UTC 
(rev 20446)
+++ trunk/Jmol/src/org/jmol/viewer/binding/Binding.java 2015-04-12 12:21:49 UTC 
(rev 20447)
@@ -1,6 +1,7 @@
 package org.jmol.viewer.binding;
 
 import javajs.awt.event.Event;
+import javajs.util.AU;
 import javajs.util.Lst;
 import javajs.util.PT;
 import javajs.util.SB;
@@ -307,14 +308,14 @@
     Lst<String>[] names = new Lst[actionInfo.length];
     Lst<String[]> user = new Lst<String[]>();
     for (Object obj : bindings.values()) {
-      if (PT.isAS(obj)) {
+      if (AU.isAS(obj)) {
         String action = ((String[]) obj)[0];
         String script = ((String[]) obj)[1];
         if (qlow == null || qlow.indexOf("user") >= 0 || action.indexOf(qlow) 
>= 0 || script.indexOf(qlow) >= 0)
           user.addLast((String[]) obj);
       } else {
         
-        // we cannot test using PT.isAI() here because of a Java2Script 
compiler error
+        // we cannot test using AU.isAI() here because of a Java2Script 
compiler error
         // in relation to new int[] {.....}  BH  2015.02.03
         
         int[] info = (int[]) obj;

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


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to