Cursor Class

Cursor Class

This Package | All Packages

Image
  |
  +--Cursor
public final class Cursor
extends Image

Implements a Windows cursor as a WFC object.

Fields
Name Description
APPSTARTING Topic under construction.
ARROW Topic under construction.
CROSS Topic under construction.
DEFAULT Topic under construction.
HELP Topic under construction.
HSPLIT Topic under construction.
IBEAM Topic under construction.
NO Topic under construction.
SIZEALL Topic under construction.
SIZENESW Topic under construction.
SIZENS Topic under construction.
SIZENWSE Topic under construction.
SIZEWE Topic under construction.
UPARROW Topic under construction.
VSPLIT Topic under construction.
WAIT Topic under construction.

Constructors
Name Description
Cursor(int handle) Topic under construction.
Cursor(int handle, boolean fOwned) Topic under construction.
Cursor(String fileName) Topic under construction.
Cursor(Class type, String resource) Topic under construction.
Cursor(IDataStream stream) Topic under construction.
Cursor(IStream stream) Topic under construction.
Cursor(IPicture picture) Topic under construction.

Methods
Name Description
copyHandle(int h) Retrieves a copy of the cursor.
copyHandle() Retrieves a copy of the cursor.
drawStretchTo(Graphics g, int x, int y, int width, int height, int rop) Draws this image to the given DC and stretches it to the given width and height.
drawTo(Graphics g, int x, int y, int width, int height, int rop) Draws this image to the given device context (DC).
finalize() Topic under construction.
getClipRect() Returns the current cursor clipping rectangle in screen coordinates.
getExtension() Topic under construction.
getHandle() Topic under construction.
getPICTDESC() Topic under construction.
getPosition() Returns the current cursor position in screen coordinates.
getSize() Topic under construction.
hide() Hides the cursor.
setClipRect(Rectangle r) Sets the cursor clipping rectangle.
setCurrent() sets the current system cursor to be this cursor
setPosition(Point p) Moves the cursor to the specified screen coordinates.
show() Displays the cursor.
toString() Topic under construction.

Fields

Cursor.APPSTARTING

Syntax
public static final Cursor APPSTARTING;
Description
Topic under construction.

Cursor.ARROW

Syntax
public static final Cursor ARROW;
Description
Topic under construction.

Cursor.CROSS

Syntax
public static final Cursor CROSS;
Description
Topic under construction.

Cursor.DEFAULT

Syntax
public static final Cursor DEFAULT;
Description
Topic under construction.

Cursor.HELP

Syntax
public static final Cursor HELP;
Description
Topic under construction.

Cursor.HSPLIT

Syntax
public static final Cursor HSPLIT;
Description
Topic under construction.

Cursor.IBEAM

Syntax
public static final Cursor IBEAM;
Description
Topic under construction.

Cursor.NO

Syntax
public static final Cursor NO;
Description
Topic under construction.

Cursor.SIZEALL

Syntax
public static final Cursor SIZEALL;
Description
Topic under construction.

Cursor.SIZENESW

Syntax
public static final Cursor SIZENESW;
Description
Topic under construction.

Cursor.SIZENS

Syntax
public static final Cursor SIZENS;
Description
Topic under construction.

Cursor.SIZENWSE

Syntax
public static final Cursor SIZENWSE;
Description
Topic under construction.

Cursor.SIZEWE

Syntax
public static final Cursor SIZEWE;
Description
Topic under construction.

Cursor.UPARROW

Syntax
public static final Cursor UPARROW;
Description
Topic under construction.

Cursor.VSPLIT

Syntax
public static final Cursor VSPLIT;
Description
Topic under construction.

Cursor.WAIT

Syntax
public static final Cursor WAIT;
Description
Topic under construction.

Constructors

Cursor.Cursor

Syntax 1
public Cursor( int handle );
Description

Topic under construction.



Syntax 2
public Cursor( int handle, boolean fOwned );
Description

Topic under construction.



Syntax 3
public Cursor( String fileName );
Description

Topic under construction.



Syntax 4
public Cursor( Class type, String resource );
Description

Topic under construction.



Syntax 5
public Cursor( IDataStream stream );
Description

Topic under construction.



Syntax 6
public Cursor( IStream stream );
Description

Topic under construction.



Syntax 7
public Cursor( IPicture picture );
Description

Topic under construction.

Methods

Cursor.copyHandle

Syntax 1
public static int copyHandle( int h );
Parameters
h
The handle to the cursor.
Description

Retrieves a copy of the cursor.



Syntax 2
public static int copyHandle();
Description

Retrieves a copy of the cursor.

Cursor.drawStretchTo

Syntax
public void drawStretchTo( Graphics g, int x, int y, int width, int height, int rop );
Parameters
dc
The HDC to draw to (supplied by Graphics).
x
The x cooridnate to start drawing.
width
The width to stretch to.
height
The height to stretch to.
rop
The ROP code.
Description

Draws this image to the given DC and stretches it to the given width and height. This is used by Graphics to draw any type of image.

Cursor.drawTo

Syntax
public void drawTo( Graphics g, int x, int y, int width, int height, int rop );
Parameters
dc
The HDC to draw to (supplied by Graphics).
x
The x coordinate to start drawing.
y
The y coordinate to start drawing.
width
The width to draw to.
height
The height to draw to.
rop
The ROP code.
Description

Draws this image to the given device context (DC). This is used by Graphics to draw any type of image.

Cursor.finalize

Syntax
public void finalize();
Description

Topic under construction.

Cursor.getClipRect

Syntax
public static Rectangle getClipRect();
Description

Returns the current cursor clipping rectangle in screen coordinates. If the cursor is not currently clipped, the resulting rectangle contains the dimensions of the entire screen.

Cursor.getExtension

Syntax
public String getExtension();
Description

Topic under construction.

Cursor.getHandle

Syntax
public int getHandle();
Description

Topic under construction.

Cursor.getPICTDESC

Syntax
public PICTDESC getPICTDESC();
Description

Topic under construction.

Cursor.getPosition

Syntax
public static Point getPosition();
Description

Returns the current cursor position in screen coordinates.

Cursor.getSize

Syntax
public Point getSize();
Description

Topic under construction.

Cursor.hide

Syntax
public static void hide();
Description

Hides the cursor. For every call to Cursor.hide(), there must be a balancing call to Cursor.show().

Cursor.setClipRect

Syntax
public static void setClipRect( Rectangle r );
Parameters
r
The clipping rectangle. If this parameter is null, the cursor is free to move anywhere on the screen.
Description

Sets the cursor clipping rectangle. The cursor is confined to the given rectangular area on the screen. If a subsequent cursor position (set by the setClipRect() method or the mouse) lies outside the rectangle, Windows automatically adjusts the position to keep the cursor inside the rectangular area.

Cursor.setCurrent

Syntax
public void setCurrent();
Description

sets the current system cursor to be this cursor

Cursor.setPosition

Syntax
public static void setPosition( Point p );
Description

Moves the cursor to the specified screen coordinates. If the new coordinates are not within the screen rectangle set by the most recent setClipRect() call, Windows automatically adjusts the coordinates so that the cursor stays within the rectangle.

Cursor.show

Syntax
public static void show();
Description

Displays the cursor. For every call to Cursor.hide(), there must be a balancing call to Cursor.show().

Cursor.toString

Syntax
public String toString();
Description

Topic under construction.