JAL-2621 Updated applet code to use purely awt cursor code
authorkiramt <k.mourao@dundee.ac.uk>
Thu, 11 Jan 2018 13:08:36 +0000 (13:08 +0000)
committerkiramt <k.mourao@dundee.ac.uk>
Thu, 11 Jan 2018 13:08:36 +0000 (13:08 +0000)
src/jalview/appletgui/OverviewPanel.java

index 7431f6a..334310f 100755 (executable)
@@ -36,6 +36,7 @@ import java.awt.Image;
 import java.awt.Panel;
 import java.awt.Point;
 import java.awt.PopupMenu;
+import java.awt.Toolkit;
 import java.awt.event.ComponentAdapter;
 import java.awt.event.ComponentEvent;
 import java.awt.event.InputEvent;
@@ -88,14 +89,13 @@ public class OverviewPanel extends Panel implements Runnable,
 
     av.getRanges().addPropertyChangeListener(this);
 
-    // set up custom cursor for use on Mac...
-    Point hotSpot = new Point(16, 16);
-    String cursorName = "Custom drag cursor";
+    Toolkit toolkit = Toolkit.getDefaultToolkit();
+    Image image = toolkit.getImage("images/dragcursor.png");
 
     if (Platform.isAMac())
     {
-      dragCursor = getToolkit().createCustomCursor(dragImage, hotSpot,
-              cursorName);
+      dragCursor = toolkit.createCustomCursor(image, new Point(15, 15),
+              "drag cursor");
     }
     else
     {