© 2006-2007 ETH Zurich

org.ximtec.igesture.io
Class AbstractGestureDevice<E,F>

java.lang.Object
  extended by org.ximtec.igesture.io.AbstractGestureDevice<E,F>
All Implemented Interfaces:
Device, GestureDevice<E,F>
Direct Known Subclasses:
BlueToothReader, MouseReader, SwingMouseReader, TuioReader, TuioReader2D, TuioReader3D, WiiReader, WiiReader

public abstract class AbstractGestureDevice<E,F>
extends Object
implements GestureDevice<E,F>

Comment

Version:
1.0 02.12.2008
Author:
Ueli Kurmann

Constructor Summary
AbstractGestureDevice()
           
 
Method Summary
 void addGestureHandler(GestureEventListener listener)
          Add a gesture handler
abstract  void connect()
          Connect the device.
abstract  void disconnect()
          Disconnect the device.
protected  void fireGestureEvent(Gesture<?> gesture)
          Fires a Gesture Event
 int getConnectionType()
          Get the connection type of the device.
 String getDeviceClass()
          Get the device type (E.g.
 String getDeviceID()
          Get the unique identifier of the device.
 int getDeviceType()
          Get the type of the device.
 String getName()
          Get the display name for the device.
 boolean isConnectable()
          Check whether the device can be connected by the user or is automatically connected.
 boolean isConnected()
          Check whether the device is connected or not.
 boolean isDefaultDevice()
          Check whether the device is the default device.
 boolean isDisconnectable()
          Check whether the device can be disconnected by the user.
 void removeAllGestureHandler()
           
protected  void removeAllListener()
          Removes all Gesture listeners
 void removeGestureHandler(GestureEventListener listener)
          Remove a gesture handler
 void setConnectionType(int connectionType)
          Set the connection type of the device.
 void setDefaultDevice(boolean isDefault)
          Set the default device status of the device.
 void setDeviceID(String id)
          Set the unique identifier of the device.
 void setDeviceType(int deviceType)
          Set the type of the device.
 void setIsConnected(boolean isConnected)
          Change the connection status of the device.
 void setName(String name)
          Set the display name for the device.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ximtec.igesture.io.GestureDevice
clear, dispose, getChunks, getGesture, init
 

Constructor Detail

AbstractGestureDevice

public AbstractGestureDevice()
Method Detail

removeGestureHandler

public void removeGestureHandler(GestureEventListener listener)
Description copied from interface: GestureDevice
Remove a gesture handler

Specified by:
removeGestureHandler in interface GestureDevice<E,F>

addGestureHandler

public void addGestureHandler(GestureEventListener listener)
Description copied from interface: GestureDevice
Add a gesture handler

Specified by:
addGestureHandler in interface GestureDevice<E,F>

fireGestureEvent

protected void fireGestureEvent(Gesture<?> gesture)
Fires a Gesture Event

Parameters:
gesture -

removeAllListener

protected void removeAllListener()
Removes all Gesture listeners


removeAllGestureHandler

public void removeAllGestureHandler()

getDeviceID

public String getDeviceID()
Description copied from interface: Device
Get the unique identifier of the device. (e.g. MAC address)

Specified by:
getDeviceID in interface Device

setDeviceID

public void setDeviceID(String id)
Description copied from interface: Device
Set the unique identifier of the device. (e.g. MAC address)

Specified by:
setDeviceID in interface Device

getName

public String getName()
Description copied from interface: Device
Get the display name for the device.

Specified by:
getName in interface Device

setName

public void setName(String name)
Description copied from interface: Device
Set the display name for the device.

Specified by:
setName in interface Device

disconnect

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

Specified by:
disconnect in interface Device

connect

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

Specified by:
connect in interface Device

isConnectable

public boolean isConnectable()
Description copied from interface: Device
Check whether the device can be connected by the user or is automatically connected.

Specified by:
isConnectable in interface Device
Returns:

isDisconnectable

public boolean isDisconnectable()
Description copied from interface: Device
Check whether the device can be disconnected by the user.

Specified by:
isDisconnectable in interface Device
Returns:

isConnected

public boolean isConnected()
Description copied from interface: Device
Check whether the device is connected or not.

Specified by:
isConnected in interface Device
Returns:
True if connected, else false.

setIsConnected

public void setIsConnected(boolean isConnected)
Description copied from interface: Device
Change the connection status of the device.

Specified by:
setIsConnected in interface Device
Parameters:
isConnected - The new connection status.

getDeviceType

public int getDeviceType()
Description copied from interface: Device
Get the type of the device. (E.g. 2D or 3D, voice)

Specified by:
getDeviceType in interface Device

setDeviceType

public void setDeviceType(int deviceType)
Description copied from interface: Device
Set the type of the device. (E.g. 2D or 3D, voice)

Specified by:
setDeviceType in interface Device

getConnectionType

public int getConnectionType()
Description copied from interface: Device
Get the connection type of the device. (E.g. USB, BlueTooth)

Specified by:
getConnectionType in interface Device

setConnectionType

public void setConnectionType(int connectionType)
Description copied from interface: Device
Set the connection type of the device. (E.g. USB, BlueTooth)

Specified by:
setConnectionType in interface Device

isDefaultDevice

public boolean isDefaultDevice()
Description copied from interface: Device
Check whether the device is the default device.

Specified by:
isDefaultDevice in interface Device
Returns:

setDefaultDevice

public void setDefaultDevice(boolean isDefault)
Description copied from interface: Device
Set the default device status of the device.

Specified by:
setDefaultDevice in interface Device

toString

public String toString()
Specified by:
toString in interface Device
Overrides:
toString in class Object

getDeviceClass

public String getDeviceClass()
Description copied from interface: Device
Get the device type (E.g. SwingMouseReader, WiiReader, ...)

Specified by:
getDeviceClass in interface Device
Returns:
the device type.

© 2006-2007 ETH Zurich

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