- featureIndex = 0;
- for (int f = 0; f < features.length; f++)
- {
- name.addItem(features[f].getType().toString());
- }
-
- description.setText(features[0].getDescription());
- source.setSelectedItem(features[0].getFeatureGroup());
- start.setValue(new Integer(features[0].getBegin()));
- end.setValue(new Integer(features[0].getEnd()));
- colour.setBackground(
- getColour(name.getSelectedItem().toString()));
- name.addItemListener(new ItemListener()
- {
- public void itemStateChanged(ItemEvent e)
- {
- int index = name.getSelectedIndex();
- if (index != -1)
- {
- featureIndex = index;
- description.setText(features[index].getDescription());
- source.setSelectedItem(features[index].getFeatureGroup());
- start.setValue(new Integer(features[index].getBegin()));
- end.setValue(new Integer(features[index].getEnd()));
- colour.setBackground(
- getColour(name.getSelectedItem().toString()));
-
- SearchResults highlight = new SearchResults();
- highlight.addResult(sequences[0],
- features[index].getBegin(),
- features[index].getEnd());
-
- ap.seqPanel.seqCanvas.highlightSearchResults(highlight);
-
- }
- Color col = getColour(name.getSelectedItem().toString());
- if (col == null)
- {
- col = new
- jalview.schemes.UserColourScheme()
- .createColourFromName(name.getSelectedItem().toString());
- }
-
- colour.setBackground(col);
- }
- });
-