From: <ha...@us...> - 2007-04-18 05:54:29
|
Revision: 7434 http://svn.sourceforge.net/jmol/?rev=7434&view=rev Author: hansonr Date: 2007-04-17 22:54:27 -0700 (Tue, 17 Apr 2007) Log Message: ----------- Java 1.1 Vector methods instated Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java trunk/Jmol/src/org/jmol/adapter/smarter/CsfReader.java trunk/Jmol/src/org/jmol/adapter/smarter/GamessReader.java trunk/Jmol/src/org/jmol/adapter/smarter/GaussianReader.java trunk/Jmol/src/org/jmol/adapter/smarter/MopacDataReader.java trunk/Jmol/src/org/jmol/adapter/smarter/MopacGraphfReader.java trunk/Jmol/src/org/jmol/adapter/smarter/MopacReader.java trunk/Jmol/src/org/jmol/adapter/smarter/PsiReader.java trunk/Jmol/src/org/jmol/adapter/smarter/SpartanArchive.java trunk/Jmol/src/org/jmol/adapter/smarter/WebMOReader.java trunk/Jmol/src/org/jmol/util/CommandHistory.java trunk/Jmol/src/org/jmol/util/CompoundDocument.java trunk/Jmol/src/org/jmol/viewer/Compiler.java trunk/Jmol/src/org/jmol/viewer/Dipoles.java trunk/Jmol/src/org/jmol/viewer/Draw.java trunk/Jmol/src/org/jmol/viewer/Eval.java trunk/Jmol/src/org/jmol/viewer/Frame.java trunk/Jmol/src/org/jmol/viewer/Isosurface.java trunk/Jmol/src/org/jmol/viewer/Measurement.java trunk/Jmol/src/org/jmol/viewer/Measures.java trunk/Jmol/src/org/jmol/viewer/Mmset.java trunk/Jmol/src/org/jmol/viewer/ModelManager.java trunk/Jmol/src/org/jmol/viewer/ScriptManager.java trunk/Jmol/src/org/jmol/viewer/StatusManager.java Modified: trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollection.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -679,7 +679,7 @@ trajectory = new Point3f[atomCount]; for (int i = 0; i < atomCount; i++) trajectory[i] = new Point3f(atoms[i]); - trajectories.add(trajectory); + trajectories.addElement(trajectory); nTrajectories++; //System.out.println(" nTrajectories:" + nTrajectories + " coord 4: " + trajectory[4]); } Modified: trunk/Jmol/src/org/jmol/adapter/smarter/CsfReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/CsfReader.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/CsfReader.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -558,7 +558,7 @@ System.out.print(" " + list[iMo][i]); System.out.println(); */ - orbitals.add(mo); + orbitals.addElement(mo); } setMOs("eV"); } @@ -634,10 +634,10 @@ } slater.put("gaussianPtr", new Integer(gaussianCount)); slater.put("nGaussians", new Integer(nZ)); - sdata.add(slater); + sdata.addElement(slater); gaussianCount += nZ; for (int i = 0; i < nZ; i++) - gdata.add(new float[] {zetas[ipt][i], contractionCoefs[ipt][i]}); + gdata.addElement(new float[] {zetas[ipt][i], contractionCoefs[ipt][i]}); } } float[][] garray = new float[gaussianCount][]; Modified: trunk/Jmol/src/org/jmol/adapter/smarter/GamessReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/GamessReader.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/GamessReader.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -200,7 +200,7 @@ if (!tokens[0].equals(thisShell)) { if (slater != null) { slater.put("nGaussians", new Integer(nGaussians)); - sdata.add(slater); + sdata.addElement(slater); } thisShell = tokens[0]; shellCount++; @@ -222,15 +222,15 @@ if (i >= 3)i += 2; j++; } - gdata.add(s); + gdata.addElement(s); } else { - gdata.add(tokens); + gdata.addElement(tokens); } } } if (slater != null) { slater.put("nGaussians", new Integer(nGaussians)); - sdata.add(slater); + sdata.addElement(slater); } float[][] garray = new float[gaussianCount][]; for (int i = 0; i < gaussianCount; i++) { @@ -278,7 +278,7 @@ for (int j = coefs.length; --j >= 0;) coefs[j] = parseFloat((String) data[i].get(j)); mos[i].put("coefficients", coefs); - orbitals.add(mos[i]); + orbitals.addElement(mos[i]); } nThisLine = 0; continue; @@ -302,7 +302,7 @@ } int nSkip = tokens.length - nThisLine; for (int i = 0; i < nThisLine; i++) - data[i].add(tokens[i + nSkip]); + data[i].addElement(tokens[i + nSkip]); } Logger.debug(orbitals.size() + " molecular orbitals read in model " + modelNumber); } Modified: trunk/Jmol/src/org/jmol/adapter/smarter/GaussianReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/GaussianReader.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/GaussianReader.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -335,10 +335,10 @@ int nGaussians = parseInt(tokens[5]); slater.put("gaussianPtr", new Integer(gaussianCount)); // or parseInt(tokens[7]) - 1 slater.put("nGaussians", new Integer(nGaussians)); - sdata.add(slater); + sdata.addElement(slater); gaussianCount += nGaussians; for (int i = 0; i < nGaussians; i++) - gdata.add(getTokens(readLine())); + gdata.addElement(getTokens(readLine())); } if (atomCount == -1) atomCount = 0; @@ -395,7 +395,7 @@ } try { for (int i = 0; i < nThisLine; i++) - data[i].add(tokens[i + ptData]); + data[i].addElement(tokens[i + ptData]); } catch (Exception e) { Logger.error("Error reading Gaussian file Molecular Orbitals at line: " + line); @@ -411,7 +411,7 @@ for (int j = coefs.length; --j >= 0;) coefs[j] = parseFloat((String) data[i].get(j)); mos[i].put("coefficients", coefs); - orbitals.add(mos[i]); + orbitals.addElement(mos[i]); } } Modified: trunk/Jmol/src/org/jmol/adapter/smarter/MopacDataReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/MopacDataReader.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/MopacDataReader.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -63,8 +63,8 @@ void addSlater(int i0, int i1, int i2, int i3, int i4, float zeta, float coef) { //System.out.println (i0 + " " + i1 + " " + i2 + " " + i3 + " " + i4 + " " + zeta + " " + coef); - intinfo.add(new int[] {i0, i1, i2, i3, i4}); - floatinfo.add(new float[] {zeta, coef}); + intinfo.addElement(new int[] {i0, i1, i2, i3, i4}); + floatinfo.addElement(new float[] {zeta, coef}); } void setSlaters() { Modified: trunk/Jmol/src/org/jmol/adapter/smarter/MopacGraphfReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/MopacGraphfReader.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/MopacGraphfReader.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -197,7 +197,7 @@ mo.put("energy", new Float(values[0])); mo.put("occupancy", new Integer((int) values[1])); mo.put("coefficients", list2[iMo]); - orbitals.add(mo); + orbitals.addElement(mo); } setMOs("eV"); } Modified: trunk/Jmol/src/org/jmol/adapter/smarter/MopacReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/MopacReader.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/MopacReader.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -218,7 +218,7 @@ Hashtable info = new Hashtable(); info.put("freq", new Float(freq)); info.put("label", ""); - freqs.add(info); + freqs.addElement(info); baseAtomIndex = atomSetCollection.atomCount; atomSetCollection.cloneLastAtomSet(); Atom[] atoms = atomSetCollection.atoms; @@ -232,12 +232,12 @@ float dz = parseFloat(data[dataPt++][i + 1]); atoms[baseAtomIndex + iatom].addVibrationVector(dx, dy, dz); Vector vibatom = new Vector(); - vibatom.add(new Float(dx)); - vibatom.add(new Float(dy)); - vibatom.add(new Float(dz)); - vib.add(vibatom); + vibatom.addElement(new Float(dx)); + vibatom.addElement(new Float(dy)); + vibatom.addElement(new Float(dz)); + vib.addElement(vibatom); } - vibrations.add(vib); + vibrations.addElement(vib); } } atomSetCollection.setAtomSetCollectionAuxiliaryInfo("VibFreqs", freqs); Modified: trunk/Jmol/src/org/jmol/adapter/smarter/PsiReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/PsiReader.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/PsiReader.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -199,7 +199,7 @@ } if (ipt > 1) { if (slater != null) - sdata.add(slater); + sdata.addElement(slater); slater = new Hashtable(); slater.put("atomCenter", new Integer(atomCenter)); shellCount++; @@ -207,13 +207,13 @@ slater.put("gaussianPtr", new Integer(gaussianCount)); } nGaussians++; - gdata.add(new String[] { tokens[ipt], tokens[ipt + 1] }); + gdata.addElement(new String[] { tokens[ipt], tokens[ipt + 1] }); slater.put("nGaussians", new Integer(nGaussians)); } - sdata.add(slater); + sdata.addElement(slater); gaussianCount += nGaussians; if (slater != null) - sdata.add(slater); + sdata.addElement(slater); readLine(); } float[][] garray = new float[gaussianCount][]; @@ -354,7 +354,7 @@ } try { for (int i = 0; i < nThisLine; i++) - data[i].add(tokens[i + ptData]); + data[i].addElement(tokens[i + ptData]); } catch (Exception e) { Logger.error("Error reading Psi3 file molecular orbitals at line: " + line); @@ -370,7 +370,7 @@ for (int j = coefs.length; --j >= 0;) coefs[j] = parseFloat((String) data[i].get(j)); mos[i].put("coefficients", coefs); - orbitals.add(mos[i]); + orbitals.addElement(mos[i]); } } } Modified: trunk/Jmol/src/org/jmol/adapter/smarter/SpartanArchive.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/SpartanArchive.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/SpartanArchive.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -232,7 +232,7 @@ slater.put("basisType", basisType); slater.put("nGaussians", new Integer(nGaussians)); slater.put("gaussianPtr", new Integer(gaussianPtr)); - sdata.add(slater); + sdata.addElement(slater); } for (int i = 0; i < gaussianCount; i++) { float alpha = parseFloat(readLine()); @@ -293,7 +293,7 @@ mo.put("energy", new Float(energies[i])); //mo.put("occupancy", new Integer(-1)); mo.put("coefficients", coefficients[i]); - orbitals.add(mo); + orbitals.addElement(mo); } if (Logger.isActiveLevel(Logger.LEVEL_DEBUG)) { Logger.debug(orbitals.size() + " molecular orbitals read"); @@ -350,19 +350,19 @@ && !line.substring(0, 3).equals("END")) { if (isString) { value = getQuotedString("\""); - vector.add(value); + vector.addElement(value); } else { String tokens2[] = getTokens(); for (int i = 0; i < tokens2.length; i++) { if (isArray) { - atomInfo.add(new Float(parseFloat(tokens2[i]))); + atomInfo.addElement(new Float(parseFloat(tokens2[i]))); if ((i + 1) % nValues == 0) { - vector.add(atomInfo); + vector.addElement(atomInfo); atomInfo = new Vector(); } } else { value = new Float(parseFloat(tokens2[i])); - vector.add(value); + vector.addElement(value); } } } @@ -403,7 +403,7 @@ if (line.length() > 15 && !(label = line.substring(15, line.length())).equals("???")) info.put("label", label); - freqs.add(info); + freqs.addElement(info); atomSetCollection.setAtomSetName(label + " " + freq + " cm^-1"); atomSetCollection.setAtomSetProperty(SmarterJmolAdapter.PATH_KEY, "Frequencies"); @@ -422,20 +422,20 @@ for (int i = 0; i < tokens2.length; i++) { float f = parseFloat(tokens2[i]); atomInfo[i % nValues] = f; - vibatom.add(new Float(f)); + vibatom.addElement(new Float(f)); if ((i + 1) % nValues == 0) { //Logger.debug(ifreq + " atom " + iatom + "/" + atomCount // + " vectors: " + atomInfo[0] + " " + atomInfo[1] + " " // + atomInfo[2]); atoms[iatom] .addVibrationVector(atomInfo[0], atomInfo[1], atomInfo[2]); - vib.add(vibatom); + vib.addElement(vibatom); vibatom = new Vector(); ++iatom; } } if (iatom % atomCount == 0) { - vibrations.add(vib); + vibrations.addElement(vib); vib = new Vector(); if (++ifreq == frequencyCount) break; ///loop exit Modified: trunk/Jmol/src/org/jmol/adapter/smarter/WebMOReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/WebMOReader.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/adapter/smarter/WebMOReader.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -222,10 +222,10 @@ float[] data = new float[nData]; for (int d = 0; d < nData; d++) data[d] = parseFloat(strData[d]); - gdata.add(data); + gdata.addElement(data); gaussianPtr++; } - sdata.add(slater); + sdata.addElement(slater); } float[][] garray = new float[gaussianPtr][]; for (int i = 0; i < gaussianPtr; i++) @@ -277,7 +277,7 @@ if (line.length() == 0) continue; String[] tokens = getTokens(); - data.add(tokens[1]); + data.addElement(tokens[1]); } float[] coefs = new float[data.size()]; for (int i = data.size(); --i >= 0;) @@ -285,7 +285,7 @@ mo.put("energy", new Float(energy)); mo.put("occupancy", new Integer(occupancy)); mo.put("coefficients", coefs); - orbitals.add(mo); + orbitals.addElement(mo); setMOs("eV"); } } Modified: trunk/Jmol/src/org/jmol/util/CommandHistory.java =================================================================== --- trunk/Jmol/src/org/jmol/util/CommandHistory.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/util/CommandHistory.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -86,7 +86,7 @@ this.maxSize = maxSize; commandList = new Vector(); nextCommand = 0; - commandList.add(""); + commandList.addElement(""); cursorPos = 0; } @@ -101,7 +101,7 @@ if (maxSize < 2) maxSize = 2; while (nextCommand > maxSize) { - commandList.remove(0); + commandList.removeElementAt(0); nextCommand--; } if (nextCommand > maxSize) @@ -221,7 +221,7 @@ if (n < 0 || n >= nextCommand) return ""; String str = (String) commandList.get(n); - commandList.remove(n); + commandList.removeElementAt(n); nextCommand--; return str; } @@ -232,20 +232,20 @@ * @param command the String value of a command. */ private void addCommandLine(String command) { - if(command == null || command.length() == 0) + if (command == null || command.length() == 0) return; if (command.endsWith(NOHISTORYLINE_FLAG)) return; if (nextCommand >= maxSize) { - commandList.remove(0); + commandList.removeElementAt(0); nextCommand = maxSize - 1; } - commandList.add(nextCommand, command); + commandList.insertElementAt(command, nextCommand); nextCommand++; cursorPos = nextCommand; - commandList.add(nextCommand, ""); + commandList.insertElementAt("", nextCommand); //for (int i = 0; i < nextCommand; i++) - //System.out.println("HISTORY:" + i+" "+commandList.get(i)); + //System.out.println("HISTORY:" + i+" "+commandList.get(i)); } } Modified: trunk/Jmol/src/org/jmol/util/CompoundDocument.java =================================================================== --- trunk/Jmol/src/org/jmol/util/CompoundDocument.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/util/CompoundDocument.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -349,7 +349,7 @@ thisEntry = new CmpDocDirectoryEntry(); thisEntry.readData(); if (thisEntry.lenStream > 0) - directory.add(thisEntry); + directory.addElement(thisEntry); if (thisEntry.entryType == 5) rootEntry = thisEntry; } Modified: trunk/Jmol/src/org/jmol/viewer/Compiler.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Compiler.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Compiler.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -224,7 +224,7 @@ && tokAttr(tokCommand, Token.setparam)) { tokenCommand = Token.getTokenFromName("set"); tokCommand = Token.set; - ltoken.add(0, tokenCommand); + ltoken.insertElementAt(tokenCommand, 0); cchToken = 1; continue; } @@ -394,8 +394,8 @@ // set x or x = if (tok == Token.opEQ) { token = (Token) ltoken.get(0); - ltoken.remove(0); - ltoken.add(Token.getTokenFromName("set")); + ltoken.removeElementAt(0); + ltoken.addElement(Token.getTokenFromName("set")); tok = token.tok; tokCommand = Token.set; } @@ -431,7 +431,7 @@ } else if (nTokens == 2 && tok == Token.opEQ) { // we are looking at @x =.... just insert a SET command // and ignore the =. It's the same as set @x ... - ltoken.add(0, Token.getTokenFromName("set")); + ltoken.insertElementAt(Token.getTokenFromName("set"), 0); continue; } else { // we are looking at the expression Modified: trunk/Jmol/src/org/jmol/viewer/Dipoles.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Dipoles.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Dipoles.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -463,14 +463,14 @@ atomInfo = new Hashtable(); viewer.getAtomIdentityInfo(dipole.atoms[0].atomIndex, atomInfo); Vector atoms = new Vector(); - atoms.add(atomInfo); + atoms.addElement(atomInfo); atomInfo = new Hashtable(); viewer.getAtomIdentityInfo(dipole.atoms[1].atomIndex, atomInfo); - atoms.add(atomInfo); + atoms.addElement(atomInfo); info.put("atoms", atoms); info.put("magnitude", new Float(dipole.vector.length())); } - V.add(info); + V.addElement(info); } return V; } Modified: trunk/Jmol/src/org/jmol/viewer/Draw.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Draw.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Draw.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -895,14 +895,14 @@ mInfo.put("axis", mesh.axes[k]); Vector v = new Vector(); for (int ipt = 0; ipt < nPoints; ipt++) - v.add(mesh.vertices[mesh.polygonIndexes[k][ipt]]); + v.addElement(mesh.vertices[mesh.polygonIndexes[k][ipt]]); mInfo.put("vertices", v); if (mesh.drawTypes[k] == DrawMesh.DRAW_LINE) { float d = mesh.vertices[mesh.polygonIndexes[k][0]] .distance(mesh.vertices[mesh.polygonIndexes[k][1]]); mInfo.put("length_Ang", new Float(d)); } - m.add(mInfo); + m.addElement(mInfo); } info.put("models", m); } else { @@ -912,13 +912,13 @@ info.put("axis", mesh.axis); Vector v = new Vector(); for (int j = 0; j < mesh.vertexCount; j++) - v.add(mesh.vertices[j]); + v.addElement(mesh.vertices[j]); info.put("vertices", v); if (mesh.drawType == DrawMesh.DRAW_LINE) info.put("length_Ang", new Float(mesh.vertices[0] .distance(mesh.vertices[1]))); } - V.add(info); + V.addElement(info); } return V; } Modified: trunk/Jmol/src/org/jmol/viewer/Eval.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Eval.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Eval.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -167,7 +167,7 @@ int atomCount = viewer.getAtomCount(); for (int i = 0; i < atomCount; i++) if (bs.get(i)) - V.add(new Integer(i)); + V.addElement(new Integer(i)); return V; } @@ -337,10 +337,10 @@ if (errorMessage != null) return errorMessage; Vector info = new Vector(); - info.add(compiler.getScript()); - info.add(compiler.getAatokenCompiled()); - info.add(compiler.getLineNumbers()); - info.add(compiler.getLineIndices()); + info.addElement(compiler.getScript()); + info.addElement(compiler.getAatokenCompiled()); + info.addElement(compiler.getLineNumbers()); + info.addElement(compiler.getLineIndices()); return info; } @@ -2705,7 +2705,7 @@ } Vector v = new Vector(); while (isCenterParameter(i + 1)) { - v.add(centerParameter(++i)); + v.addElement(centerParameter(++i)); i = iToken; } if (v.size() > 0) { @@ -3803,7 +3803,7 @@ if (isAll) { if (++expressionCount > 4) badArgumentCount(); - monitorExpressions.add(bs); + monitorExpressions.addElement(bs); nAtoms = expressionCount; } else { if (++nAtoms > 4) @@ -8349,11 +8349,11 @@ Vector v = new Vector(); if (getToken(++i).tok != Token.string) invalidArgument(); - v.add(statement[i++].value); - v.add(getPoint3f(i, false)); - v.add(getPoint4f(++iToken)); - v.add(getPoint4f(++iToken)); - v.add(getPoint4f(++iToken)); + v.addElement(statement[i++].value); + v.addElement(getPoint3f(i, false)); + v.addElement(getPoint4f(++iToken)); + v.addElement(getPoint4f(++iToken)); + v.addElement(getPoint4f(++iToken)); i = iToken; propertyName = "functionXY"; propertyValue = v; Modified: trunk/Jmol/src/org/jmol/viewer/Frame.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Frame.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Frame.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -1530,7 +1530,7 @@ void rebond() { // from eval "connect" or from app preferences panel - stateScripts.add("connect;"); + stateScripts.addElement("connect;"); deleteAllBonds(); autoBond(null, null, null); } @@ -1784,7 +1784,7 @@ script = "frame " + (iFrame < 0 ? "" + iFrame : getModelName(-iFrame)) + ";\n" + script; } - stateScripts.add(script); + stateScripts.addElement(script); } int makeConnections(float minDistance, float maxDistance, short order, @@ -1800,7 +1800,7 @@ stateScript += JmolConstants.getBondOrderNameFromOrder(order) + " " + JmolConstants.connectOperationName(connectOperation); stateScript += ";"; - stateScripts.add(stateScript); + stateScripts.addElement(stateScript); } if (connectOperation == JmolConstants.CONNECT_DELETE_BONDS) return deleteConnections(minDistance, maxDistance, order, bsA, bsB, @@ -2808,7 +2808,7 @@ bsTemp = (BitSet) bsAtoms.clone(); bsTemp.and(molecules[i].atomList); if (bsTemp.length() > 0) - V.add(molecules[i].getInfo()); + V.addElement(molecules[i].getInfo()); } return V; } Modified: trunk/Jmol/src/org/jmol/viewer/Isosurface.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Isosurface.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Isosurface.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -6200,7 +6200,7 @@ info.put("modelIndex", new Integer(mesh.modelIndex)); if (mesh.title != null) info.put("title", mesh.title); - V.add(info); + V.addElement(info); } return V; } Modified: trunk/Jmol/src/org/jmol/viewer/Measurement.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Measurement.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Measurement.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -289,8 +289,8 @@ Vector toVector() { Vector V = new Vector(); - for (int i = 0; i < count + 1; i++ ) V.add(new Integer(countPlusIndices[i])); - V.add(strMeasurement); + for (int i = 0; i < count + 1; i++ ) V.addElement(new Integer(countPlusIndices[i])); + V.addElement(strMeasurement); return V; } } Modified: trunk/Jmol/src/org/jmol/viewer/Measures.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Measures.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Measures.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -243,7 +243,7 @@ int nPoints = atomCountPlusIndices[0]; for (int i = 1; i <= nPoints; i++) { Atom atom = frame.atoms[atomCountPlusIndices[i]]; - measureList.add(viewer.getAtomBits("atomno", atom.getAtomNumber())); + measureList.addElement(viewer.getAtomBits("atomno", atom.getAtomNumber())); } define(measureList, isDelete, false, false); return; @@ -384,7 +384,7 @@ private Vector getAllInfo() { Vector info = new Vector(); for (int i = 0; i< measurementCount; i++) { - info.add(getInfo(i)); + info.addElement(getInfo(i)); } return info; } @@ -413,7 +413,7 @@ atomInfo.put("_ipt", new Integer(atom.atomIndex)); atomInfo.put("atomno", new Integer(atom.getAtomNumber())); atomInfo.put("info", atom.getInfo()); - atomsInfo.add(atomInfo); + atomsInfo.addElement(atomInfo); } info.put("atoms", atomsInfo); return info; Modified: trunk/Jmol/src/org/jmol/viewer/Mmset.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Mmset.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/Mmset.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -508,7 +508,7 @@ Vector getStructureInfo() { Vector info = new Vector(); for (int i = 0; i < structureCount; i++) - info.add(structures[i].toHashtable()); + info.addElement(structures[i].toHashtable()); return info; } Modified: trunk/Jmol/src/org/jmol/viewer/ModelManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/ModelManager.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/ModelManager.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -899,7 +899,7 @@ props = viewer.getModelProperties(i); if (props != null) model.put("modelProperties", props); - models.add(model); + models.addElement(model); } info.put("models",models); return info; @@ -913,7 +913,7 @@ int modelCount = viewer.getModelCount(); for (int i = 0; i < modelCount; ++i) { Hashtable modelinfo = getModelAuxiliaryInfo(i); - models.add(modelinfo); + models.addElement(modelinfo); } info.put("models",models); return info; @@ -924,7 +924,7 @@ int atomCount = viewer.getAtomCount(); for (int i = 0; i < atomCount; i++) if (bs.get(i)) - V.add(getAtomInfoLong(i)); + V.addElement(getAtomInfoLong(i)); return V; } @@ -1000,7 +1000,7 @@ for (int i = 0; i < bondCount; i++) if (bs.get(frame.getBondAt(i).getAtom1().atomIndex) && bs.get(frame.getBondAt(i).getAtom2().atomIndex)) - V.add(getBondInfo(i)); + V.addElement(getBondInfo(i)); return V; } @@ -1068,7 +1068,7 @@ if (info.size() > 0) { modelInfo.put("modelIndex",new Integer(i)); modelInfo.put("chains",info); - modelVector.add(modelInfo); + modelVector.addElement(modelInfo); } } finalInfo.put("models",modelVector); @@ -1089,14 +1089,14 @@ Vector3f[] vectors = polymer.wingVectors; for (int j = 0; j < polymer.monomerCount; j++) if (bs.get(polymer.monomers[j].getLeadAtomIndex())) { - vList.add(new Point3f[] { points[j], new Point3f(vectors[j]) }); + vList.addElement(new Point3f[] { points[j], new Point3f(vectors[j]) }); last = j; } else if (last != Integer.MAX_VALUE - 1) { - vList.add(new Point3f[] { points[j], new Point3f(vectors[j]) }); + vList.addElement(new Point3f[] { points[j], new Point3f(vectors[j]) }); last = Integer.MAX_VALUE - 1; } if (last + 1 < polymer.monomerCount) - vList.add(new Point3f[] { points[last + 1], + vList.addElement(new Point3f[] { points[last + 1], new Point3f(vectors[last + 1]) }); } } @@ -1124,11 +1124,11 @@ infoGroup.put("atomInfo1", getAtomInfo(group.firstAtomIndex)); infoGroup.put("atomInfo2", getAtomInfo(group.lastAtomIndex)); infoGroup.put("visibilityFlags", new Integer(group.shapeVisibilityFlags)); - infoChain.add(infoGroup); + infoChain.addElement(infoGroup); } if (! infoChain.isEmpty()) { arrayName.put("residues",infoChain); - infoChains.add(arrayName); + infoChains.addElement(arrayName); } } return infoChains; @@ -1145,12 +1145,12 @@ for (int ip = 0; ip < polymerCount; ip++) { Hashtable polyInfo = getPolymerInfo(i, ip, bs); if (! polyInfo.isEmpty()) - info.add(polyInfo); + info.addElement(polyInfo); } if (info.size() > 0) { modelInfo.put("modelIndex",new Integer(i)); modelInfo.put("polymers",info); - modelVector.add(modelInfo); + modelVector.addElement(modelInfo); } } finalInfo.put("models",modelVector); @@ -1189,7 +1189,7 @@ if (bs.get(polymer.monomers[i].getLeadAtomIndex())) { Hashtable monomerInfo = polymer.monomers[i].getMyInfo(); monomerInfo.put("monomerIndex", new Integer(i)); - info.add(monomerInfo); + info.addElement(monomerInfo); sequence += polymer.monomers[i].getGroup1(); } } @@ -1232,6 +1232,8 @@ for (int i = 1; i < JmolConstants.SHAPE_MAX; i++) if (frame.shapes[i] != null) frame.shapes[i].setVisibilityFlags(bs); + //s(bs); + // // BALLS sets the JmolConstants.ATOM_IN_MODEL flag. frame.shapes[JmolConstants.SHAPE_BALLS] .setVisibilityFlags(bs); @@ -1369,7 +1371,7 @@ } void setAtomCoord(int atomIndex, float x, float y, float z) { - frame.setAtomCoord(atomIndex,x,y,z); + frame.setAtomCoord(atomIndex,x,y,z); } void setAtomCoordRelative(int atomIndex, float x, float y, float z) { Modified: trunk/Jmol/src/org/jmol/viewer/ScriptManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/ScriptManager.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/ScriptManager.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -56,17 +56,17 @@ String statusList, boolean isScriptFile, boolean isQuiet) { Vector scriptItem = new Vector(); - scriptItem.add(strScript); - scriptItem.add(statusList); - scriptItem.add(returnType); - scriptItem.add(isScriptFile ? Boolean.TRUE : Boolean.FALSE); - scriptItem.add(isQuiet ? Boolean.TRUE : Boolean.FALSE); + scriptItem.addElement(strScript); + scriptItem.addElement(statusList); + scriptItem.addElement(returnType); + scriptItem.addElement(isScriptFile ? Boolean.TRUE : Boolean.FALSE); + scriptItem.addElement(isQuiet ? Boolean.TRUE : Boolean.FALSE); if (!useQueue) { clearQueue(); viewer.haltScriptExecution(); } - scriptQueue.add(scriptItem); + scriptQueue.addElement(scriptItem); if (Logger.isActiveLevel(Logger.LEVEL_DEBUG)) { Logger.debug(scriptQueue.size() + " scripts; added: " + strScript); } @@ -109,7 +109,7 @@ if (Logger.isActiveLevel(Logger.LEVEL_DEBUG)) { Logger.debug(scriptQueue.size() + " scripts; running: " + script); } - scriptQueue.remove(0); + scriptQueue.removeElementAt(0); Object returnInfo = runScript(returnType, script, statusList, isScriptFile, isQuiet); if (scriptQueue.size() == 0) // might have been cleared with an exit Modified: trunk/Jmol/src/org/jmol/viewer/StatusManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/StatusManager.java 2007-04-18 05:47:17 UTC (rev 7433) +++ trunk/Jmol/src/org/jmol/viewer/StatusManager.java 2007-04-18 05:54:27 UTC (rev 7434) @@ -319,10 +319,10 @@ statusPtr++; Vector statusRecordSet; Vector msgRecord = new Vector(); - msgRecord.add(new Integer(statusPtr)); - msgRecord.add(statusName); - msgRecord.add(new Integer(intInfo)); - msgRecord.add(statusInfo); + msgRecord.addElement(new Integer(statusPtr)); + msgRecord.addElement(statusName); + msgRecord.addElement(new Integer(intInfo)); + msgRecord.addElement(statusInfo); if (isReplace && messageQueue.containsKey(statusName)) { messageQueue.remove(statusName); } @@ -332,9 +332,9 @@ statusRecordSet = new Vector(); } if (statusRecordSet.size() == MAXIMUM_QUEUE_LENGTH) - statusRecordSet.remove(0); + statusRecordSet.removeElementAt(0); - statusRecordSet.add(msgRecord); + statusRecordSet.addElement(msgRecord); messageQueue.put(statusName, statusRecordSet); } @@ -354,7 +354,7 @@ int n = 0; while (e.hasMoreElements()) { String statusName = (String)e.nextElement(); - msgList.add(messageQueue.remove(statusName)); + msgList.addElement(messageQueue.remove(statusName)); n++; } return msgList; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |