frame = new JInternalFrame();\r
frame.setContentPane(this);\r
frame.setLayer(JLayeredPane.PALETTE_LAYER);\r
- Desktop.addInternalFrame(frame, "Colour by Annotation", 470, 110, false);\r
+ Desktop.addInternalFrame(frame, "Colour by Annotation", 480, 110, false);\r
\r
try{\r
jbInit();\r
\r
for (int i = 0; i < av.alignment.getAlignmentAnnotation().length; i++)\r
{\r
- annotations.addItem(av.alignment.getAlignmentAnnotation()[i].label);\r
+ if(av.alignment.getAlignmentAnnotation()[i].graph>0)\r
+ annotations.addItem(av.alignment.getAlignmentAnnotation()[i].label);\r
}\r
\r
}\r
maxColour_actionPerformed(e);\r
}\r
});\r
+ thresholdCheck.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
thresholdCheck.setOpaque(false);\r
thresholdCheck.setHorizontalTextPosition(SwingConstants.LEADING);\r
thresholdCheck.setSelectedIcon(null);\r
thresholdCheck.setText("Above Threshold");\r
- thresholdCheck.setBounds(new Rectangle(329, 6, 109, 23));\r
+ thresholdCheck.setBounds(new Rectangle(329, 6, 126, 23));\r
thresholdCheck.addActionListener(new ActionListener()\r
{\r
public void actionPerformed(ActionEvent e)\r
\r
void changeColour()\r
{\r
- jalview.datamodel.AlignmentAnnotation aa = av.alignment.getAlignmentAnnotation()[annotations.getSelectedIndex()];\r
+ // We removed the non-graph annotations when filling the combobox\r
+ // so allow for them again here\r
+ int nograph = 0, graph = -1;\r
+ for (int i = 0; i < av.alignment.getAlignmentAnnotation().length; i++)\r
+ {\r
+ if (av.alignment.getAlignmentAnnotation()[i].graph == 0)\r
+ nograph ++;\r
+ else\r
+ graph ++;\r
+\r
+ if(graph==annotations.getSelectedIndex())\r
+ break;\r
+ }\r
+\r
+ jalview.datamodel.AlignmentAnnotation aa\r
+ = av.alignment.getAlignmentAnnotation()[graph+nograph];\r
\r
AnnotationColourGradient acg = new AnnotationColourGradient(aa,\r
minColour.getBackground(),\r