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


     */
    public int getLastFixatedWordPos() {
        final Fixation fixation = this.correctedFixations.get(this.correctedFixations.size() - 1);
        final Point location2 = this.pseudorenderer.convertPoint(fixation.getCenter(), CoordinatesType.SCREEN_BASED, CoordinatesType.DOCUMENT_BASED);

        final RenderElement element = getLastFixatedElement();

        // Get fixated word.
        if (element != null && element instanceof TextualRenderElement) {

            final TextualRenderElementCharPositions recp = new TextualRenderElementCharPositions();
View Full Code Here


            RenderElement r1 = null;
            RenderElement r2 = null;

            // Get elements at fixation point
            allElementsIntersecting = this.pseudorenderer.getAllElementsIntersecting(new Rectangle(p1, new Dimension(1, 1)), CoordinatesType.SCREEN_BASED, new OptionMagnetic());
            for (RenderElement renderElement : allElementsIntersecting) {
                r1 = renderElement;
            }

            allElementsIntersecting = this.pseudorenderer.getAllElementsIntersecting(new Rectangle(p2, new Dimension(1, 1)), CoordinatesType.SCREEN_BASED, new OptionMagnetic());
            for (RenderElement renderElement : allElementsIntersecting) {
                r2 = renderElement;
            }

            // Check if both are textual elements
View Full Code Here

                r2 = renderElement;
            }

            // Check if both are textual elements
            if (r1 != null && r1 instanceof TextualRenderElement && r2 != null && r2 instanceof TextualRenderElement) {
                TextualRenderElement t1 = (TextualRenderElement) r1;
                TextualRenderElement t2 = (TextualRenderElement) r2;

                int tID1 = t1.getTextID();
                int tID2 = t2.getTextID();

                if (tID1 == tID2) {
                    //System.out.println(t1.getWordID() + " --> " + t2.getWordID());
                    //System.out.println(t1.getContent() + " ---> " + t2.getContent());
View Full Code Here

        final RenderElement element = getLastFixatedElement();

        // Get fixated word.
        if (element != null && element instanceof TextualRenderElement) {

            final TextualRenderElementCharPositions recp = new TextualRenderElementCharPositions();
            return recp.getPositionOf((TextualRenderElement) element, CoordinatesType.DOCUMENT_BASED, location2);
        }

        return -1;
    }
View Full Code Here

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

            final BrainTrackingDevice device = this.deviceManager.getBrainTrackingDevice();

            if (device != null) {
                device.addTrackingListener(new BrainTrackingListener() {

                    @Override
                    public void newTrackingEvent(BrainTrackingEvent event) {
                        BrowserPluginImpl.this.sessionRecorder.newBrainTrackingEvent(event);
                    }
View Full Code Here

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

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

View Full Code Here

        if (trackerConnection == null) {
            trackerConnection = "discover://any";
        }

        // Obtain the proper tracking device here
        BrainTrackingDeviceProvider deviceProvider = this.pluginManager.getPlugin(BrainTrackingDeviceProvider.class);

        // No device is bad ... at this stage ...
        if (deviceProvider == null) {
            this.logger.warning("No brain tracker device provide found");
            return;
        }

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

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

        // If opening the device didn't work and we have autodetection, use the mouse
        if (this.brainTrackingDevice == null) {
            this.logger.info("Device did not open. No brainz today.");
            return;
View Full Code Here

        @Override
        public void newTrackingEvent(final TrackingEvent e) {
            // Sometimes null events might occur. Filter them.
            if (e == null) return;

            final BrainTrackingEvent event = new BrainTrackingEvent() {

                /* (non-Javadoc)
                 * @see de.dfki.km.text20.services.braintrackingdevices.BrainTrackingEvent#getEventTime()
                 */
                @Override
View Full Code Here

            // might block our caller ...

            try {
                // And dispatch it to the listener
                for (int i = 0; i < ServerTrackingDevice.this.trackingListener.size(); i++) {
                    final BrainTrackingListener l = ServerTrackingDevice.this.trackingListener.get(i);
                    l.newTrackingEvent(event);
                }
            } finally {
                ServerTrackingDevice.this.listenerLock.unlock();
            }
View Full Code Here

            this.deviceManager.initBrainTrackerConnection(null, getParameter("braintrackingconnection"));

            final BrainTrackingDevice device = this.deviceManager.getBrainTrackingDevice();

            if (device != null) {
                device.addTrackingListener(new BrainTrackingListener() {

                    @Override
                    public void newTrackingEvent(BrainTrackingEvent event) {
                        BrowserPluginImpl.this.sessionRecorder.newBrainTrackingEvent(event);
                    }
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.