© 2006-2007 ETH Zurich

org.ximtec.igesture.io
Interface Device

All Known Subinterfaces:
GestureDevice<E,F>
All Known Implementing Classes:
AbstractGestureDevice, BlueToothReader, MouseReader, SwingMouseReader, SwingMouseReaderService, TuioReader, TuioReader2D, TuioReader3D, WiiReader, WiiReader

public interface Device

This interface defines all methods for devices, that can be managed by the device manager, must implement.

Author:
Bjorn Puype, bpuype@gmail.com

Method Summary
 void connect()
          Connect the device.
 void disconnect()
          Disconnect the device.
 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 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()
           
 

Method Detail

getDeviceID

String getDeviceID()
Get the unique identifier of the device. (e.g. MAC address)


setDeviceID

void setDeviceID(String id)
Set the unique identifier of the device. (e.g. MAC address)

Parameters:
id -

getName

String getName()
Get the display name for the device.


setName

void setName(String name)
Set the display name for the device.

Parameters:
name -

disconnect

void disconnect()
Disconnect the device.


connect

void connect()
Connect the device.


isConnectable

boolean isConnectable()
Check whether the device can be connected by the user or is automatically connected.

Returns:

isDisconnectable

boolean isDisconnectable()
Check whether the device can be disconnected by the user.

Returns:

isConnected

boolean isConnected()
Check whether the device is connected or not.

Returns:
True if connected, else false.

setIsConnected

void setIsConnected(boolean isConnected)
Change the connection status of the device.

Parameters:
isConnected - The new connection status.

getDeviceType

int getDeviceType()
Get the type of the device. (E.g. 2D or 3D, voice)


setDeviceType

void setDeviceType(int deviceType)
Set the type of the device. (E.g. 2D or 3D, voice)

Parameters:
deviceType -

getConnectionType

int getConnectionType()
Get the connection type of the device. (E.g. USB, BlueTooth)


setConnectionType

void setConnectionType(int connectionType)
Set the connection type of the device. (E.g. USB, BlueTooth)

Parameters:
connectionType -

isDefaultDevice

boolean isDefaultDevice()
Check whether the device is the default device.

Returns:

setDefaultDevice

void setDefaultDevice(boolean isDefault)
Set the default device status of the device.

Parameters:
isDefault -

toString

String toString()
Overrides:
toString in class Object

getDeviceClass

String getDeviceClass()
Get the device type (E.g. SwingMouseReader, WiiReader, ...)

Returns:
the device type.

© 2006-2007 ETH Zurich

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