src/dk/itu/pitlab/libeyetracking/core/TrackingManager.java
public synchronized void init() throws RuntimeException {
        if (!gaze.isActivated()) {
            if (!gaze.activate(ApiVersion.VERSION_1_0, ClientMode.PUSH))
                throw new RuntimeException("Could not activate TET gaze API.");
        }
        // Entirely enclose data update. Gaze updates
        // must be performed by LegoGazeManager and
        // the data thereby laundered.
        gaze.addGazeListener(new IGazeListener() {
            @Override
            public void onGazeUpdate(GazeData data) {
                synchronized (TrackingManager.this) {
                    // Propagate sample to quality listener if any is set.
                    if (TrackingManager.this.getGazeQualityListener() != null)
                        dispatchSafely(data, TrackingManager.this.getGazeQualityListener());
                    TrackingManager.this.onGazeUpdate(data);
                }
            }
        });
    }
/**
     * Initializes the TET client as demonstrated in the Java tutorial.
     *
     * @throws LegoGazeException If initialization was unsuccessful.
     */
Initializes the TET client as demonstrated in the Java tutorial.
@throws LegoGazeException If initialization was unsuccessful.
Initializes the TET client as demonstrated in the Java tutorial . @throws LegoGazeException If initialization was unsuccessful .
public synchronized void init() throws RuntimeException {
        if (!gaze.isActivated()) {
            if (!gaze.activate(ApiVersion.VERSION_1_0, ClientMode.PUSH))
                throw new RuntimeException("Could not activate TET gaze API.");
        }
        gaze.addGazeListener(new IGazeListener() {
            @Override
            public void onGazeUpdate(GazeData data) {
                synchronized (TrackingManager.this) {
                    if (TrackingManager.this.getGazeQualityListener() != null)
                        dispatchSafely(data, TrackingManager.this.getGazeQualityListener());
                    TrackingManager.this.onGazeUpdate(data);
                }
            }
        });
    }
public synchronized void init ( ) throws RuntimeException { if ( ! gaze . isActivated ( ) ) { if ( ! gaze . activate ( ApiVersion . VERSION_1_0 , ClientMode . PUSH ) ) throw new RuntimeException ( "Could not activate TET gaze API." ) ; } gaze . addGazeListener ( new IGazeListener ( ) { @ Override public void onGazeUpdate ( GazeData data ) { synchronized ( TrackingManager . this ) { if ( TrackingManager . this . getGazeQualityListener ( ) != null ) dispatchSafely ( data , TrackingManager . this . getGazeQualityListener ( ) ) ; TrackingManager . this . onGazeUpdate ( data ) ; } } } ) ; }
Initializes the TET client as demonstrated in the Java tutorial.
Initializes the TET client as demonstrated in the Java tutorial .
// Entirely enclose data update. Gaze updates // must be performed by LegoGazeManager and // the data thereby laundered. // Propagate sample to quality listener if any is set.