From ff6ddfa34521a2fe88482589ae973cd69d3514b5 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 14 Nov 2005 18:35:14 +0000 Subject: [PATCH] Fix bug where all chains are called A --- src/MCview/myAtom.java | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) 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()); -- 1.7.10.2