From: amwaterhouse Date: Mon, 14 Nov 2005 18:35:14 +0000 (+0000) Subject: Fix bug where all chains are called A X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ff6ddfa34521a2fe88482589ae973cd69d3514b5;p=jalview.git Fix bug where all chains are called A --- diff --git a/src/MCview/myAtom.java b/src/MCview/myAtom.java index 75dec37..5eccbdf 100755 --- a/src/MCview/myAtom.java +++ b/src/MCview/myAtom.java @@ -32,7 +32,7 @@ public class myAtom { public String resName; public int resNumber; public int type; - public Color color; + public Color color = Color.lightGray; public String chain; public boolean isSelected = false; @@ -41,24 +41,9 @@ public class myAtom { this.name = str.nextToken(); this.resName = str.nextToken(); - String tmpstr = new String(); + this.chain = str.nextToken(); - try { - tmpstr = str.nextToken(); - this.resNumber = (new Integer(tmpstr).intValue()); - this.chain = "A"; - this.color = Color.lightGray; - } catch (NumberFormatException e) { - this.chain = tmpstr; - - if (tmpstr.equals("A")) { - this.color = Color.lightGray; - } else { - this.color = Color.red; - } - - this.resNumber = (new Integer(str.nextToken()).intValue()); - } + this.resNumber = (new Integer(str.nextToken()).intValue()); this.x = (float) (new Float(str.nextToken()).floatValue()); this.y = (float) (new Float(str.nextToken()).floatValue());