107 /**
108 * The hand cursor type.
109 */
110 public static final int HAND_CURSOR = 12;
111
112 /**
113 * The move cursor type.
114 */
115 public static final int MOVE_CURSOR = 13;
116
117 /**
118 * @deprecated As of JDK version 1.7, the {@link #getPredefinedCursor(int)}
119 * method should be used instead.
120 */
121 @Deprecated
122 protected static Cursor predefined[] = new Cursor[14];
123
124 /**
125 * This field is a private replacement for 'predefined' array.
126 */
127 private final static Cursor[] predefinedPrivate = new Cursor[14];
128
129 /* Localization names and default values */
130 static final String[][] cursorProperties = {
131 { "AWT.DefaultCursor", "Default Cursor" },
132 { "AWT.CrosshairCursor", "Crosshair Cursor" },
133 { "AWT.TextCursor", "Text Cursor" },
134 { "AWT.WaitCursor", "Wait Cursor" },
135 { "AWT.SWResizeCursor", "Southwest Resize Cursor" },
136 { "AWT.SEResizeCursor", "Southeast Resize Cursor" },
137 { "AWT.NWResizeCursor", "Northwest Resize Cursor" },
138 { "AWT.NEResizeCursor", "Northeast Resize Cursor" },
139 { "AWT.NResizeCursor", "North Resize Cursor" },
140 { "AWT.SResizeCursor", "South Resize Cursor" },
141 { "AWT.WResizeCursor", "West Resize Cursor" },
142 { "AWT.EResizeCursor", "East Resize Cursor" },
143 { "AWT.HandCursor", "Hand Cursor" },
144 { "AWT.MoveCursor", "Move Cursor" },
145 };
146
147 /**
432 systemCustomCursorProperties = new Properties();
433
434 try {
435 AccessController.doPrivileged(
436 (PrivilegedExceptionAction<Object>) () -> {
437 try (InputStream is = Cursor.class
438 .getResourceAsStream(PROPERTIES_FILE)) {
439 systemCustomCursorProperties.load(is);
440 }
441 return null;
442 });
443 } catch (Exception e) {
444 systemCustomCursorProperties = null;
445 throw new AWTException("Exception: " + e.getClass() + " " +
446 e.getMessage() + " occurred while loading: " +
447 PROPERTIES_FILE);
448 }
449 }
450 }
451
452 private native static void finalizeImpl(long pData);
453 }
|
107 /**
108 * The hand cursor type.
109 */
110 public static final int HAND_CURSOR = 12;
111
112 /**
113 * The move cursor type.
114 */
115 public static final int MOVE_CURSOR = 13;
116
117 /**
118 * @deprecated As of JDK version 1.7, the {@link #getPredefinedCursor(int)}
119 * method should be used instead.
120 */
121 @Deprecated
122 protected static Cursor predefined[] = new Cursor[14];
123
124 /**
125 * This field is a private replacement for 'predefined' array.
126 */
127 private static final Cursor[] predefinedPrivate = new Cursor[14];
128
129 /* Localization names and default values */
130 static final String[][] cursorProperties = {
131 { "AWT.DefaultCursor", "Default Cursor" },
132 { "AWT.CrosshairCursor", "Crosshair Cursor" },
133 { "AWT.TextCursor", "Text Cursor" },
134 { "AWT.WaitCursor", "Wait Cursor" },
135 { "AWT.SWResizeCursor", "Southwest Resize Cursor" },
136 { "AWT.SEResizeCursor", "Southeast Resize Cursor" },
137 { "AWT.NWResizeCursor", "Northwest Resize Cursor" },
138 { "AWT.NEResizeCursor", "Northeast Resize Cursor" },
139 { "AWT.NResizeCursor", "North Resize Cursor" },
140 { "AWT.SResizeCursor", "South Resize Cursor" },
141 { "AWT.WResizeCursor", "West Resize Cursor" },
142 { "AWT.EResizeCursor", "East Resize Cursor" },
143 { "AWT.HandCursor", "Hand Cursor" },
144 { "AWT.MoveCursor", "Move Cursor" },
145 };
146
147 /**
432 systemCustomCursorProperties = new Properties();
433
434 try {
435 AccessController.doPrivileged(
436 (PrivilegedExceptionAction<Object>) () -> {
437 try (InputStream is = Cursor.class
438 .getResourceAsStream(PROPERTIES_FILE)) {
439 systemCustomCursorProperties.load(is);
440 }
441 return null;
442 });
443 } catch (Exception e) {
444 systemCustomCursorProperties = null;
445 throw new AWTException("Exception: " + e.getClass() + " " +
446 e.getMessage() + " occurred while loading: " +
447 PROPERTIES_FILE);
448 }
449 }
450 }
451
452 private static native void finalizeImpl(long pData);
453 }
|