From: <ha...@us...> - 2015-02-25 04:40:59
|
Revision: 20327 http://sourceforge.net/p/jmol/code/20327 Author: hansonr Date: 2015-02-25 04:40:52 +0000 (Wed, 25 Feb 2015) Log Message: ----------- Jmol.___JmolVersion="14.3.12_2015.02.25" new feature: show chemical drawing new feature: show drawing -- pops up window with drawing of model -- somewhat limited in scop and size, as it uses SMILES Modified Paths: -------------- trunk/Jmol/src/org/jmol/scriptext/CmdExt.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/src/org/jmol/scriptext/CmdExt.java =================================================================== --- trunk/Jmol/src/org/jmol/scriptext/CmdExt.java 2015-02-25 04:08:47 UTC (rev 20326) +++ trunk/Jmol/src/org/jmol/scriptext/CmdExt.java 2015-02-25 04:40:52 UTC (rev 20327) @@ -3720,7 +3720,7 @@ switch (tok) { case T.drawing: if (msg.length() > 0) { - vwr.show2D(msg); + vwr.fm.loadImage(vwr.setLoadFormat("_" + msg, '2', false), "\1" + msg); return; } msg = "Could not show drawing -- Either insufficient atoms are selected or the model is a PDB file."; Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-02-25 04:08:47 UTC (rev 20326) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-02-25 04:40:52 UTC (rev 20327) @@ -14,8 +14,16 @@ TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT command for problems) -Jmol.___JmolVersion="14.3.12_2015.02.24" +Jmol.___JmolVersion="14.3.12_2015.02.25" +new feature: show chemical drawing +new feature: show drawing + -- pops up window with drawing of model + -- somewhat limited in scop and size, as it uses SMILES + + +JmolVersion="14.3.12_2015.02.24" + new feature: show IMAGE -- pops up a frame with the current image -- allows "Save As..." @@ -48,7 +56,7 @@ bug fix: minimizer treats hydrogen bonds as covalent single bonds -code: javajs.img.bMPDecoder +code: javajs.img.BMPDecoder code: org.openscience.jmol.app.jmolpanel.ImageDialog JmolVersion="14.3.12_2015.02.19" Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2015-02-25 04:08:47 UTC (rev 20326) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2015-02-25 04:40:52 UTC (rev 20327) @@ -7579,10 +7579,6 @@ showUrl(g.helpPath + what); } - public void show2D(String smiles) { - showUrl((String) setLoadFormat("_" + smiles, '2', false)); - } - public String getChemicalInfo(String smiles, T t) { String info = null; char type = '/'; @@ -7602,14 +7598,23 @@ case T.name: type = 'N'; break; + case T.image: + type = '2'; + break; default: info = SV.sValue(t); + if (info.equalsIgnoreCase("drawing") || info.equalsIgnoreCase("image")) + type = '2'; // the following should not be necessary // but an NCI server fault on 3/29/2014 required this //if (info.equals("sdf")) //info = "file?format=sdf"; } String s = (String) setLoadFormat("_" + smiles, type, false); + if (type == '2') { + fm.loadImage(s, "\1" + smiles); + return s; + } if (type == '/') s += PT.rep(info, " ", "%20"); return getFileAsString4(s, -1, false, false, false, "file"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |