import jalview.analysis.AlignmentUtils;
import jalview.analysis.Conservation;
import jalview.bin.Cache;
+import jalview.bin.Jalview;
import jalview.commands.ChangeCaseCommand;
import jalview.commands.EditCommand;
import jalview.commands.EditCommand.Action;
import java.util.Vector;
import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JComponent;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
/**
* DOCUMENT ME!
public void createSequenceDetailsReport(SequenceI[] sequences)
{
- CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
StringBuilder contents = new StringBuilder(128);
+ contents.append("<html><body>");
for (SequenceI seq : sequences)
{
contents.append("<p><h2>" + MessageManager.formatMessage(
contents, seq, true, true, ap.getSeqPanel().seqCanvas.fr);
contents.append("</p>");
}
- cap.setText("<html>" + contents.toString() + "</html>");
+ contents.append("</body></html>");
+ String report = contents.toString();
+
+ JInternalFrame frame;
+ if (Jalview.isJS())
+ {
+ JLabel textLabel = new JLabel();
+ textLabel.setText(report);
+ textLabel.setBackground(Color.WHITE);
+ JPanel pane = new JPanel(new BorderLayout());
+ ((JPanel) pane).setOpaque(true);
+ pane.setBackground(Color.WHITE);
+ ((JPanel) pane).add(textLabel, BorderLayout.NORTH);
+ frame = new JInternalFrame();
+ frame.getContentPane().add(new JScrollPane(pane));
+ }
+ else
+ {
+ CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
+ cap.setText(report);
+ frame = cap;
+ }
- Desktop.addInternalFrame(cap,
+ Desktop.addInternalFrame(frame,
MessageManager.formatMessage("label.sequence_details_for",
(sequences.length == 1 ? new Object[]
{ sequences[0].getDisplayId(true) }
{ MessageManager
.getString("label.selection") })),
500, 400);
-
}
protected void showNonconserved_actionPerformed()