@Override
public void actionPerformed(ActionEvent e)
{
-
}
@Override
public void mouseClicked(MouseEvent e)
{
-
}
@Override
public void mousePressed(MouseEvent e)
{
showNodeSelectionOnAlign(e);
-
}
@Override
@Override
public void mouseEntered(MouseEvent e)
{
-
}
@Override
public void mouseExited(MouseEvent e)
{
-
}
@Override
treeView.setFoundNodes0(
new HashSet<Long>(seqsel.getSequences().size()));
- for (SequenceI sequence : seqsel.getSequences())
+ for (SequenceI selectedSequence : seqsel.getSequences())
{
- PhylogenyNode matchingNode = sequencesBoundToNodes.get(sequence);
+ PhylogenyNode matchingNode = sequencesBoundToNodes.get(selectedSequence);
if (matchingNode != null)
{
treeView.getFoundNodes0().add(matchingNode.getId());
}
+ /**
+ * Note that this currently only checks external nodes
+ */
@Override
public void showNodeSelectionOnAlign(MouseEvent e)
{
final PhylogenyNode node = treeView.findNode(e.getX(), e.getY());
- if (node != null && node.isExternal())
+ if (node != null)
{
SequenceI matchingSequence = nodesBoundToSequences.get(node);
-
- if ((e.getModifiers() & InputEvent.SHIFT_MASK) != 0) // shift is pressed
- // (so multiple nodes
- // can be selected)
+ if (matchingSequence != null)
{
- }
- else
- {
- parentAvport.setSelectionGroup(null); // reset selection if shift isn't
- // pressed
- }
+ if ((e.getModifiers() & InputEvent.SHIFT_MASK) != 0) // shift is pressed
+ // (so multiple nodes
+ // can be selected)
+ {
+ // something?
+
+ }
+ else
+ {
+ parentAvport.setSelectionGroup(null); // reset selection if shift
+ // isn't
+ // pressed
+ }
- treeSelectionChanged(matchingSequence);
- parentAvport.sendSelection(); // not actually needed?
+ treeSelectionChanged(matchingSequence);
+ parentAvport.sendSelection(); // not actually needed?
- PaintRefresher.Refresh(treeView, parentAvport.getSequenceSetId());
+ PaintRefresher.Refresh(treeView, parentAvport.getSequenceSetId());
+ }
}
- }
+ }
/**
* Refactored from TreeCanvas