From: amwaterhouse Date: Wed, 15 Feb 2006 15:17:29 +0000 (+0000) Subject: Features file has startgroup, endgroup X-Git-Tag: Root_VamJalview_2_07b+~147 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7db575b815f21c6e023f6482fe258c39e84b436e;p=jalview.git Features file has startgroup, endgroup --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 96dc64b..6d70bf7 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -153,6 +153,7 @@ public class AlignFrame extends Frame implements ActionListener, SequenceFeature sf; FeatureRenderer fr = alignPanel.seqPanel.seqCanvas.getFeatureRenderer(); int lineNo = 0; + String featureGroup = null; while ( (line = in.readLine()) != null) { lineNo++; @@ -160,8 +161,22 @@ public class AlignFrame extends Frame implements ActionListener, if (st.countTokens() == 2) { type = st.nextToken(); - UserColourScheme ucs = new UserColourScheme(st.nextToken()); - fr.setColour(type, ucs.findColour("A")); + if(type.equalsIgnoreCase("startgroup")) + { + featureGroup = st.nextToken(); + } + else if(type.equalsIgnoreCase("endgroup")) + { + //We should check whether this is the current group, + //but at present theres no way of showing more than 1 group + st.nextToken(); + featureGroup = null; + } + else + { + UserColourScheme ucs = new UserColourScheme(st.nextToken()); + fr.setColour(type, ucs.findColour("A")); + } continue; } @@ -195,6 +210,7 @@ public class AlignFrame extends Frame implements ActionListener, } sf = new SequenceFeature(type, desc, "", start, end); + sf.setFeatureGroup(featureGroup); seq.addSequenceFeature(sf); }