@Override
public void mouseReleased(MouseEvent e)
{
+ /*
+ * isPopupTrigger is set on mouseReleased on Windows
+ */
+ if (e.isPopupTrigger())
+ {
+ chooseSubtreeColour();
+ e.consume(); // prevent mouseClicked happening
+ }
}
/**
return;
}
- /*
- * isPopupTrigger is set on mouseReleased /
- * mouseClicked on Windows
- */
- if (evt.isPopupTrigger())
- {
- chooseSubtreeColour();
- }
- else if (evt.getClickCount() > 1)
+ if (evt.getClickCount() > 1)
{
tree.swapNodes(highlightNode);
tree.reCount(tree.getTopNode());
/*
* isPopupTrigger is set for mousePressed (Mac)
- * or mouseReleased / mouseClicked (Windows)
+ * or mouseReleased (Windows)
*/
if (e.isPopupTrigger())
{
{
Color col = new Color((int) (Math.random() * 255),
(int) (Math.random() * 255), (int) (Math.random() * 255));
- setColor((SequenceNode) tree.getGroups().elementAt(i), col.brighter());
+ setColor(tree.getGroups().elementAt(i), col.brighter());
- Vector<SequenceNode> l = tree.findLeaves((SequenceNode) tree
+ Vector<SequenceNode> l = tree.findLeaves(tree
.getGroups().elementAt(i));
Vector<SequenceI> sequences = new Vector<SequenceI>();