\r
if(jal.getSequenceAt(i).getDatasetSequence().getSequenceFeatures()!=null)\r
{\r
- Enumeration en = jal.getSequenceAt(i).getDatasetSequence().getSequenceFeatures().elements();\r
- while(en.hasMoreElements())\r
+ jalview.datamodel.SequenceFeature[] sf\r
+ = jal.getSequenceAt(i).getDatasetSequence().getSequenceFeatures();\r
+ int index = 0;\r
+ while(index < sf.length)\r
{\r
Features features = new Features();\r
- jalview.datamodel.SequenceFeature sf\r
- = (jalview.datamodel.SequenceFeature)en.nextElement();\r
-\r
- features.setBegin(sf.getBegin());\r
- features.setEnd(sf.getEnd());\r
- features.setDescription(sf.getDescription());\r
- features.setStatus(sf.getStatus());\r
- features.setType(sf.getType());\r
- features.setFeatureGroup(sf.getFeatureGroup());\r
+\r
+ features.setBegin(sf[index].getBegin());\r
+ features.setEnd(sf[index].getEnd());\r
+ features.setDescription(sf[index].getDescription());\r
+ features.setStatus(sf[index].getStatus());\r
+ features.setType(sf[index].getType());\r
+ features.setFeatureGroup(sf[index].getFeatureGroup());\r
jseq.addFeatures(features);\r
+ index ++;\r
}\r
}\r
\r
view.setShowText(av.getShowText());\r
view.setWrapAlignment(av.getWrapAlignment());\r
\r
- if(af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed!=null)\r
+ if(av.featuresDisplayed!=null)\r
{\r
jalview.binding.FeatureSettings fs = new jalview.binding.FeatureSettings();\r
\r
af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().getColour(type).getRGB()\r
);\r
setting.setDisplay(\r
- af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed.contains(type)\r
+ av.featuresDisplayed.contains(type)\r
);\r
\r
fs.addSetting(setting);\r
\r
if(jms.getFeatureSettings()!=null)\r
{\r
- af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed = new Vector();\r
+ af.viewport.featuresDisplayed = new Hashtable();\r
// af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed!=null)\r
// jalview.binding.FeatureSettings fs = new jalview.binding.FeatureSettings();\r
for(int fs=0; fs<jms.getFeatureSettings().getSettingCount(); fs++)\r
af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().setColour(setting.getType(),\r
new java.awt.Color(setting.getColour()));\r
if(setting.getDisplay())\r
- af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed.addElement(setting.getType());\r
+ af.viewport.featuresDisplayed.put(\r
+ setting.getType(), new Integer(setting.getColour()));\r
}\r
}\r
\r