/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* 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.
*/
/**
* A class to encapsulate the bitmap representation of the mouse cursor.
*
* @see Component#setCursor
* @author Amy Fowler
*/
/**
* The default cursor type (gets set if no cursor is defined).
*/
/**
* The crosshair cursor type.
*/
/**
* The text cursor type.
*/
/**
* The wait cursor type.
*/
/**
* The south-west-resize cursor type.
*/
/**
* The south-east-resize cursor type.
*/
/**
* The north-west-resize cursor type.
*/
/**
* The north-east-resize cursor type.
*/
/**
* The north-resize cursor type.
*/
/**
* The south-resize cursor type.
*/
/**
* The west-resize cursor type.
*/
/**
* The east-resize cursor type.
*/
/**
* The hand cursor type.
*/
/**
* The move cursor type.
*/
/**
* @deprecated As of JDK version 1.7, the {@link #getPredefinedCursor(int)}
* method should be used instead.
*/
/**
* This field is a private replacement for 'predefined' array.
*/
/* Localization names and default values */
{ "AWT.DefaultCursor", "Default Cursor" },
{ "AWT.CrosshairCursor", "Crosshair Cursor" },
{ "AWT.TextCursor", "Text Cursor" },
{ "AWT.WaitCursor", "Wait Cursor" },
{ "AWT.SWResizeCursor", "Southwest Resize Cursor" },
{ "AWT.SEResizeCursor", "Southeast Resize Cursor" },
{ "AWT.NWResizeCursor", "Northwest Resize Cursor" },
{ "AWT.NEResizeCursor", "Northeast Resize Cursor" },
{ "AWT.NResizeCursor", "North Resize Cursor" },
{ "AWT.SResizeCursor", "South Resize Cursor" },
{ "AWT.WResizeCursor", "West Resize Cursor" },
{ "AWT.EResizeCursor", "East Resize Cursor" },
{ "AWT.HandCursor", "Hand Cursor" },
{ "AWT.MoveCursor", "Move Cursor" },
};
/**
* The chosen cursor type initially set to
* the <code>DEFAULT_CURSOR</code>.
*
* @serial
* @see #getType()
*/
/**
* The type associated with all custom cursors.
*/
/*
* hashtable, filesystem dir prefix, filename, and properties for custom cursors support
*/
return jhome +
}
private static final String systemCustomCursorPropertiesFile = systemCustomCursorDirPrefix + "cursors.properties";
/*
* JDK 1.1 serialVersionUID
*/
static {
/* ensure that the necessary native libraries are loaded */
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
new AWTAccessor.CursorAccessor() {
}
}
}
});
}
/**
* Initialize JNI field and method IDs for fields that may be
* accessed from C.
*/
private static native void initIDs();
/**
* Hook into native data.
*/
private transient long pData;
volatile long pData;
}
public void dispose() {
if (pData != 0) {
}
}
}
if (GraphicsEnvironment.isHeadless()) {
return;
}
// anchor is null after deserialization
}
} else {
}
}
/**
* The user-visible name of the cursor.
*
* @serial
* @see #getName()
*/
/**
* Returns a cursor object with the specified predefined type.
*
* @param type the type of predefined cursor
* @return the specified predefined cursor
* @throws IllegalArgumentException if the specified cursor type is
* invalid
*/
throw new IllegalArgumentException("illegal cursor type");
}
if (c == null) {
}
// fill 'predefined' array for backwards compatibility.
predefined[type] = c;
}
return c;
}
/**
* Returns a system-specific custom cursor object matching the
* specified name. Cursor names are, for example: "Invalid.16x16"
*
* @param name a string describing the desired system-specific custom cursor
* @return the system specific custom cursor named
* @exception HeadlessException if
* <code>GraphicsEnvironment.isHeadless</code> returns true
*/
throws AWTException, HeadlessException {
synchronized(systemCustomCursors) {
if (systemCustomCursorProperties == null)
}
}
return null;
}
int x = 0;
int y = 0;
try {
} catch (NumberFormatException nfe) {
}
try {
final int fx = x;
final int fy = y;
return toolkit.createCustomCursor(
}
});
} catch (Exception e) {
throw new AWTException(
" occurred while creating cursor " + name);
}
}
} else {
}
}
return cursor;
}
/**
* Return the system default cursor.
*/
}
/**
* Creates a new cursor object with the specified type.
* @param type the type of cursor
* @throws IllegalArgumentException if the specified cursor type
* is invalid
*/
@ConstructorProperties({"type"})
throw new IllegalArgumentException("illegal cursor type");
}
// Lookup localized name.
}
/**
* Creates a new custom cursor object with the specified name.<p>
* Note: this constructor should only be used by AWT implementations
* as part of their support for custom cursors. Applications should
* use Toolkit.createCustomCursor().
* @param name the user-visible name of the cursor.
* @see java.awt.Toolkit#createCustomCursor
*/
}
/**
* Returns the type for this cursor.
*/
public int getType() {
return type;
}
/**
* Returns the name of this cursor.
* @return a localized description of this cursor.
* @since 1.2
*/
return name;
}
/**
* Returns a string representation of this cursor.
* @return a string representation of this cursor.
* @since 1.2
*/
}
/*
* load the cursor.properties file
*/
synchronized(systemCustomCursors) {
systemCustomCursorProperties = new Properties();
try {
try {
fis = new FileInputStream(
} finally {
}
return null;
}
});
} catch (Exception e) {
e.getMessage() + " occurred while loading: " +
}
}
}
}