import java.util.Map;
import java.util.Set;
+import javax.swing.JTabbedPane;
import javax.swing.SwingUtilities;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
import org.forester.archaeopteryx.MainFrame;
import org.forester.phylogeny.Phylogeny;
private AlignmentViewport parentAvport;
+ private final JTabbedPane treeTabs;
private final StructureSelectionManager ssm;
nodesBoundToSequences = nodesMappedToAlign;
treeView = archaeopteryx.getMainPanel().getCurrentTreePanel();
+ treeTabs = archaeopteryx.getMainPanel().getTabbedPane();
ssm = parentAvport.getStructureSelectionManager();
-
-
- // archaeopteryx.getMainPanel().getControlPanel().setColorBranches(true);
ssm.addSelectionListener(this);
treeView.addMouseListener(this);
PaintRefresher.Register(treeView, parentAvport.getSequenceSetId());
- // treeTabs.addChangeListener(new ChangeListener()
- // {
- //
- // @Override
- // public void stateChanged(ChangeEvent e)
- // {
- //
- // SwingUtilities.invokeLater(new Runnable()
- // {
- //
- // @Override
- // /**
- // * Resend the selection to the tree view when tabs get switched, this
- // * has to be buried in invokeLater as Forester first resets the tree
- // * view on switching tabs, without invokeLater this would get called
- // * before Forester resets which would nullify the selection.
- // */
- // public void run()
- // {
- // treeView = archaeopteryx.getMainPanel().getCurrentTreePanel();
- // parentAvport.sendSelection();
- // // PaintRefresher.Refresh(treeView,
- // // parentAvport.getSequenceSetId());
- //
- // }
- // });
- //
- // }
- //
- // });
+ treeTabs.addChangeListener(new ChangeListener()
+ {
+
+ @Override
+ public void stateChanged(ChangeEvent e)
+ {
+
+ SwingUtilities.invokeLater(new Runnable()
+ {
+
+ @Override
+ /**
+ * Resend the selection to the tree view when tabs get switched, this
+ * has to be buried in invokeLater as Forester first resets the tree
+ * view on switching tabs, without invokeLater this would get called
+ * before Forester resets which would nullify the selection.
+ */
+ public void run()
+ {
+ treeView = archaeopteryx.getMainPanel().getCurrentTreePanel();
+ parentAvport.sendSelection();
+ // PaintRefresher.Refresh(treeView,
+ // parentAvport.getSequenceSetId());
+
+ }
+ });
+
+ }
+
+ });
}