Package de.dfki.km.text20.browserplugin.services.sessionrecorder.events

Examples of de.dfki.km.text20.browserplugin.services.sessionrecorder.events.CallFunctionEvent


        if (event.getType() == FixationEventType.FIXATION_START && this.lastFixation != null) {

            final Fixation finalLastFixation = this.lastFixation;
            final Fixation currentFixation = event.getFixation();

            final Saccade saccade = new Saccade() {

                @Override
                public Fixation getStart() {
                    return finalLastFixation;
                }
View Full Code Here


                return l;
            }

            @Override
            public Saccade getSaccade() {
                return new Saccade() {

                    @Override
                    public Fixation getEnd() {
                        return current;
                    }
View Full Code Here

                public Fixation getEnd() {
                    return currentFixation;
                }
            };

            callListener(new SaccadeEvent() {

                @Override
                public Saccade getSaccade() {
                    return saccade;
                }
View Full Code Here

        // TODO: Proper handling of non-saccades between two fixations, i.e. when the time and or distance between two
        // fixation was too long, you wouldn't call it a saccade anymore.

        final Fixation last = this.lastFixation;

        callListener(new SaccadeEvent() {

            @Override
            public long getGenerationTime() {
                return l;
            }
View Full Code Here

     */
    public FixationHandler(final FixationListener listener,
                           AddGazeEvaluationListenerOption... options) {
        super(listener);

        final OptionFixationParameters defaultParameters = new OptionFixationParameters(25, 100);

        final OptionUtils<AddGazeEvaluationListenerOption> ou = new OptionUtils<AddGazeEvaluationListenerOption>(options);

        this.minimalTime = ou.get(OptionFixationParameters.class, defaultParameters).getMinimalTime();
        this.radiusFixationTime = ou.get(OptionFixationParameters.class, defaultParameters).getRadiusFixationSize();
View Full Code Here

            @Override
            public void newEvaluationEvent(final FixationEvent event) {
                newGazeEvent(event);
            }

        }, new OptionFixationParameters(30, 25, 2));
    }
View Full Code Here

        if (selectedCreator == null) {
            this.logger.warning("No handler found for requested listener " + listener.getClass().getInterfaces()[0]);
            return;
        }

        final GazeHandler spawnEvaluator = selectedCreator.spawnEvaluator(listener, new OptionGazeEvaluatorPassthrough(options), new OptionGazeEvaluator(this));

        // Even worse: the handler was unable to spawn something
        if (spawnEvaluator == null) { throw new IllegalStateException("Unable to spawn the selected evaluator. This is a bug."); }

        // Register the evaluator
View Full Code Here

        if (selectedCreator == null) {
            this.logger.warning("No handler found for requested listener " + listener.getClass().getInterfaces()[0]);
            return;
        }

        final GazeHandler spawnEvaluator = selectedCreator.spawnEvaluator(listener, new OptionGazeEvaluatorPassthrough(options), new OptionGazeEvaluator(this));

        // Even worse: the handler was unable to spawn something
        if (spawnEvaluator == null) { throw new IllegalStateException("Unable to spawn the selected evaluator. This is a bug."); }

        // Register the evaluator
View Full Code Here

        if (this.lastFixations.size() < 3) return;

        // Check if we should look for a new fixation line ...
        if (this.currentFixationLine == null) {
            final FixationLineImpl candidata = createFixationLine(getLast(3));
            final FixationLineUtil flu = new FixationLineUtil(candidata);

            // Check start of line.
            for (double d : flu.getAllAngles()) {
                if (Math.abs(d) > 0.4) return;
            }
            // if (flu.getDimension().width > 100) return;
            // if (flu.getAvgVerticalDeviation() > 50) return;

            this.currentFixationLine = candidata;
            this.avgStartLength = flu.getAvgSaccadeLength();

            dispatch(FixationLineEventType.FIXATION_LINE_STARTED);
            this.misdetected = 0;
        } else {
            // ... or for a continuation
            final FixationLineUtil flu = new FixationLineUtil(this.currentFixationLine);
            final Fixation lastProperFixation = flu.getLastFixations(1).get(0);

            final Point properCenter = lastProperFixation.getCenter();
            final Point currentCenter = getLast(1).get(0).getCenter();

            final int oldMis = this.misdetected;

            // Check backward jump distance
            if (currentCenter.x - properCenter.x < -2 * this.avgStartLength) {
                this.misdetected++;
            }

            // Check forward jump distance
            if (currentCenter.x - properCenter.x > 2.5 * this.avgStartLength) {
                this.misdetected++;
            }

            // Check angle (TODO...)
            if (Math.abs(flu.getAverageYPosition() - currentCenter.y) > 50) {
                this.misdetected++;
            }

            // Check current status and dispatch
            if (oldMis < this.misdetected) {
View Full Code Here

        //    if (!this.pseudorenderer.getStatus().contains(PseudorendererStatus.VISIBLE))
        //        return;
        // }

        final FixationLine fl = event.getFixationLine();
        final FixationLineUtil flu = new FixationLineUtil(fl);

        //
        // If the fixation line was started, pick an appropriate line of text
        //
        if (event.getEventType() == FixationLineEventType.FIXATION_LINE_STARTED) {
            //
        }

        //
        // In case the line was continued
        //
        if (event.getEventType() == FixationLineEventType.FIXATION_LINE_CONTINUED) {
            //
        }

        //
        // In case the line was continued
        //
        if (event.getEventType() == FixationLineEventType.FIXATION_LINE_ENDED) {
            //
        }

        final List<Fixation> lastFixations = flu.getLastFixations(2);

        final Fixation a = lastFixations.get(0);
        final Fixation b = lastFixations.get(1);

        dispatchWith(fl, a, b);
View Full Code Here

TOP

Related Classes of de.dfki.km.text20.browserplugin.services.sessionrecorder.events.CallFunctionEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.