public void partitionTree(final MouseEvent e)
{
int x = e.getX();
+ int lineLength = treeView.getHeight();
Phylogeny tree = treeView.getPhylogeny();
double treeHeight = tree.calculateHeight(true);
+
if (treeHeight != 0)
{
int viewWidth = treeView.getWidth();
}
+
@Override
}
}
+ public void sortByTree_actionPerformed() {
+ // parentAvport.mirrorCommand(command, undo, ssm, source);
+
+ // alignFrame
+ // .addHistoryItem(sortAlignmentIn(treeCanvas.ap));
+
+ }
+
+
+ /**
+ * sort the associated alignment view by the current tree.
+ *
+ * @param e
+ */
+ // @Override
+ // public void sortByTree_actionPerformed()// modify for Aptx
+ // {
+ //
+ // // if (treeCanvas.applyToAllViews)
+ //
+ // final ArrayList<CommandI> commands = new ArrayList<>();
+ // for (AlignmentPanel ap : PaintRefresher
+ // .getAssociatedPanels(parentAvport.getSequenceSetId()))
+ // {
+ // commands.add(sortAlignmentIn(ap.av.getAlignPanel()));
+ // }
+ // av.getAlignPanel().alignFrame.addHistoryItem(new CommandI()
+ // {
+ //
+ // @Override
+ // public void undoCommand(AlignmentI[] views)
+ // {
+ // for (CommandI tsort : commands)
+ // {
+ // tsort.undoCommand(views);
+ // }
+ // }
+ //
+ // @Override
+ // public int getSize()
+ // {
+ // return commands.size();
+ // }
+ //
+ // @Override
+ // public String getDescription()
+ // {
+ // return "Tree Sort (many views)";
+ // }
+ //
+ // @Override
+ // public void doCommand(AlignmentI[] views)
+ // {
+ //
+ // for (CommandI tsort : commands)
+ // {
+ // tsort.doCommand(views);
+ // }
+ // }
+ // });
+ // for (AlignmentPanel ap : PaintRefresher
+ // .getAssociatedPanels(av.getSequenceSetId()))
+ // {
+ // // ensure all the alignFrames refresh their GI after adding an undo item
+ // ap.alignFrame.updateEditMenuBar();
+ // }
+ // }
+ // else
+ // {
+ // treeCanvas.ap.alignFrame
+ // .addHistoryItem(sortAlignmentIn(treeCanvas.ap));
+ // }
+
+
/**
* TO BE MOVED
* @param set
* @param objectToCheck
*/
- public <E> void addOrRemoveInSet(Set<E> set, E objectToCheck)
+ public static <E> void addOrRemoveInSet(Set<E> set, E objectToCheck)
{
if (set.contains(objectToCheck))
{