From: kiramt Date: Wed, 21 Feb 2018 09:28:40 +0000 (+0000) Subject: JAL-2778 Adjust cursor changes in overview panel X-Git-Tag: Release_2_10_4~67^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5b6eb3fadc2a092be98c0c122bcd788a22eeb95d;p=jalview.git JAL-2778 Adjust cursor changes in overview panel --- diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 8ce597d..3bbbe95 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -155,6 +155,10 @@ public class OverviewPanel extends Panel implements Runnable, if (!od.isPositionInBox(evt.getX(), evt.getY())) { draggingBox = false; + + // display drag cursor at mouse position + setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + od.updateViewportFromMouse(evt.getX(), evt.getY(), av.getAlignment().getHiddenSequences(), av.getAlignment().getHiddenColumns()); @@ -172,6 +176,7 @@ public class OverviewPanel extends Panel implements Runnable, @Override public void mouseReleased(MouseEvent evt) { + draggingBox = false; } @Override diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index 28ad3c5..02d54a8 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -208,6 +208,10 @@ public class OverviewPanel extends JPanel if (!od.isPositionInBox(evt.getX(), evt.getY())) { draggingBox = false; + + // display drag cursor at mouse position + setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + od.updateViewportFromMouse(evt.getX(), evt.getY(), av.getAlignment().getHiddenSequences(), av.getAlignment().getHiddenColumns()); @@ -230,6 +234,13 @@ public class OverviewPanel extends JPanel showPopupMenu(evt); } } + + @Override + public void mouseReleased(MouseEvent evt) + { + draggingBox = false; + } + }); }