{\r
new SequenceFetcher(this);\r
}\r
-\r
-\r
/**\r
* DOCUMENT ME!\r
*\r
alignPanel.repaint();\r
}\r
\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param evt DOCUMENT ME!\r
- */\r
- public void sequenceFeatures_actionPerformed(ActionEvent evt)\r
+ public void fetchSeqFeatures_actionPerformed(ActionEvent e)\r
{\r
- viewport.showSequenceFeatures(sequenceFeatures.isSelected());\r
-\r
- if (viewport.showSequenceFeatures && !viewport.alignment.isNucleotide())\r
+ if (!viewport.alignment.isNucleotide())\r
{\r
new SequenceFeatureFetcher(viewport.\r
- alignment,\r
- alignPanel);\r
+ alignment,\r
+ alignPanel);\r
+ viewport.showSequenceFeatures(true);\r
+ showSeqFeatures.setSelected(true);\r
}\r
+ }\r
\r
- featureSettings.setEnabled(true);\r
\r
+ public void featureSettings_actionPerformed(ActionEvent e)\r
+ {\r
+ new FeatureSettings(viewport, alignPanel);\r
+ }\r
+\r
+ /**\r
+ * DOCUMENT ME!\r
+ *\r
+ * @param evt DOCUMENT ME!\r
+ */\r
+ public void showSeqFeatures_actionPerformed(ActionEvent evt)\r
+ {\r
+ viewport.showSequenceFeatures(showSeqFeatures.isSelected());\r
alignPanel.repaint();\r
}\r
\r
}\r
}*/\r
\r
- public void featureSettings_actionPerformed(ActionEvent e)\r
- {\r
- new FeatureSettings(viewport, alignPanel);\r
- }\r
+\r
\r
\r
\r
StringTokenizer st;\r
SequenceFeature sf;\r
int lineNo = 0;\r
+ String featureGroup = null;\r
while ( (line = in.readLine()) != null)\r
{\r
lineNo++;\r
if (st.countTokens() == 2)\r
{\r
type = st.nextToken();\r
- UserColourScheme ucs = new UserColourScheme(st.nextToken());\r
- alignPanel.seqPanel.seqCanvas.getFeatureRenderer().setColour(type, ucs.findColour("A"));\r
+ if (type.equalsIgnoreCase("startgroup"))\r
+ {\r
+ featureGroup = st.nextToken();\r
+ }\r
+ else if (type.equalsIgnoreCase("endgroup"))\r
+ {\r
+ //We should check whether this is the current group,\r
+ //but at present theres no way of showing more than 1 group\r
+ st.nextToken();\r
+ featureGroup = null;\r
+ }\r
+ else\r
+ {\r
+ UserColourScheme ucs = new UserColourScheme(st.nextToken());\r
+ alignPanel.seqPanel.seqCanvas.getFeatureRenderer().setColour(type,\r
+ ucs.findColour("A"));\r
+ }\r
continue;\r
}\r
\r
}\r
\r
sf = new SequenceFeature(type, desc, "", start, end);\r
+ sf.setFeatureGroup(featureGroup);\r
\r
seq.getDatasetSequence().addSequenceFeature(sf);\r
}\r