protected void outputText_actionPerformed(ActionEvent e)
{
CutAndPasteTransfer cap = new CutAndPasteTransfer();
- JInternalFrame frame = new JInternalFrame();
- frame.setContentPane(cap);
- Desktop.addInternalFrame(frame, "Alignment output - "+e.getActionCommand(), 600, 500);
+ Desktop.addInternalFrame(cap, "Alignment output - "+e.getActionCommand(), 600, 500);
cap.setText( FormatAdapter.formatSequences(e.getActionCommand(), viewport.getAlignment().getSequences()));
}
protected void delete_actionPerformed(ActionEvent e)
{
boolean seqsdeleted=false;
- addHistoryItem(new HistoryItem("Delete Sequences", viewport.alignment, HistoryItem.HIDE));
if (viewport.getSelectionGroup() == null)
return;
+ addHistoryItem(new HistoryItem("Delete Sequences", viewport.alignment, HistoryItem.HIDE));
+
SequenceGroup sg = viewport.getSelectionGroup();
for (int i=0;i < sg.sequences.size(); i++)
{
public void removeRedundancyMenuItem_actionPerformed(ActionEvent e)
{
- RedundancyPanel sp = new RedundancyPanel(alignPanel);
+ RedundancyPanel sp = new RedundancyPanel(alignPanel,this);
JInternalFrame frame = new JInternalFrame();
frame.setContentPane(sp);
Desktop.addInternalFrame(frame, "Redundancy threshold selection", 400, 100, false);
public void pairwiseAlignmentMenuItem_actionPerformed(ActionEvent e)
{
- if(viewport.getSelectionGroup().getSize()<2)
+ if((viewport.getSelectionGroup()==null) ||
+ viewport.getSelectionGroup().getSize()<2)
JOptionPane.showInternalMessageDialog(this, "You must select at least 2 sequences.", "Invalid Selection", JOptionPane.WARNING_MESSAGE);
else
{