|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xj3d.ui.awt.widgets.CursorManager
public class CursorManager
Manages cursor icon changes based on state listeners.
Cursor definitions are loaded from a Properties object. The properties object is located in the following sequence:
| Field Summary | |
|---|---|
boolean |
altModifier
Alt key modifier |
boolean |
ctrlModifier
Ctrl key modifier |
boolean |
shiftModifier
Shift key modifier |
| Fields inherited from interface org.web3d.browser.SensorStatusListener |
|---|
TYPE_ANCHOR, TYPE_DRAG_SENSOR, TYPE_TOUCH_SENSOR |
| Fields inherited from interface org.web3d.browser.NavigationStateListener |
|---|
EXAMINE_STATE, FLY_STATE, NO_STATE, PAN_STATE, TILT_STATE, WALK_STATE |
| Constructor Summary | |
|---|---|
CursorManager(java.awt.Component canvas,
ErrorReporter reporter)
Create a new instance of the cursor manager using the default set of images. |
|
CursorManager(java.awt.Component canvas,
java.util.Properties skinProperties,
ErrorReporter reporter)
Create a new instance of the cursor manager with a customised set of images. |
|
| Method Summary | |
|---|---|
void |
deviceActivated(int type)
Invoked when a tracker activates the sensor. |
void |
deviceNotOver(int type)
Invoked when a tracker leaves contact with a sensor. |
void |
deviceOver(int type,
java.lang.String desc)
Invoked when a sensor/anchor is in contact with a tracker capable of picking. |
CursorFilter |
getCursorFilter()
Get the cursor cursor filter. |
void |
keyPressed(java.awt.event.KeyEvent evt)
Process a key press event. |
void |
keyReleased(java.awt.event.KeyEvent evt)
Process a key release event. |
void |
keyTyped(java.awt.event.KeyEvent evt)
Process a key click event. |
void |
linkActivated(java.lang.String[] url)
Invoked when a tracker follows a link. |
void |
navigationListChanged(java.lang.String[] modes,
int numModes)
Notification that the list of valid navigation modes has changed. |
void |
navigationStateChanged(int idx)
Notification that the navigation state has changed to the new state. |
void |
setCursor(java.lang.String url,
int x,
int y)
Set the cursor to the currently specified image. |
void |
setCursorFilter(CursorFilter cf)
Set the cursor cursor filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean shiftModifier
public boolean altModifier
public boolean ctrlModifier
| Constructor Detail |
|---|
public CursorManager(java.awt.Component canvas,
ErrorReporter reporter)
throws java.lang.IllegalArgumentException
canvas - The canvas to manage cursors forreporter - The reporter instance to use or null
java.lang.IllegalArgumentException - The canvas reference is null
public CursorManager(java.awt.Component canvas,
java.util.Properties skinProperties,
ErrorReporter reporter)
throws java.lang.IllegalArgumentException
canvas - The canvas to manage cursors forskinProperties - Properties object specifying cursor image namesreporter - The reporter instance to use or null
java.lang.IllegalArgumentException - The canvas reference is null| Method Detail |
|---|
public void setCursorFilter(CursorFilter cf)
setCursorFilter in interface CursorManagercf - The filterpublic CursorFilter getCursorFilter()
getCursorFilter in interface CursorManager
public void setCursor(java.lang.String url,
int x,
int y)
setCursor in interface CursorManagerurl - The image to use. Null returns the cursor to its current statex - The center x coordinatey - The center y coordinate
public void deviceOver(int type,
java.lang.String desc)
deviceOver in interface SensorStatusListenertype - The sensor typedesc - The sensor's description stringpublic void deviceNotOver(int type)
deviceNotOver in interface SensorStatusListenertype - The sensor typepublic void deviceActivated(int type)
deviceActivated in interface SensorStatusListenertype - The sensor typepublic void linkActivated(java.lang.String[] url)
linkActivated in interface SensorStatusListenerurl - The url to load.public void navigationStateChanged(int idx)
navigationStateChanged in interface NavigationStateListeneridx - The new state expressed as an index into the current navModes list.
public void navigationListChanged(java.lang.String[] modes,
int numModes)
navigationListChanged in interface NavigationStateListenermodes - The new modesnumModes - The number of modes in the listpublic void keyPressed(java.awt.event.KeyEvent evt)
keyPressed in interface java.awt.event.KeyListenerevt - The event that caused this method to be calledpublic void keyReleased(java.awt.event.KeyEvent evt)
keyReleased in interface java.awt.event.KeyListenerevt - The event that caused this method to be calledpublic void keyTyped(java.awt.event.KeyEvent evt)
keyTyped in interface java.awt.event.KeyListenerevt - The event that caused this method to be called
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||