From 56854ddc00e57ff6b5a4047d6f79e04a32771030 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 30 Nov 2005 15:05:57 +0000 Subject: [PATCH] Remove deletebonds --- src/MCview/PDBCanvas.java | 50 +++++++++++++++------------------------------ src/MCview/PDBChain.java | 1 - 2 files changed, 17 insertions(+), 34 deletions(-) diff --git a/src/MCview/PDBCanvas.java b/src/MCview/PDBCanvas.java index a86a0dd..f853106 100755 --- a/src/MCview/PDBCanvas.java +++ b/src/MCview/PDBCanvas.java @@ -88,7 +88,7 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe int pdbend = 0; int seqstart = 0; int seqend = 0; - AlignSeq maxAlignseq = null;; + AlignSeq maxAlignseq = null; for (int i = 0; i < pdb.chains.size(); i++) { @@ -142,9 +142,7 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe mainchain.isVisible = true; mainchain.makeExactMapping(maxAlignseq, sequence); - // mainchain.sequence = sequence; - - this.pdb = pdb; + this.pdb = pdb; this.prefsize = new Dimension(getWidth(), getHeight()); //Initialize the matrices to identity @@ -219,22 +217,6 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe } } - public void deleteBonds() { - scale = 0; - maxwidth = 0; - - width[0] = 0; - width[1] = 0; - width[2] = 0; - - centre[0] = 0; - centre[1] = 0; - centre[2] = 0; - - for (int i = 0; i < pdb.chains.size(); i++) { - ((PDBChain) pdb.chains.elementAt(i)).bonds = null; - } - } public void findWidth() { float[] max = new float[3]; @@ -448,7 +430,7 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe { for (int ii = 0; ii < pdb.chains.size(); ii++) { - colourBySequence( (PDBChain) pdb.chains.elementAt(ii) ); + colourBySequence( mainchain ); } } @@ -828,19 +810,22 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe if (chain.isVisible) { + Vector bonds = ((PDBChain) pdb.chains.elementAt(ii)).bonds; - for (int i = 0; i < chain.bonds.size(); i++) - { - Bond tmpBond = (Bond) chain.bonds.elementAt(i); + for (int i = 0; i < bonds.size(); i++) + { + Bond tmpBond = (Bond) bonds.elementAt(i); - if (tmpBond.at1.isSelected) - { - labelAtom(g, tmpBond, 1); - } - else if (tmpBond.at2.isSelected) - { - labelAtom(g, tmpBond, 2); - } + if (tmpBond.at1.isSelected) + { + labelAtom(g, tmpBond, 1); + } + + if (tmpBond.at2.isSelected) + { + + labelAtom(g, tmpBond, 2); + } } } } @@ -936,7 +921,6 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe } Bond highlightBond1, highlightBond2; - String alignMouseOver; public void highlightRes(int ii) { diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index 276525b..1fade31 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -41,7 +41,6 @@ public class PDBChain { public int seqstart = 0; public int seqend = 0; - //public DrawableSequence ds; public PDBChain(String id) { this.id = id; } -- 1.7.10.2