Package de.dfki.km.text20.browserplugin.services.mastergazehandler.impl.gazehandler.old

Examples of de.dfki.km.text20.browserplugin.services.mastergazehandler.impl.gazehandler.old.ReadingHandlerOld$Event


                BrowserPluginImpl.this.sessionRecorder.newTrackingEvent(event);
            }
        });

        // Store the device info
        final EyeTrackingDevice trackingDevice = this.deviceManager.getEyeTrackingDevice();
        this.sessionRecorder.storeDeviceInfo(trackingDevice.getDeviceInfo());

        // Setup eye tracking device
        if ($(getParameter("enablebraintracker")).get("false").equals("true")) {
            this.logger.info("Enabling Brain Tracker");
            this.deviceManager.initBrainTrackerConnection(null, getParameter("braintrackingconnection"));
View Full Code Here


         * de.dfki.km.augmentedtext.services.trackingdevices.TrackingDevice#
         * getDeviceInfo()
         */
        @Override
        public EyeTrackingDeviceInfo getDeviceInfo() {
            return new EyeTrackingDeviceInfo() {

                @Override
                public String getInfo(final String key) {
                    if (ServerTrackingDevice.this.deviceInformation == null) return null;

View Full Code Here

            };
        }

        @Override
        public EyeTrackingDeviceInfo getDeviceInfo() {
            return new EyeTrackingDeviceInfo() {

                @Override
                public String getInfo(final String key) {
                    return null;
                }
View Full Code Here

        }

        this.logger.fine("Getting device with selector " + deviceSelector);

        // Obtain the proper tracking device here
        EyeTrackingDeviceProvider deviceProvider = this.pluginManager.getPlugin(EyeTrackingDeviceProvider.class, new OptionCapabilities(deviceSelector));

        // No device is bad ... at this stage ...
        if (deviceProvider == null) {
            this.logger.warning("No tracking device found for " + deviceSelector + "!");
            return;
        }

        this.logger.info("Device found, opening connection to " + trackerConnection);

        // Now open the device
        this.eyeTrackingDevice = deviceProvider.openDevice(trackerConnection);

        // If opening the device didn't work and we have autodetection, use the mouse
        if (this.eyeTrackingDevice == null && autoDetection) {

            this.logger.info("Device did not open. Trying mouse.");

            deviceSelector = "eyetrackingdevice:mouse";

            // Obtain the fallback device here
            deviceProvider = this.pluginManager.getPlugin(EyeTrackingDeviceProvider.class, new OptionCapabilities(deviceSelector));

            // No device is bad ... at this stage ...
            if (deviceProvider == null) {
                this.logger.warning("Still no tracking device found for " + deviceSelector + ". This is really bad.");
                return;
            }

            // Now open the fallback device
            this.eyeTrackingDevice = deviceProvider.openDevice(trackerConnection);

            // Bad luck today.
            if (this.eyeTrackingDevice == null) {
                this.logger.warning("No device found. This is terminal.");
                return;
View Full Code Here

    /* (non-Javadoc)
     * @see de.dfki.km.augmentedtext.services.trackingdevices.TrackingListener#newTrackingEvent(de.dfki.km.augmentedtext.services.trackingdevices.TrackingEvent)
     */
    @Override
    public void newTrackingEvent(final EyeTrackingEvent event) {
        EyeTrackingEvent filteredEvent = event;

        // Sanity check
        if (event == null) return;

        // We ignore invalid points.
View Full Code Here

     */
    @SuppressWarnings("unused")
    private long getAgeOf(final List<EyeTrackingEvent> events) {
        if (events.size() <= 1) return 0;

        final EyeTrackingEvent first = events.get(0);
        final EyeTrackingEvent last = events.get(events.size() - 1);

        return last.getEventTime() - first.getEventTime();
    }
View Full Code Here

     */
    public long getStartTime() {
        final Fixation fixation = this.$fixations.compact().get(0);
        if (fixation == null || fixation.getTrackingEvents() == null) return 0;

        final EyeTrackingEvent trackingEvent = fixation.getTrackingEvents().get(0);
        if (trackingEvent == null) return 0;

        return trackingEvent.getEventTime();
    }
View Full Code Here

     */
    public long getStopTime() {
        final Fixation fixation = this.$fixations.compact().get(-1);
        if (fixation == null || fixation.getTrackingEvents() == null) return 0;

        final EyeTrackingEvent trackingEvent = $(fixation.getTrackingEvents()).get(-1);
        if (trackingEvent == null) return 0;

        return trackingEvent.getEventTime();
    }
View Full Code Here

                        final PointerInfo pointerInfo = MouseInfo.getPointerInfo();

                        // Obtain information from the mouse
                        final Point point = pointerInfo.getLocation();

                        final EyeTrackingEvent event = createEvent(point);

                        MouseTrackingDevice.this.listenerLock.lock();
                        // And dispatch it to the listener
                        for (int i = 0; i < MouseTrackingDevice.this.trackingListener.size(); i++) {
                            final EyeTrackingListener l = MouseTrackingDevice.this.trackingListener.get(i);
View Full Code Here

                this.listenerLock.unlock();
            }
        }

        public EyeTrackingEvent createEvent(final Point p) {
            return new EyeTrackingEvent() {

                long et = System.currentTimeMillis();

                @Override
                public boolean areValid(final EyeTrackingEventValidity... validities) {
View Full Code Here

TOP

Related Classes of de.dfki.km.text20.browserplugin.services.mastergazehandler.impl.gazehandler.old.ReadingHandlerOld$Event

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.