src/dk/itu/pitlab/libeyetracking/core/Calibration.java
private final boolean nextPoint() {
        if (points.isEmpty())
            return false;

        final Point2D next;
        // The most obscure one-liner for
        // "if (!firstPointTaken) firstPointTaken = true;"
        // Usually I would not do this, but today I feel dangerous!
        if (!firstPointTaken == (firstPointTaken = true))
            next = points.remove(0);
        else
            next = points.remove(random.nextInt(points.size()));

        showPoint(next, new Runnable() {
            @Override
            public void run() {
                gaze.calibrationPointStart((int) next.x, (int) next.y);
                try {
                    Thread.sleep(sampleTime.toMillis());
                } catch (InterruptedException e) {
                    System.err.println("Warning: Sleep was interrupted during calibration.");
                }
                gaze.calibrationPointEnd();
            }
        });

        return true;
    }
/**
     * Calls the implementation of {@link Calibration#showPoint(Point2D, Runnable)} internally.
     *
     * @return True if there is another next point, false otherwise.
     */
Calls the implementation of  Calibration#showPoint(Point2D, Runnable) internally.
@return True if there is another next point, false otherwise.
Calls the implementation of Calibration#showPoint ( Point2D Runnable ) internally . @return True if there is another next point false otherwise .
private final boolean nextPoint() {
        if (points.isEmpty())
            return false;
        final Point2D next;
        if (!firstPointTaken == (firstPointTaken = true))
            next = points.remove(0);
        else
            next = points.remove(random.nextInt(points.size()));
        showPoint(next, new Runnable() {
            @Override
            public void run() {
                gaze.calibrationPointStart((int) next.x, (int) next.y);
                try {
                    Thread.sleep(sampleTime.toMillis());
                } catch (InterruptedException e) {
                    System.err.println("Warning: Sleep was interrupted during calibration.");
                }
                gaze.calibrationPointEnd();
            }
        });
        return true;
    }
private final boolean nextPoint ( ) { if ( points . isEmpty ( ) ) return false ; final Point2D next ; if ( ! firstPointTaken == ( firstPointTaken = true ) ) next = points . remove ( 0 ) ; else next = points . remove ( random . nextInt ( points . size ( ) ) ) ; showPoint ( next , new Runnable ( ) { @ Override public void run ( ) { gaze . calibrationPointStart ( ( int ) next . x , ( int ) next . y ) ; try { Thread . sleep ( sampleTime . toMillis ( ) ) ; } catch ( InterruptedException e ) { System . err . println ( "Warning: Sleep was interrupted during calibration." ) ; } gaze . calibrationPointEnd ( ) ; } } ) ; return true ; }
Calls the implementation of {@link Calibration#showPoint(Point2D, Runnable)} internally.
Calls the implementation of { @link Calibration#showPoint ( Point2D Runnable ) } internally .
// The most obscure one-liner for // "if (!firstPointTaken) firstPointTaken = true;" // Usually I would not do this, but today I feel dangerous!