< prev index next >

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

Print this page

        

@@ -21,27 +21,29 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
-package javafx.embed.swing;
+package com.sun.javafx.embed.swing;
 
 import java.awt.Cursor;
 import java.awt.Dimension;
 import java.awt.Point;
 import java.awt.Toolkit;
 import java.awt.image.BufferedImage;
 
 import com.sun.javafx.cursor.CursorFrame;
 import com.sun.javafx.cursor.ImageCursorFrame;
 
+import javafx.embed.swing.SwingFXUtils;
+
 /**
  * An utility class to translate cursor types between embedded
  * application and Swing.
  *
  */
-class SwingCursors {
+public class SwingCursors {
 
     private static Cursor createCustomCursor(ImageCursorFrame cursorFrame) {
         Toolkit awtToolkit = Toolkit.getDefaultToolkit();
 
         double imageWidth = cursorFrame.getWidth();

@@ -55,11 +57,11 @@
         BufferedImage awtImage = SwingFXUtils.fromFXImage(
                 com.sun.javafx.tk.Toolkit.getImageAccessor().fromPlatformImage(cursorFrame.getPlatformImage()), null);
         return awtToolkit.createCustomCursor(awtImage, hotspot, null);
     }
 
-    static Cursor embedCursorToCursor(CursorFrame cursorFrame) {
+    public static Cursor embedCursorToCursor(CursorFrame cursorFrame) {
         switch (cursorFrame.getCursorType()) {
             case DEFAULT:
                 return Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
             case CROSSHAIR:
                 return Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR);

@@ -101,11 +103,11 @@
        }
 
        return Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
     }
 
-    static javafx.scene.Cursor embedCursorToCursor(Cursor cursor) {
+    public static javafx.scene.Cursor embedCursorToCursor(Cursor cursor) {
         if (cursor == null) {
             return javafx.scene.Cursor.DEFAULT;
         }
 
         switch (cursor.getType()) {
< prev index next >