X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBfile.java;h=f9d842fd087c298dd08de0207aacf9495dc4e857;hb=b1f3b63568afc23462caff32f3001ecb36ff2a57;hp=f97216b2a8879b1132540db8ba65a456af1706ec;hpb=6386a2fdc5000b7fda564cb58a99567c81a2607e;p=jalview.git diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index f97216b..f9d842f 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -18,8 +18,6 @@ */ package MCview; -import jalview.datamodel.*; - import java.io.*; import java.net.*; @@ -50,6 +48,10 @@ public class PDBfile extends jalview.io.FileParse { if (inType.equals("File")) { dataIn = new BufferedReader(new FileReader(inFile)); } + else if(inType.equals("Paste")) + { + dataIn = new BufferedReader(new StringReader(inFile)); + } else { URL url = new URL(inFile); this.fileSize = 0; @@ -81,7 +83,6 @@ public class PDBfile extends jalview.io.FileParse { // System.out.println("Adding to chain " + tmpatom.chain); findChain(tmpatom.chain).atoms.addElement(tmpatom); } else { - // System.out.println("Making chain " + tmpatom.chain); PDBChain tmpchain = new PDBChain(tmpatom.chain); chains.addElement(tmpchain); tmpchain.atoms.addElement(tmpatom); @@ -97,11 +98,6 @@ public class PDBfile extends jalview.io.FileParse { makeResidueList(); makeCaBondList(); - - // for (int i=0; i < chains.size() ; i++) { - // String pog = ((PDBChain)chains.elementAt(i)).print(); - // System.out.println(pog); - // } } public void makeResidueList() { @@ -139,12 +135,12 @@ public class PDBfile extends jalview.io.FileParse { } } - public void colourBySequence(Sequence seq) { - //SMJS TODO - // int max = seq.maxchain; - // if (seq.maxchain != -1) { - // ((PDBChain)chains.elementAt(max)).colourBySequence(seq); - // } + public void colourBySequence()//jalview.gui.SequenceRenderer sr, + // jalview.gui.FeatureRenderer fr) + { + for (int i = 0; i < chains.size(); i++) { + //((PDBChain)chains.elementAt(i)).colourBySequence(sr,fr); + } } public void setChainColours() {