import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
-import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
/**
if (evt.isPopupTrigger()) // Mac: mousePressed
{
rightMouseButtonPressed(evt, res);
+ return;
}
- else if (SwingUtilities.isRightMouseButton(evt) && !Platform.isAMac())
+ if (Platform.isWinRightButton(evt))
{
/*
* defer right-mouse click handling to mouse up on Windows
*/
return;
}
- else
- {
- leftMouseButtonPressed(evt, res);
- }
+ leftMouseButtonPressed(evt, res);
}
/**
mouseDragging = false;
ap.getSeqPanel().stopScrolling();
+ // todo res calculation should be a method on AlignViewport
int xCords = Math.max(0, evt.getX()); // prevent negative X coordinates
ViewportRanges ranges = av.getRanges();
int res = (xCords / av.getCharWidth())
{
if (mouseDragging)
{
+ mouseDragging = false;
ap.getSeqPanel().stopScrolling();
}
}
@Override
public void paintComponent(Graphics g)
{
- super.paintComponent(g);
+ //super.paintComponent(g); // BH 2019
/*
* shouldn't get called in wrapped mode as the scale above is