{
sortPairwiseMenuItem_actionPerformed();
}
+ else if (param.equalsIgnoreCase("Length"))
+ {
+ sortLengthMenuItem_actionPerformed();
+ }
}
param = applet.getParameter("wrap");
{
sortIDMenuItem_actionPerformed();
}
+ else if (source == sortLengthMenuItem)
+ {
+ sortLengthMenuItem_actionPerformed();
+ }
else if (source == sortGroupMenuItem)
{
sortGroupMenuItem_actionPerformed();
alignPanel.paintAlignment(true);
}
+ public void sortLengthMenuItem_actionPerformed()
+ {
+ SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();
+ AlignmentSorter.sortByLength(viewport.getAlignment());
+ addHistoryItem(new OrderCommand("Length Sort", oldOrder, viewport.alignment));
+ alignPanel.paintAlignment(true);
+ }
+
public void sortGroupMenuItem_actionPerformed()
{
SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();
MenuItem sortIDMenuItem = new MenuItem();
+ MenuItem sortLengthMenuItem = new MenuItem();
+
MenuItem sortGroupMenuItem = new MenuItem();
MenuItem removeRedundancyMenuItem = new MenuItem();
sortPairwiseMenuItem.addActionListener(this);
sortIDMenuItem.setLabel("by ID");
sortIDMenuItem.addActionListener(this);
+ sortLengthMenuItem.setLabel("by Length");
+ sortLengthMenuItem.addActionListener(this);
sortGroupMenuItem.setLabel("by Group");
sortGroupMenuItem.addActionListener(this);
removeRedundancyMenuItem.setLabel("Remove Redundancy...");
pasteMenu.add(pasteNew);
pasteMenu.add(pasteThis);
sort.add(sortIDMenuItem);
+ sort.add(sortLengthMenuItem);
sort.add(sortByTreeMenu);
sort.add(sortGroupMenuItem);
sort.add(sortPairwiseMenuItem);