< prev index next >

modules/swing/src/main/java/javafx/embed/swing/SwingCursors.java

Print this page

        

@@ -31,11 +31,10 @@
 import java.awt.Toolkit;
 import java.awt.image.BufferedImage;
 
 import com.sun.javafx.cursor.CursorFrame;
 import com.sun.javafx.cursor.ImageCursorFrame;
-import javafx.scene.image.Image;
 
 /**
  * An utility class to translate cursor types between embedded
  * application and Swing.
  *

@@ -52,11 +51,11 @@
         double scaledHotspotX = cursorFrame.getHotspotX() * nativeSize.getWidth() / imageWidth;
         double scaledHotspotY = cursorFrame.getHotspotY() * nativeSize.getHeight() / imageHeight;
         Point hotspot = new Point((int)scaledHotspotX, (int)scaledHotspotY);
 
         BufferedImage awtImage = SwingFXUtils.fromFXImage(
-                Image.impl_fromPlatformImage(cursorFrame.getPlatformImage()), null);
+                com.sun.javafx.tk.Toolkit.getImageAccessor().fromPlatformImage(cursorFrame.getPlatformImage()), null);
         return awtToolkit.createCustomCursor(awtImage, hotspot, null);
     }
 
     static Cursor embedCursorToCursor(CursorFrame cursorFrame) {
         switch (cursorFrame.getCursorType()) {
< prev index next >