Class SoIdleSensor
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.sensors.SoSensor
-
- com.openinventor.inventor.sensors.SoDelayQueueSensor
-
- com.openinventor.inventor.sensors.SoIdleSensor
-
public class SoIdleSensor extends SoDelayQueueSensor
Sensor for one-time only callbacks when the application is idle. An idle sensor is almost exactly like anSoOneShotSensor
, except that it is only triggered when there are no timer queue sensors waiting to be triggered and there are no events waiting to be processed; that is, idle sensors will not be triggered if the delay queue is processed because the delay queue timeout expires. If the delay queue timeout is disabled (seeSoDB.setDelaySensorTimeout()
.), idle and one-shot sensors are exactly the same.Note that idle sensors do not reschedule themselves. Inventor 1 idle sensors were always scheduled; call schedule() in the callback to duplicate that behavior.
See the
SoOneShotSensor
manual page for more information.- See Also:
SoOneShotSensor
,SoDelayQueueSensor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoIdleSensor()
Default constructor.SoIdleSensor(java.lang.Runnable task)
Builds a new idle sensor with the task to be run when this sensor is triggered
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.sensors.SoDelayQueueSensor
getDefaultPriority, getPriority, isIdleOnly, setPriority
-
Methods inherited from class com.openinventor.inventor.sensors.SoSensor
isScheduled, schedule, setTask, unschedule
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-