public class Cursor extends Resource
To obtain cursors, it is recommended to use one of the
getSystemCursor
method from class Display
.
Note: Only one of the above styles may be specified.
Constructor and Description |
---|
Cursor(Device device,
int style)
Constructs a new cursor given a device and a style
constant describing the desired cursor appearance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object)
Compares the argument to the receiver, and returns true
if they represent the same object using a class
specific comparison.
|
int |
hashCode()
Returns an integer hash code for the receiver.
|
java.lang.String |
toString()
Returns a string containing a concise, human-readable
description of the receiver.
|
dispose, getDevice, isDisposed
public Cursor(Device device, int style)
You must dispose the cursor when it is no longer required.
NOTE: It is recommended to useDisplay.getSystemCursor(int)
instead of using this constructor. This way you can avoid the
overhead of disposing the Cursor resource.device
- the device on which to allocate the cursorstyle
- the style of cursor to allocatejava.lang.IllegalArgumentException
- SWTError
- SWT.CURSOR_ARROW
,
SWT.CURSOR_WAIT
,
SWT.CURSOR_CROSS
,
SWT.CURSOR_APPSTARTING
,
SWT.CURSOR_HELP
,
SWT.CURSOR_SIZEALL
,
SWT.CURSOR_SIZENESW
,
SWT.CURSOR_SIZENS
,
SWT.CURSOR_SIZENWSE
,
SWT.CURSOR_SIZEWE
,
SWT.CURSOR_SIZEN
,
SWT.CURSOR_SIZES
,
SWT.CURSOR_SIZEE
,
SWT.CURSOR_SIZEW
,
SWT.CURSOR_SIZENE
,
SWT.CURSOR_SIZESE
,
SWT.CURSOR_SIZESW
,
SWT.CURSOR_SIZENW
,
SWT.CURSOR_UPARROW
,
SWT.CURSOR_IBEAM
,
SWT.CURSOR_NO
,
SWT.CURSOR_HAND
,
Display.getSystemCursor(int)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the object to compare with this objecttrue
if the object is the same as this object and false
otherwisehashCode()
public int hashCode()
true
when passed to
equals
must return the same value for this
method.hashCode
in class java.lang.Object
equals(java.lang.Object)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) EclipseSource and others 2002, 2016.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0