{\r
type = renderOrder[renderIndex];\r
\r
- if(!av.featuresDisplayed.containsKey(type))\r
+ if(type==null || !av.featuresDisplayed.containsKey(type))\r
continue;\r
\r
// loop through all features in sequence to find\r
int pady = (y1 + av.charHeight) - av.charHeight / 5;\r
for (i = fstart; i <= fend; i++)\r
{\r
- s = seq.getSequence().charAt(i);\r
+ s = seq.getCharAt(i);\r
\r
if (jalview.util.Comparison.isGap(s))\r
{\r
final JTextArea description = new JTextArea(3,25);\r
final JSpinner start = new JSpinner();\r
final JSpinner end = new JSpinner();\r
+ start.setPreferredSize(new Dimension(80,20));\r
+ end.setPreferredSize(new Dimension(80,20));\r
final JPanel colour = new JPanel();\r
colour.setBorder(BorderFactory.createEtchedBorder());\r
colour.setMaximumSize(new Dimension(40,10));\r
bigPanel.add(panel, BorderLayout.SOUTH);\r
\r
panel = new JPanel();\r
- panel.add(new JLabel(" Start: ", JLabel.RIGHT));\r
+ panel.add(new JLabel(" Start:", JLabel.RIGHT));\r
panel.add(start);\r
- panel.add(new JLabel(" End: ", JLabel.RIGHT));\r
+ panel.add(new JLabel(" End:", JLabel.RIGHT));\r
panel.add(end);\r
bigPanel.add(panel, BorderLayout.CENTER);\r
}\r
if (getColour(lastFeatureAdded) != null)\r
{\r
colour.setBackground(getColour(lastFeatureAdded));\r
- colour.setForeground(getColour(lastFeatureAdded));\r
}\r
else\r
{\r
colour.setBackground(new Color(60, 160, 115));\r
- colour.setForeground(new Color(60, 160, 115));\r
}\r
\r
}\r
end.setValue(new Integer(features[index].getEnd()));\r
colour.setBackground(\r
getColour(name.getSelectedItem().toString()));\r
- colour.setForeground(\r
- getColour(name.getSelectedItem().toString()));\r
\r
SearchResults highlight = new SearchResults();\r
highlight.addResult(sequences[0],\r
ap.seqPanel.seqCanvas.highlightSearchResults(highlight);\r
\r
}\r
+ Color col = getColour(name.getSelectedItem().toString());\r
+ if (col == null)\r
+ col = new\r
+ jalview.schemes.UserColourScheme()\r
+ .createColourFromName(name.getSelectedItem().toString());\r
+\r
+ colour.setBackground(col);\r
}\r
});\r
\r
&& name.getSelectedItem() != null\r
&& source.getSelectedItem() != null)\r
{\r
+ //This ensures that the last sequence\r
+ //is refreshed and new features are rendered\r
+ lastSeq=null;\r
lastFeatureAdded = name.getSelectedItem().toString();\r
lastFeatureGroupAdded = source.getSelectedItem().toString();\r
lastDescriptionAdded = description.getText().replaceAll("\n", " ");\r