}
public Color getColour(String featureType)
{
- Color colour = (Color) featureColours.get(featureType);
- if (colour == null)
+ if (featureColours.get(featureType) == null)
{
jalview.schemes.UserColourScheme ucs = new
- jalview.schemes.UserColourScheme();
- featureColours.put(featureType,
- colour=ucs.createColourFromName(featureType));
+ jalview.schemes.UserColourScheme();
+ Color col = ucs.createColourFromName(featureType);
+ featureColours.put(featureType, col);
+ return col;
}
- return colour;
+ else
+ return (Color) featureColours.get(featureType);
}
static String lastFeatureAdded;
///////////////////////////////////////
///MULTIPLE FEATURES AT SELECTED RESIDUE
- if(features.length>1)
+ if(!newFeatures && features.length>1)
{
panel = new JPanel(new GridLayout(4, 1));
tmp = new JPanel();
source.setText(features[index].getFeatureGroup());
start.setValue(new Integer(features[index].getBegin()));
end.setValue(new Integer(features[index].getEnd()));
- colour.setBackground(
- getColour(features[index].getType()));
SearchResults highlight = new SearchResults();
highlight.addResult(sequences[0],
description.setLineWrap(true);
panel.add(new JScrollPane(description));
- name.setText(features[0].type);
- source.setText(features[0].featureGroup);
- start.setValue(new Integer(features[0].getBegin()));
- end.setValue(new Integer(features[0].getEnd()));
- colour.setBackground( getColour(features[0].type) );
- description.setText(features[0].getDescription());
-
if (!newFeatures)
{
bigPanel.add(panel, BorderLayout.SOUTH);
}
}
+ name.setText(lastFeatureAdded);
+ source.setText(lastFeatureGroupAdded);
+ start.setValue(new Integer(features[0].getBegin()));
+ end.setValue(new Integer(features[0].getEnd()));
+ colour.setBackground( getColour(lastFeatureAdded) );
+ description.setText(features[0].getDescription());
+
Object[] options;
if (!newFeatures)
}
}
- // if (name.getSelectedIndex() == -1)
- {
- // findAllFeatures();
- }
+ findAllFeatures();
return true;
}