org.zaval.awt.gdp
Class SimpleCursorInfo


java.lang.Object

  |

  +--org.zaval.awt.gdp.SimpleCursorInfo

All Implemented Interfaces:
CursorInfo

public class SimpleCursorInfo
extends java.lang.Object
implements CursorInfo

This class is a simple implementation of CursorInfo interface. Using the implementation it is possible to bind the cursor type with the specified target component.


Constructor Summary
SimpleCursorInfo(int t)
           Constructs a new simple cursor info with the specified cursor type.
 
Method Summary
 int getCursorType(java.awt.Component target, int x, int y)
           Returns the cursor type for the specified component and location relatively the component.
 void setCursorType(int t)
           Sets the specified cursor type that will be returnd by getCursorType method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCursorInfo


public SimpleCursorInfo(int t)
Constructs a new simple cursor info with the specified cursor type. The class will always return the cursor type by getCursorType method.
Parameters:
t - the specified cursor type.
Method Detail

setCursorType


public void setCursorType(int t)
Sets the specified cursor type that will be returnd by getCursorType method.
Parameters:
t - the specified cursor type.

getCursorType


public int getCursorType(java.awt.Component target,
                         int x,
                         int y)
Returns the cursor type for the specified component and location relatively the component. The method implementation returns a cursor type that has been defined by setCursorType method or during the class initialization.
Specified by:
getCursorType in interface CursorInfo
Parameters:
target - the specified component.
x - the specified x coordinate relatively the component.
y - the specified y coordinate relatively the component.


Copyright © Zaval Creative Engineering Group, 2000-2005
http://www.zaval.org