Application code must explicitly invoke the Cursor.dispose()
method to release the operating system resources managed by each instance
when those instances are no longer required.
Note
Only one of the above styles may be specified.
| Modifier and Type | Field and Description |
|---|---|
| public long | handle
the handle to the OS cursor resource (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| public | |
| public | Cursor(Device
the device on which to allocate the cursor device, ImageData the color data for the cursor source, ImageData the mask data for the cursor (or null) mask, int the x coordinate of the cursor's hotspot hotspotX, int the y coordinate of the cursor's hotspot hotspotY)Constructs a new cursor given a device, image and mask data describing the desired cursor appearance, and the x and y coordinates of the hotspot (that is, the point within the area covered by the cursor which is considered to be where the on-screen pointer is "pointing"). |
| public | Cursor(Device
the device on which to allocate the cursor device, ImageData the image data for the cursor source, int the x coordinate of the cursor's hotspot hotspotX, int the y coordinate of the cursor's hotspot hotspotY)Constructs a new cursor given a device, image data describing the desired cursor appearance, and the x and y coordinates of the hotspot (that is, the point within the area covered by the cursor which is considered to be where the on-screen pointer is "pointing"). |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv long | createCursor(byte[] sourceData, byte[] maskData, int width, int height, int hotspotX, int hotspotY, boolean reverse)
|
| pack-priv void | |
| public boolean | Returns: true if the object is the same as this object and false otherwisethe object to compare with this object object)Overrides java. |
| public static Cursor | |
| public int | Returns: the receiver's hashOverrides java. |
| public boolean | Returns: true when the cursor is disposed and false otherwiseImplements abstract org. true if the cursor has been disposed,
and false otherwise.
|
| public String | Returns: a string representation of the receiverOverrides java. |
| handle | back to summary |
|---|---|
| public long handle the handle to the OS cursor resource (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms and should never be accessed from application code. | |
| Cursor | back to summary |
|---|---|
| pack-priv Cursor(Device device) | |
| Cursor | back to summary |
|---|---|
| public Cursor(Device device, int style) Constructs a new cursor given a device and a style constant describing the desired cursor appearance. You must dispose the cursor when it is no longer required. NOTE: It is recommended to useorg.
instead of using this constructor. This way you can avoid the
overhead of disposing the Cursor resource.
| |
| Cursor | back to summary |
|---|---|
| public Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int hotspotY) Constructs a new cursor given a device, image and mask data describing the desired cursor appearance, and the x and y coordinates of the hotspot (that is, the point within the area covered by the cursor which is considered to be where the on-screen pointer is "pointing"). The mask data is allowed to be null, but in this case the source must be an ImageData representing an icon that specifies both color data and mask data. You must dispose the cursor when it is no longer required.
| |
| Cursor | back to summary |
|---|---|
| public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) Constructs a new cursor given a device, image data describing the desired cursor appearance, and the x and y coordinates of the hotspot (that is, the point within the area covered by the cursor which is considered to be where the on-screen pointer is "pointing"). You must dispose the cursor when it is no longer required.
| |
| createCursor | back to summary |
|---|---|
| pack-priv long createCursor(byte[] sourceData, byte[] maskData, int width, int height, int hotspotX, int hotspotY, boolean reverse) | |
| destroy | back to summary |
|---|---|
| pack-priv void destroy() Overrides org.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. | |
| gtk_new | back to summary |
|---|---|
| public static Cursor gtk_new(Device device, long handle) Invokes platform specific functionality to allocate a new cursor. Important Note This method is not part of the public
API for
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns an integer hash code for the receiver. Any two
objects that return | |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements abstract org. Returns
This method gets the dispose state for the cursor.
When a cursor has been disposed, it is an error to
invoke any other method (except
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |