|
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.swt.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 |
|---|
| 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(org.eclipse.swt.widgets.Canvas canvas,
ErrorReporter reporter)
Create a new instance of the cursor manager using the default set of images. |
|
CursorManager(org.eclipse.swt.widgets.Canvas 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. |
void |
dispose()
Called when the application is shutting down to explicitly dispose of the referenced cursor objects |
CursorFilter |
getCursorFilter()
Get the cursor cursor filter. |
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 |
resetCanvas(org.eclipse.swt.widgets.Canvas canvas)
Called when the surface is being reset to set the new canvas object |
void |
run()
Called on the display thread to set the cursor to the canvas. |
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 |
| Constructor Detail |
|---|
public CursorManager(org.eclipse.swt.widgets.Canvas 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(org.eclipse.swt.widgets.Canvas canvas,
java.util.Properties skinProperties,
ErrorReporter reporter)
throws java.lang.IllegalArgumentException
canvas - - The canvas to manage cursors forskinProperties - - The 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 usex - 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 run()
run in interface java.lang.Runnablepublic void resetCanvas(org.eclipse.swt.widgets.Canvas canvas)
canvas - - The new canvas objectpublic void dispose()
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||