JMenu jMenu1 = new JMenu();\r
JMenu structureMenu = new JMenu();\r
JMenu viewStructureMenu = new JMenu();\r
- JMenu colStructureMenu = new JMenu();\r
+ // JMenu colStructureMenu = new JMenu();\r
JMenuItem editSequence = new JMenuItem();\r
+ // JMenuItem annotationMenuItem = new JMenuItem();\r
\r
/**\r
* Creates a new PopupMenu object.\r
});\r
viewStructureMenu.add(menuItem);\r
\r
- menuItem = new JMenuItem();\r
+ /* menuItem = new JMenuItem();\r
menuItem.setText(pdb.getId());\r
menuItem.addActionListener(new java.awt.event.ActionListener()\r
{\r
colourByStructure(pdb.getId());\r
}\r
});\r
- colStructureMenu.add(menuItem);\r
+ colStructureMenu.add(menuItem);*/\r
}\r
}\r
+ else\r
+ {\r
+ structureMenu.remove(viewStructureMenu);\r
+ // structureMenu.remove(colStructureMenu);\r
+ }\r
\r
menuItem = new JMenuItem("Hide Sequences");\r
menuItem.addActionListener(new java.awt.event.ActionListener()\r
jMenu1.setText("Group");\r
structureMenu.setText("Structure");\r
viewStructureMenu.setText("View Structure");\r
- colStructureMenu.setText("Colour By Structure");\r
+ // colStructureMenu.setText("Colour By Structure");\r
editSequence.setText("Edit Sequence...");\r
editSequence.addActionListener(new ActionListener()\r
{\r
editSequence_actionPerformed(actionEvent);\r
}\r
});\r
+ /* annotationMenuItem.setText("By Annotation");\r
+ annotationMenuItem.addActionListener(new ActionListener()\r
+ {\r
+ public void actionPerformed(ActionEvent actionEvent)\r
+ {\r
+ annotationMenuItem_actionPerformed(actionEvent);\r
+ }\r
+ });*/\r
\r
add(groupMenu);\r
\r
colourMenu.addSeparator();\r
colourMenu.add(abovePIDColour);\r
colourMenu.add(conservationMenuItem);\r
+ //colourMenu.add(annotationMenuItem);\r
editMenu.add(copy);\r
editMenu.add(cut);\r
editMenu.add(editSequence);\r
jMenu1.add(outline);\r
structureMenu.add(pdbMenu);\r
structureMenu.add(viewStructureMenu);\r
- structureMenu.add(colStructureMenu);\r
+ // structureMenu.add(colStructureMenu);\r
noColourmenuItem.setText("None");\r
noColourmenuItem.addActionListener(new java.awt.event.ActionListener()\r
{\r
refresh();\r
}\r
\r
+ public void annotationMenuItem_actionPerformed(ActionEvent actionEvent)\r
+ {\r
+ SequenceGroup sg = getGroup();\r
+ if (sg == null)\r
+ {\r
+ return;\r
+ }\r
+\r
+ AnnotationColourGradient acg = new AnnotationColourGradient(\r
+ sequence.getAnnotation()[0], null, AnnotationColourGradient.NO_THRESHOLD);\r
+\r
+ acg.predefinedColours = true;\r
+ sg.cs = acg;\r
+\r
+ refresh();\r
+ }\r
+\r
/**\r
* DOCUMENT ME!\r
*\r
}\r
}\r
}\r
+\r
+\r
}\r