}
}
+
+ @Override
+ public void mouseMoved(MouseEvent evt)
+ {
+ if (od.isPositionInBox(evt.getX(), evt.getY()))
+ {
+ // display drag cursor at mouse position
+
+ }
+ else
+ {
+ // reset cursor
+
+ }
+ }
});
addMouseListener(new MouseAdapter()
}
else if (!av.getWrapAlignment())
{
- od.updateViewportFromMouse(evt.getX(), evt.getY(), av
- .getAlignment().getHiddenSequences(), av.getAlignment()
- .getHiddenColumns());
+ if (!od.isPositionInBox(evt.getX(), evt.getY()))
+ {
+ // don't do anything if the mouse press is in the overview's box
+ // (wait to see if it's a drag instead)
+ // otherwise update the viewport
+ od.updateViewportFromMouse(evt.getX(), evt.getY(),
+ av.getAlignment().getHiddenSequences(),
+ av.getAlignment().getHiddenColumns());
+ }
}
}
showPopupMenu(evt);
}
}
+
+
});
* mouse y position
* @return true if (x,y) is inside the box
*/
- protected boolean isPositionInBox(int x, int y)
+ public boolean isPositionInBox(int x, int y)
{
return (x > boxX && y > boxY && boxX + x < boxWidth
&& boxY + y < boxHeight);
}
+
+ public void setMousePosition(int x, int y)
+ {
+
+ }
}
\ No newline at end of file