- ///////////////////////////////////////
- ///MULTIPLE FEATURES AT SELECTED RESIDUE
- if(!newFeatures && features.length>1)
- {
- panel = new JPanel(new GridLayout(4, 1));
- tmp = new JPanel();
- tmp.add(new JLabel("Select Feature: "));
- overlaps = new JComboBox();
- for(int i=0; i<features.length; i++)
- {
- overlaps.addItem(features[i].getType()
- +"/"+features[i].getBegin()+"-"+features[i].getEnd()
- +" ("+features[i].getFeatureGroup()+")");
- }
-
- tmp.add(overlaps);
-
- overlaps.addItemListener(new ItemListener()
- {
- public void itemStateChanged(ItemEvent e)
- {
- int index = overlaps.getSelectedIndex();
- if (index != -1)
- {
- featureIndex = index;
- name.setText(features[index].getType());
- description.setText(features[index].getDescription());
- source.setText(features[index].getFeatureGroup());
- start.setValue(new Integer(features[index].getBegin()));
- end.setValue(new Integer(features[index].getEnd()));
-
- SearchResults highlight = new SearchResults();
- highlight.addResult(sequences[0],
- features[index].getBegin(),
- features[index].getEnd());
-
- ap.seqPanel.seqCanvas.highlightSearchResults(highlight);
-
- }
- Color col = getColour(name.getText());
- if (col == null)
- {
- col = new
- jalview.schemes.UserColourScheme()
- .createColourFromName(name.getText());
- }
-
- colour.setBackground(col);
- }
- });
-
-
- panel.add(tmp);
- }
- //////////
- //////////////////////////////////////
-
- tmp = new JPanel();
- panel.add(tmp);
- tmp.add(new JLabel("Name: ", JLabel.RIGHT));
- tmp.add(name);
-
- tmp = new JPanel();
- panel.add(tmp);
- tmp.add(new JLabel("Group: ", JLabel.RIGHT));
- tmp.add(source);
-
- tmp = new JPanel();
- panel.add(tmp);
- tmp.add(new JLabel("Colour: ", JLabel.RIGHT));
- tmp.add(colour);