From: kiramt Date: Thu, 11 Jan 2018 13:08:36 +0000 (+0000) Subject: JAL-2621 Updated applet code to use purely awt cursor code X-Git-Tag: Release_2_11_0~17^2~65^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bf2340eaba3b7974bc06df4fdada3de7cb596b68;p=jalview.git JAL-2621 Updated applet code to use purely awt cursor code --- diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 7431f6a..334310f 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -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 {