import jalview.datamodel.*;\r
import jalview.analysis.*;\r
import jalview.schemes.*;\r
+import java.awt.*;\r
import javax.swing.*;\r
import java.awt.event.*;\r
import jalview.io.*;\r
Sequence sequence;\r
JMenuItem unGroupMenuItem = new JMenuItem();\r
JMenuItem pdbMenuItem = new JMenuItem();\r
+ JMenuItem outline = new JMenuItem();\r
\r
public PopupMenu(AlignmentPanel ap, Sequence seq)\r
{\r
groupName_actionPerformed(e);\r
}\r
});\r
+ groupAnnotation.setEnabled(false);\r
groupAnnotation.setText("Annotation");\r
groupAnnotation.addActionListener(new java.awt.event.ActionListener()\r
{\r
}\r
});\r
residueMenu.setText("Residue");\r
+ annotateResidue.setEnabled(false);\r
+ annotateResidue.setActionCommand("annotate residue");\r
annotateResidue.setText("annotate residue???");\r
PIDColour.setFocusPainted(false);\r
unGroupMenuItem.setText("Remove Group");\r
pdbMenuItem_actionPerformed(e);\r
}\r
});\r
+ outline.setText("Border colour");\r
+ outline.addActionListener(new java.awt.event.ActionListener()\r
+ {\r
+ public void actionPerformed(ActionEvent e)\r
+ {\r
+ outline_actionPerformed(e);\r
+ }\r
+ });\r
add(groupMenu);\r
this.add(sequenceMenu);\r
this.add(residueMenu);\r
defineMenu.add(groupName);\r
defineMenu.add(groupAnnotation);\r
defineMenu.addSeparator();\r
+ defineMenu.add(outline);\r
+ defineMenu.addSeparator();\r
defineMenu.add(noColourmenuItem);\r
defineMenu.add(clustalColour);\r
defineMenu.add(zappoColour);\r
\r
protected void abovePIDColour_actionPerformed(ActionEvent e)\r
{\r
- Desktop.setPIDSliderSource(ap, getGroup().cs, getGroup().getName());\r
+ if(abovePIDColour.isSelected())\r
+{\r
+\r
+ Desktop.setPIDSliderSource(ap, getGroup().cs, getGroup().getName());\r
+ refresh();\r
+}\r
+else // remove PIDColouring\r
+{\r
+ ColourSchemeI cs = getGroup().cs;\r
+ ResidueColourScheme rcs = (ResidueColourScheme)cs;\r
+ rcs.setThreshold(0);\r
+ getGroup().cs = rcs;\r
+ refresh();\r
+}\r
+\r
+\r
+\r
}\r
\r
\r
}\r
}\r
\r
+ protected void outline_actionPerformed(ActionEvent e)\r
+ {\r
+ SequenceGroup sg = getGroup();\r
+ Color col = JColorChooser.showDialog(this, "Select Outline Colour", Color.BLUE);\r
+ if(col!=null)\r
+ sg.setOutlineColour(col);\r
+ }\r
+\r
}\r