@Override
public void mouseClicked(MouseEvent evt)
{
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
showPopupMenu(evt);
}
{
if (od.isPositionInBox(evt.getX(), evt.getY()))
{
- // display drag cursor at mouse position
- setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
+ this.getParent()
+ .setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
else
{
- // reset cursor
- setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ this.getParent()
+ .setCursor(
+ Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
}
}
@Override
public void mousePressed(MouseEvent evt)
{
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
if (!Platform.isAMac())
{
od.updateViewportFromMouse(evt.getX(), evt.getY(),
av.getAlignment().getHiddenSequences(),
av.getAlignment().getHiddenColumns());
+ getParent()
+ .setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
else
{
@Override
public void mouseDragged(MouseEvent evt)
{
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
if (!Platform.isAMac())
{
} finally
{
av = null;
+ if (oviewCanvas != null)
+ {
+ oviewCanvas.dispose();
+ }
oviewCanvas = null;
ap = null;
od = null;