net.sf.ecl.datepicker.resources
Class Cursors

java.lang.Object
  extended by net.sf.ecl.datepicker.resources.Cursors

public final class Cursors
extends Object

A cursor registy with ability to cache requested cursors. The cached cursors are disposed on release of the default Display instance.

Author:
Alexey Afanasyev, Alexey Kharlamov

Method Summary
static Cursor getAppStarting()
          Returns the cached system app startup cursor.
static Cursor getArrow()
          Returns the cached system arrow cursor.
static Cursor getCross()
          Returns the cached system cross hair cursor.
static Cursor getCursor(ImageData source)
          Returns a cached cursor given an image.
static Cursor getCursor(ImageData source, ImageData mask)
          Returns a cached cursor given an image and mask.
static Cursor getCursor(ImageData source, ImageData mask, int hotspotX, int hotspotY)
          Returns a cached cursor given an 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").
static Cursor getCursor(ImageData source, int hotspotX, int hotspotY)
          Returns a cached cursor given an image 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").
static Cursor getCursor(int cursorId)
          Returns the cached system cursor for the given id.
static Cursor getHand()
          Returns the cached system hand cursor.
static Cursor getHelp()
          Returns the cached system help cursor.
static Cursor getHSplit()
          Returns the cached horizontal split cursor.
static Cursor getIBeam()
          Returns the cached system i-beam cursor.
static Cursor getNo()
          Returns the cached system "not allowed" cursor.
static Cursor getSizeAll()
          Returns the cached system resize all directions cursor.
static Cursor getSizeE()
          Returns the cached system resize east cursor.
static Cursor getSizeN()
          Returns the cached system resize north cursor.
static Cursor getSizeNE()
          Returns the cached system resize north-east cursor.
static Cursor getSizeNESW()
          Returns the cached system resize north-east-south-west cursor.
static Cursor getSizeNS()
          Returns the cached system resize north-south cursor.
static Cursor getSizeNW()
          Returns the cached system resize north-west cursor.
static Cursor getSizeNWSE()
          Returns the cached system resize north-west-south-east cursor.
static Cursor getSizeS()
          Returns the cached system resize south cursor.
static Cursor getSizeSE()
          Returns the cached system resize south-east cursor.
static Cursor getSizeSW()
          Returns the cached system resize south-west cursor.
static Cursor getSizeW()
          Returns the cached system resize west cursor.
static Cursor getSizeWE()
          Returns the cached system resize west-east cursor.
static Cursor getUpArrow()
          Returns the cached system up arrow cursor.
static Cursor getVSplit()
          Returns the cached vertical split cursor.
static Cursor getWait()
          Returns the cached system wait cursor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAppStarting

public static Cursor getAppStarting()
Returns the cached system app startup cursor.

Returns:
the app startup cursor

getArrow

public static Cursor getArrow()
Returns the cached system arrow cursor.

Returns:
the arrow cursor

getCross

public static Cursor getCross()
Returns the cached system cross hair cursor.

Returns:
the cross hair cursor

getCursor

public static Cursor getCursor(ImageData source)
Returns a cached cursor given an image.

Parameters:
source - the color data for the cursor
Returns:
the desired cursor

getCursor

public static Cursor getCursor(ImageData source,
                               ImageData mask)
Returns a cached cursor given an image and mask.

Parameters:
source - the color data for the cursor
mask - the mask data for the cursor (or null)
Returns:
the desired cursor

getCursor

public static Cursor getCursor(ImageData source,
                               ImageData mask,
                               int hotspotX,
                               int hotspotY)
Returns a cached cursor given an 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").

Parameters:
source - the color data for the cursor
mask - the mask data for the cursor (or null)
hotspotX - the x coordinate of the cursor's hotspot
hotspotY - the y coordinate of the cursor's hotspot
Returns:
the desired cursor

getCursor

public static Cursor getCursor(ImageData source,
                               int hotspotX,
                               int hotspotY)
Returns a cached cursor given an image 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").

Parameters:
source - the color data for the cursor
hotspotX - the x coordinate of the cursor's hotspot
hotspotY - the y coordinate of the cursor's hotspot
Returns:
the desired cursor

getCursor

public static Cursor getCursor(int cursorId)
Returns the cached system cursor for the given id.

Parameters:
cursorId - the cursor id
Returns:
the desired cursor

getHand

public static Cursor getHand()
Returns the cached system hand cursor.

Returns:
the hand cursor

getHelp

public static Cursor getHelp()
Returns the cached system help cursor.

Returns:
the help cursor

getHSplit

public static Cursor getHSplit()
Returns the cached horizontal split cursor.

Returns:
the horizontal split cursor

getIBeam

public static Cursor getIBeam()
Returns the cached system i-beam cursor.

Returns:
the i-beam cursor

getNo

public static Cursor getNo()
Returns the cached system "not allowed" cursor.

Returns:
the "not allowed" cursor

getSizeAll

public static Cursor getSizeAll()
Returns the cached system resize all directions cursor.

Returns:
the resize all directions cursor

getSizeE

public static Cursor getSizeE()
Returns the cached system resize east cursor.

Returns:
the resize east cursor

getSizeN

public static Cursor getSizeN()
Returns the cached system resize north cursor.

Returns:
the resize north cursor

getSizeNE

public static Cursor getSizeNE()
Returns the cached system resize north-east cursor.

Returns:
the resize north-east cursor

getSizeNESW

public static Cursor getSizeNESW()
Returns the cached system resize north-east-south-west cursor.

Returns:
the resize north-east-south-west cursor

getSizeNS

public static Cursor getSizeNS()
Returns the cached system resize north-south cursor.

Returns:
the resize north-south cursor

getSizeNW

public static Cursor getSizeNW()
Returns the cached system resize north-west cursor.

Returns:
the resize north-west cursor

getSizeNWSE

public static Cursor getSizeNWSE()
Returns the cached system resize north-west-south-east cursor.

Returns:
the resize north-west-south-east cursor

getSizeS

public static Cursor getSizeS()
Returns the cached system resize south cursor.

Returns:
the resize south cursor

getSizeSE

public static Cursor getSizeSE()
Returns the cached system resize south-east cursor.

Returns:
the resize south-east cursor

getSizeSW

public static Cursor getSizeSW()
Returns the cached system resize south-west cursor.

Returns:
the resize south-west cursor

getSizeW

public static Cursor getSizeW()
Returns the cached system resize west cursor.

Returns:
the resize west cursor

getSizeWE

public static Cursor getSizeWE()
Returns the cached system resize west-east cursor.

Returns:
the resize west-east cursor

getUpArrow

public static Cursor getUpArrow()
Returns the cached system up arrow cursor.

Returns:
the up arrow cursor

getVSplit

public static Cursor getVSplit()
Returns the cached vertical split cursor.

Returns:
the vertical split cursor

getWait

public static Cursor getWait()
Returns the cached system wait cursor.

Returns:
the wait cursor