<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_77) on Fri Apr 22 13:46:55 UTC 2016 --> <title>ImageCursor (JavaFX 8)</title> <meta name="date" content="2016-04-22"> <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="ImageCursor (JavaFX 8)"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10,"i2":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; var methods = {"i0":9,"i1":9,"i2":10,"i3":10,"i4":10,"i5":9,"i6":10,"i7":10,"i8":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/ImageCursor.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../deprecated-list.html">Deprecated</a></li> <li><a href="../../index-all.html">Index</a></li> <li><a href="../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../javafx/scene/Group.html" title="class in javafx.scene"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../javafx/scene/LightBase.html" title="class in javafx.scene"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../index.html?javafx/scene/ImageCursor.html" target="_top">Frames</a></li> <li><a href="ImageCursor.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li><a href="#fields.inherited.from.class.javafx.scene.Cursor">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">javafx.scene</div> <h2 title="Class ImageCursor" class="title">Class ImageCursor</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> <li> <ul class="inheritance"> <li><a href="../../javafx/scene/Cursor.html" title="class in javafx.scene">javafx.scene.Cursor</a></li> <li> <ul class="inheritance"> <li>javafx.scene.ImageCursor</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">ImageCursor</span> extends <a href="../../javafx/scene/Cursor.html" title="class in javafx.scene">Cursor</a></pre> <div class="block">A custom image representation of the mouse cursor. On platforms that don't support custom cursors, <code>Cursor.DEFAULT</code> will be used in place of the specified ImageCursor. <p>Example: <pre> import javafx.scene.*; import javafx.scene.image.*; Image image = new Image("mycursor.png"); Scene scene = new Scene(400, 300); scene.setCursor(new ImageCursor(image, image.getWidth() / 2, image.getHeight() /2)); </pre></div> <dl> <dt><span class="simpleTagLabel">Since:</span></dt> <dd>JavaFX 2.0</dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== PROPERTY SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="property.summary"> <!-- --> </a> <h3>Property Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Property Summary table, listing properties, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Type</th> <th class="colLast" scope="col">Property and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#hotspotXProperty">hotspotX</a></span></code> <div class="block">The X coordinate of the cursor's hot spot.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#hotspotYProperty">hotspotY</a></span></code> <div class="block">The Y coordinate of the cursor's hot spot.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#imageProperty">image</a></span></code> <div class="block">The image to display when the cursor is active.</div> </td> </tr> </table> </li> </ul> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.javafx.scene.Cursor"> <!-- --> </a> <h3>Fields inherited from class javafx.scene.<a href="../../javafx/scene/Cursor.html" title="class in javafx.scene">Cursor</a></h3> <code><a href="../../javafx/scene/Cursor.html#CLOSED_HAND">CLOSED_HAND</a>, <a href="../../javafx/scene/Cursor.html#CROSSHAIR">CROSSHAIR</a>, <a href="../../javafx/scene/Cursor.html#DEFAULT">DEFAULT</a>, <a href="../../javafx/scene/Cursor.html#DISAPPEAR">DISAPPEAR</a>, <a href="../../javafx/scene/Cursor.html#E_RESIZE">E_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#H_RESIZE">H_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#HAND">HAND</a>, <a href="../../javafx/scene/Cursor.html#MOVE">MOVE</a>, <a href="../../javafx/scene/Cursor.html#N_RESIZE">N_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#NE_RESIZE">NE_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#NONE">NONE</a>, <a href="../../javafx/scene/Cursor.html#NW_RESIZE">NW_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#OPEN_HAND">OPEN_HAND</a>, <a href="../../javafx/scene/Cursor.html#S_RESIZE">S_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#SE_RESIZE">SE_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#SW_RESIZE">SW_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#TEXT">TEXT</a>, <a href="../../javafx/scene/Cursor.html#V_RESIZE">V_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#W_RESIZE">W_RESIZE</a>, <a href="../../javafx/scene/Cursor.html#WAIT">WAIT</a></code></li> </ul> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd"> </span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#ImageCursor--">ImageCursor</a></span>()</code> <div class="block">Constructs a new empty <code>ImageCursor</code> which will look as <code>Cursor.DEFAULT</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#ImageCursor-javafx.scene.image.Image-">ImageCursor</a></span>(<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a> image)</code> <div class="block">Constructs an <code>ImageCursor</code> from the specified image.</div> </td> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#ImageCursor-javafx.scene.image.Image-double-double-">ImageCursor</a></span>(<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a> image, double hotspotX, double hotspotY)</code> <div class="block">Constructs an <code>ImageCursor</code> from the specified image and hotspot coordinates.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>static <a href="../../javafx/scene/ImageCursor.html" title="class in javafx.scene">ImageCursor</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#chooseBestCursor-javafx.scene.image.Image:A-double-double-">chooseBestCursor</a></span>(<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a>[] images, double hotspotX, double hotspotY)</code> <div class="block">Creates a custom image cursor from one of the specified images.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>static <a href="../../javafx/geometry/Dimension2D.html" title="class in javafx.geometry">Dimension2D</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#getBestSize-double-double-">getBestSize</a></span>(double preferredWidth, double preferredHeight)</code> <div class="block">Gets the supported cursor size that is closest to the specified preferred size.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>double</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#getHotspotX--">getHotspotX</a></span>()</code> <div class="block">Gets the value of the property hotspotX.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>double</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#getHotspotY--">getHotspotY</a></span>()</code> <div class="block">Gets the value of the property hotspotY.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code><a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#getImage--">getImage</a></span>()</code> <div class="block">Gets the value of the property image.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#getMaximumColors--">getMaximumColors</a></span>()</code> <div class="block">Returns the maximum number of colors supported in a custom image cursor palette.</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#hotspotXProperty--">hotspotXProperty</a></span>()</code> <div class="block">The X coordinate of the cursor's hot spot.</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#hotspotYProperty--">hotspotYProperty</a></span>()</code> <div class="block">The Y coordinate of the cursor's hot spot.</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code><a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/scene/ImageCursor.html#imageProperty--">imageProperty</a></span>()</code> <div class="block">The image to display when the cursor is active.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.javafx.scene.Cursor"> <!-- --> </a> <h3>Methods inherited from class javafx.scene.<a href="../../javafx/scene/Cursor.html" title="class in javafx.scene">Cursor</a></h3> <code><a href="../../javafx/scene/Cursor.html#cursor-java.lang.String-">cursor</a>, <a href="../../javafx/scene/Cursor.html#toString--">toString</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ PROPERTY DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="property.detail"> <!-- --> </a> <h3>Property Detail</h3> <a name="imageProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>image</h4> <pre>public final <a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a>> imageProperty</pre> <div class="block">The image to display when the cursor is active. If the image is null, <code>Cursor.DEFAULT</code> will be used.</div> <dl> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>null</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../javafx/scene/ImageCursor.html#getImage--"><code>getImage()</code></a></dd> </dl> </li> </ul> <a name="hotspotXProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>hotspotX</h4> <pre>public final <a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> hotspotXProperty</pre> <div class="block">The X coordinate of the cursor's hot spot. This hotspot represents the location within the cursor image that will be displayed at the mouse position. This must be in the range of [0,image.width-1]. A value less than 0 will be set to 0. A value greater than image.width-1 will be set to image.width-1.</div> <dl> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../javafx/scene/ImageCursor.html#getHotspotX--"><code>getHotspotX()</code></a></dd> </dl> </li> </ul> <a name="hotspotYProperty"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>hotspotY</h4> <pre>public final <a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> hotspotYProperty</pre> <div class="block">The Y coordinate of the cursor's hot spot. This hotspot represents the location within the cursor image that will be displayed at the mouse position. This must be in the range of [0,image.height-1]. A value less than 0 will be set to 0. A value greater than image.height-1 will be set to image.height-1.</div> <dl> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../javafx/scene/ImageCursor.html#getHotspotY--"><code>getHotspotY()</code></a></dd> </dl> </li> </ul> </li> </ul> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="ImageCursor--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>ImageCursor</h4> <pre>public ImageCursor()</pre> <div class="block">Constructs a new empty <code>ImageCursor</code> which will look as <code>Cursor.DEFAULT</code>.</div> </li> </ul> <a name="ImageCursor-javafx.scene.image.Image-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>ImageCursor</h4> <pre>public ImageCursor(<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a> image)</pre> <div class="block">Constructs an <code>ImageCursor</code> from the specified image. The cursor's hot spot will default to the upper left corner.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>image</code> - the image</dd> </dl> </li> </ul> <a name="ImageCursor-javafx.scene.image.Image-double-double-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>ImageCursor</h4> <pre>public ImageCursor(<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a> image, double hotspotX, double hotspotY)</pre> <div class="block">Constructs an <code>ImageCursor</code> from the specified image and hotspot coordinates.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>image</code> - the image</dd> <dd><code>hotspotX</code> - the X coordinate of the cursor's hot spot</dd> <dd><code>hotspotY</code> - the Y coordinate of the cursor's hot spot</dd> </dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getImage--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getImage</h4> <pre>public final <a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a> getImage()</pre> <div class="block">Gets the value of the property image.</div> <dl> <dt><span class="simpleTagLabel">Property description:</span></dt> <dd>The image to display when the cursor is active. If the image is null, <code>Cursor.DEFAULT</code> will be used.</dd> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>null</dd> </dl> </li> </ul> <a name="imageProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>imageProperty</h4> <pre>public final <a href="../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a><<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a>> imageProperty()</pre> <div class="block">The image to display when the cursor is active. If the image is null, <code>Cursor.DEFAULT</code> will be used.</div> <dl> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>null</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../javafx/scene/ImageCursor.html#getImage--"><code>getImage()</code></a></dd> </dl> </li> </ul> <a name="getHotspotX--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getHotspotX</h4> <pre>public final double getHotspotX()</pre> <div class="block">Gets the value of the property hotspotX.</div> <dl> <dt><span class="simpleTagLabel">Property description:</span></dt> <dd>The X coordinate of the cursor's hot spot. This hotspot represents the location within the cursor image that will be displayed at the mouse position. This must be in the range of [0,image.width-1]. A value less than 0 will be set to 0. A value greater than image.width-1 will be set to image.width-1.</dd> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>0</dd> </dl> </li> </ul> <a name="hotspotXProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>hotspotXProperty</h4> <pre>public final <a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> hotspotXProperty()</pre> <div class="block">The X coordinate of the cursor's hot spot. This hotspot represents the location within the cursor image that will be displayed at the mouse position. This must be in the range of [0,image.width-1]. A value less than 0 will be set to 0. A value greater than image.width-1 will be set to image.width-1.</div> <dl> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../javafx/scene/ImageCursor.html#getHotspotX--"><code>getHotspotX()</code></a></dd> </dl> </li> </ul> <a name="getHotspotY--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getHotspotY</h4> <pre>public final double getHotspotY()</pre> <div class="block">Gets the value of the property hotspotY.</div> <dl> <dt><span class="simpleTagLabel">Property description:</span></dt> <dd>The Y coordinate of the cursor's hot spot. This hotspot represents the location within the cursor image that will be displayed at the mouse position. This must be in the range of [0,image.height-1]. A value less than 0 will be set to 0. A value greater than image.height-1 will be set to image.height-1.</dd> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>0</dd> </dl> </li> </ul> <a name="hotspotYProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>hotspotYProperty</h4> <pre>public final <a href="../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a> hotspotYProperty()</pre> <div class="block">The Y coordinate of the cursor's hot spot. This hotspot represents the location within the cursor image that will be displayed at the mouse position. This must be in the range of [0,image.height-1]. A value less than 0 will be set to 0. A value greater than image.height-1 will be set to image.height-1.</div> <dl> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../javafx/scene/ImageCursor.html#getHotspotY--"><code>getHotspotY()</code></a></dd> </dl> </li> </ul> <a name="getBestSize-double-double-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getBestSize</h4> <pre>public static <a href="../../javafx/geometry/Dimension2D.html" title="class in javafx.geometry">Dimension2D</a> getBestSize(double preferredWidth, double preferredHeight)</pre> <div class="block">Gets the supported cursor size that is closest to the specified preferred size. A value of (0,0) is returned if the platform does not support custom cursors. <p> Note: if an image is used whose dimensions don't match a supported size (as returned by this method), the implementation will resize the image to a supported size. This may result in a loss of quality. <p> Note: These values can vary between operating systems, graphics cards and screen resolution, but at the time of this writing, a sample Windows Vista machine returned 32x32 for all requested sizes, while sample Mac and Linux machines returned the requested size up to a maximum of 64x64. Applications should provide a 32x32 cursor, which will work well on all platforms, and may optionally wish to provide a 64x64 cursor for those platforms on which it is supported.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>preferredWidth</code> - the preferred width of the cursor</dd> <dd><code>preferredHeight</code> - the preferred height of the cursor</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the supported cursor size</dd> </dl> </li> </ul> <a name="getMaximumColors--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMaximumColors</h4> <pre>public static int getMaximumColors()</pre> <div class="block">Returns the maximum number of colors supported in a custom image cursor palette. <p> Note: if an image is used which has more colors in its palette than the supported maximum, the implementation will attempt to flatten the palette to the maximum. This may result in a loss of quality. <p> Note: These values can vary between operating systems, graphics cards and screen resolution, but at the time of this writing, a sample Windows Vista machine returned 256, a sample Mac machine returned Integer.MAX_VALUE, indicating support for full color cursors, and a sample Linux machine returned 2. Applications may want to target these three color depths for an optimal cursor on each platform.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the maximum number of colors supported in a custom image cursor palette</dd> </dl> </li> </ul> <a name="chooseBestCursor-javafx.scene.image.Image:A-double-double-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>chooseBestCursor</h4> <pre>public static <a href="../../javafx/scene/ImageCursor.html" title="class in javafx.scene">ImageCursor</a> chooseBestCursor(<a href="../../javafx/scene/image/Image.html" title="class in javafx.scene.image">Image</a>[] images, double hotspotX, double hotspotY)</pre> <div class="block">Creates a custom image cursor from one of the specified images. This function will choose the image whose size most closely matched the best cursor size. The hotpotX of the returned ImageCursor is scaled by chosenImage.width/images[0].width and the hotspotY is scaled by chosenImage.height/images[0].height. <p> On platforms that don't support custom cursors, <code>Cursor.DEFAULT</code> will be used in place of the returned ImageCursor.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>images</code> - a sequence of images from which to choose, in order of preference</dd> <dd><code>hotspotX</code> - the X coordinate of the hotspot within the first image in the images sequence</dd> <dd><code>hotspotY</code> - the Y coordinate of the hotspot within the first image in the images sequence</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a cursor created from the best image</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/ImageCursor.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../deprecated-list.html">Deprecated</a></li> <li><a href="../../index-all.html">Index</a></li> <li><a href="../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../javafx/scene/Group.html" title="class in javafx.scene"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../javafx/scene/LightBase.html" title="class in javafx.scene"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../index.html?javafx/scene/ImageCursor.html" target="_top">Frames</a></li> <li><a href="ImageCursor.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li><a href="#fields.inherited.from.class.javafx.scene.Cursor">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><small><a href="https://docs.oracle.com/javase/8/docs/legal/cpyr.html">Copyright</a> (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.</small></small></p> </body> </html>