JMenu sequenceMenu = new JMenu();
JMenuItem sequenceName = new JMenuItem();
+
+ JMenuItem sequenceDetails = new JMenuItem();
+ JMenuItem sequenceSelDetails = new JMenuItem();
SequenceI sequence;
sequenceName_actionPerformed();
}
});
+ sequenceDetails.setText("Sequence Details ...");
+ sequenceDetails.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ sequenceDetails_actionPerformed();
+ }});
+ sequenceSelDetails.setText("Sequence Details ...");
+ sequenceSelDetails.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ sequenceSelectionDetails_actionPerformed();
+ }});
PIDColour.setFocusPainted(false);
unGroupMenuItem.setText("Remove Group");
unGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
editSequence_actionPerformed(actionEvent);
}
});
+
/*
* annotationMenuItem.setText("By Annotation");
* annotationMenuItem.addActionListener(new ActionListener() { public void
* actionPerformed(ActionEvent actionEvent) {
* annotationMenuItem_actionPerformed(actionEvent); } });
*/
-
+ groupMenu.add(sequenceSelDetails);
add(groupMenu);
-
add(sequenceMenu);
this.add(structureMenu);
groupMenu.add(editMenu);
groupMenu.add(sequenceFeature);
groupMenu.add(jMenu1);
sequenceMenu.add(sequenceName);
+ sequenceMenu.add(sequenceDetails);
colourMenu.add(textColour);
colourMenu.add(noColourmenuItem);
colourMenu.add(clustalColour);
});
}
+ protected void sequenceSelectionDetails_actionPerformed()
+ {
+ createSequenceDetailsReport(ap.av.getSequenceSelection());
+ }
+
+ protected void sequenceDetails_actionPerformed()
+ {
+ createSequenceDetailsReport(new SequenceI[]{sequence});
+ }
+ public void createSequenceDetailsReport(SequenceI[] sequences)
+ {
+ CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
+ StringBuffer contents = new StringBuffer();
+ for (SequenceI seq:sequences)
+ {
+ contents.append("<p><h2>Annotation for "+seq.getDisplayId(true)+"</h2></p><p>");
+ new SequenceAnnotationReport(null)
+ .createSequenceAnnotationReport(
+ contents,
+ seq,
+ true,
+ true,false,
+ (ap.seqPanel.seqCanvas.fr != null) ? ap.seqPanel.seqCanvas.fr.minmax
+ : null);
+ contents.append("</p>");
+ }
+ cap.setText("<html>" + contents.toString() + "</html>");
+
+ Desktop.instance.addInternalFrame(cap,
+ "Sequence Details for " + (sequences.length==1 ? sequences[0].getDisplayId(true) : "Selection")
+, 500, 400);
+
+ }
+
protected void showNonconserved_actionPerformed()
{
getGroup().setShowNonconserved(displayNonconserved.isSelected());