|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.zaval.awt.gdp.InsetsCursorInfo
This class is an implementation of CursorInfo interface. The class defines different cursors
types for nine areas of the specified component. The component area is devided as follow:
The size of the cells are defined by a top, left, right and bottom indents.
TLEFT
TOP
TRIGHT
LEFT
CENTER
RIGHT
BLEFT
BOTTOM
BRIGHT
Field Summary | |
static int |
BLEFT
Defines bottom-left area type. |
static int |
BOTTOM
Defines bottom area type. |
static int |
BRIGHT
Defines bottom-right area type. |
static int |
CENTER
Defines center area type. |
static int |
LEFT
Defines left area type. |
static int |
RIGHT
Defines right area type. |
static int |
TLEFT
Defines top-left area type. |
static int |
TOP
Defines top area type. |
static int |
TRIGHT
Defines top-right area type. |
Constructor Summary | |
InsetsCursorInfo()
Constructs a new insets cursor info. |
Method Summary | |
protected boolean |
checkAreaType(int t)
Tests if the specified area type is valid. |
protected int |
getAreaType(java.awt.Component c,
int x,
int y)
Calculates and returns an area type for the specified component and the given location. |
int |
getCursorForArea(int t)
Returns the cursor type for the specified area type. |
int |
getCursorType(java.awt.Component target,
int x,
int y)
Returns the cursor type for the specified component and location relatively the component. |
void |
setCursorForArea(int t,
int c)
Binds the specified area with the specified cursor type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
public static final int TLEFT
public static final int TRIGHT
public static final int BLEFT
public static final int BRIGHT
public static final int CENTER
Constructor Detail |
public InsetsCursorInfo()
Method Detail |
public int getCursorType(java.awt.Component target, int x, int y)
getCursorType
in interface CursorInfo
target
- the specified component.x
- the specified x coordinate relatively the component.y
- the specified y coordinate relatively the component.
public void setCursorForArea(int t, int c)
t
- the specified area type.c
- the specified cursor type.
public int getCursorForArea(int t)
protected int getAreaType(java.awt.Component c, int x, int y)
c
- the specified component.x
- the specified x coordinate relatively the component.y
- the specified y coordinate relatively the component.protected boolean checkAreaType(int t)
t
- the specified area type.true
if the specified area type is valid; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |