public final class JalviewBinding
implements ExternalTreeViewerBindingI<PhylogenyNode>
{
+ private final MainFrame aptxFrame;
+
private org.forester.archaeopteryx.TreePanel treeView;
private AlignmentViewport parentAvport;
MessageManager.getString("label.tabs_detected_archaeopteryx"),
MessageManager.getString("label.problem_reading_tree_file"),
JvOptionPane.WARNING_MESSAGE);
- ;
+
}
// deal with/prohibit null values here as that will cause problems
+ aptxFrame = archaeopteryx;
parentAvport = jalviewAlignmentViewport;
sequencesBoundToNodes = alignMappedToNodes;
nodesBoundToSequences = nodesMappedToAlign;
ssm.addSelectionListener(this);
treeView.addMouseListener(this);
+
PaintRefresher.Register(treeView, parentAvport.getSequenceSetId());
associatedPanels = PaintRefresher
.getAssociatedPanels(parentAvport.getSequenceSetId());
- archaeopteryx.addInternalFrameListener(new InternalFrameAdapter()
+ aptxFrame.addInternalFrameListener(new InternalFrameAdapter()
{
@Override
public void internalFrameClosed(InternalFrameEvent e)
{
- AptxInit.getAllAptxFrames().remove(archaeopteryx);
+ AptxInit.getAllAptxFrames().remove(aptxFrame);
+ ssm.removeSelectionListener(JalviewBinding.this);
}
});
@Override
public void actionPerformed(ActionEvent e)
{
+ // aptxFrame.actionPerformed(e);
+
}
@Override
treeView.setFoundNodes0(
new HashSet<Long>(seqsel.getSequences().size()));
+
for (SequenceI selectedSequence : seqsel.getSequences())
{
PhylogenyNode matchingNode = sequencesBoundToNodes.get(selectedSequence);
if (!matchingNode.getBranchData().isHasBranchColor())
{
- Color foundNodesColour = treeView.getTreeColorSet()
- .getFoundColor0();
- matchingNode.getBranchData()
- .setBranchColor(new BranchColor(foundNodesColour));
+ // Color foundNodesColour = treeView.getTreeColorSet()
+ // .getFoundColor0();
+ // matchingNode.getBranchData()
+ // .setBranchColor(new BranchColor(foundNodesColour));
}
@Override
public void showMatchingChildSequences(final PhylogenyNode parentNode)
{
+ // redundancy here, Forester already iterates through tree to get all
+ // descendants
List<PhylogenyNode> childNodes = PhylogenyMethods
.getAllDescendants(parentNode);