© 2006-2007 ETH Zurich

org.ximtec.igesture.io.mouseclient
Class MouseReader

java.lang.Object
  extended by org.ximtec.igesture.io.AbstractGestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>
      extended by org.ximtec.igesture.io.mouseclient.MouseReader
All Implemented Interfaces:
Device, GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>, MouseHandler

public class MouseReader
extends AbstractGestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>
implements MouseHandler

A mouse reader.

Version:
1.0, Dec 2006
Author:
Ueli Kurmann, igesture@uelikurmann.ch, Beat Signer, signer@inf.ethz.ch

Constructor Summary
MouseReader()
           
 
Method Summary
 void clear()
          Deletes the current gesture.
 void connect()
          Connect the device.
 void disconnect()
          Disconnect the device.
 void dispose()
          Disposes the device.
 List<org.sigtec.ink.Point> getChunks()
          Returns chunks of a gesture while drawing it.
 Gesture<org.sigtec.ink.Note> getGesture()
          Returns the gestures.
 void handleMouseEvent(int x, int y, EnumSet<MouseUtils.MouseButton> buttons)
          Receives mouse events
 void init()
          Initializes the device.
 
Methods inherited from class org.ximtec.igesture.io.AbstractGestureDevice
addGestureHandler, fireGestureEvent, getConnectionType, getDeviceClass, getDeviceID, getDeviceType, getName, isConnectable, isConnected, isDefaultDevice, isDisconnectable, removeAllGestureHandler, removeAllListener, removeGestureHandler, setConnectionType, setDefaultDevice, setDeviceID, setDeviceType, setIsConnected, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MouseReader

public MouseReader()
Method Detail

handleMouseEvent

public void handleMouseEvent(int x,
                             int y,
                             EnumSet<MouseUtils.MouseButton> buttons)
Description copied from interface: MouseHandler
Receives mouse events

Specified by:
handleMouseEvent in interface MouseHandler

getChunks

public List<org.sigtec.ink.Point> getChunks()
Description copied from interface: GestureDevice
Returns chunks of a gesture while drawing it.

Specified by:
getChunks in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>
Returns:
chunks of a gesture.

getGesture

public Gesture<org.sigtec.ink.Note> getGesture()
Description copied from interface: GestureDevice
Returns the gestures. This method should block, if no gesture is available.

Specified by:
getGesture in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>
Returns:
the gesture.

init

public void init()
Description copied from interface: GestureDevice
Initializes the device. After executing this method, gestures can be captured.

Specified by:
init in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>

dispose

public void dispose()
Description copied from interface: GestureDevice
Disposes the device. After executing this method, gestures are not captured anymore and all dependent resources are released.

Specified by:
dispose in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>

clear

public void clear()
Description copied from interface: GestureDevice
Deletes the current gesture.

Specified by:
clear in interface GestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>

connect

public void connect()
Description copied from interface: Device
Connect the device.

Specified by:
connect in interface Device
Specified by:
connect in class AbstractGestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>

disconnect

public void disconnect()
Description copied from interface: Device
Disconnect the device.

Specified by:
disconnect in interface Device
Specified by:
disconnect in class AbstractGestureDevice<org.sigtec.ink.Note,org.sigtec.ink.Point>

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.