© 2006-2007 ETH Zurich

org.ximtec.igesture.core
Class GestureSample

java.lang.Object
  extended by org.ximtec.igesture.core.DefaultPropertyChangeNotifier
      extended by org.ximtec.igesture.core.DefaultDataObject
          extended by org.ximtec.igesture.core.GestureSample
All Implemented Interfaces:
Serializable, Cloneable, DataObject, Gesture<org.sigtec.ink.Note>, PropertyChangeNotifier

public class GestureSample
extends DefaultDataObject
implements Cloneable, Gesture<org.sigtec.ink.Note>

Represents a gesture sample as for example used by the Rubine algorithm. Single gestures are represented as notes.

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

Field Summary
static String PROPERTY_GESTURE
           
static String PROPERTY_NAME
           
 
Fields inherited from class org.ximtec.igesture.core.DefaultDataObject
PROPERTY_ID
 
Fields inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier
propertyChangeSupport
 
Constructor Summary
GestureSample(GestureDevice<?,?> device, String name, org.sigtec.ink.Note gesture)
           
GestureSample(String name, org.sigtec.ink.Note gesture)
          Constructs a new gesture sample.
 
Method Summary
 void accept(Visitor visitor)
          Accepts a visitor.
 Object clone()
           
 org.sigtec.ink.Note getGesture()
          Returns the gesture sample.
 String getName()
          Returns the name of the gesture sample.
 GestureDevice<?,?> getSource()
          Get the source device of the gesture.
 void setGesture(org.sigtec.ink.Note gesture)
          Sets the sample gesture.
 void setName(String name)
          Sets the sample name.
 void setSource(GestureDevice<?,?> device)
          Set the source device of the gesture.
 String toString()
           
 
Methods inherited from class org.ximtec.igesture.core.DefaultDataObject
getId, setId
 
Methods inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ximtec.igesture.core.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

PROPERTY_NAME

public static final String PROPERTY_NAME
See Also:
Constant Field Values

PROPERTY_GESTURE

public static final String PROPERTY_GESTURE
See Also:
Constant Field Values
Constructor Detail

GestureSample

public GestureSample(String name,
                     org.sigtec.ink.Note gesture)
Constructs a new gesture sample.

Parameters:
name - the name of the gesture sample.
note - the note the sample note.

GestureSample

public GestureSample(GestureDevice<?,?> device,
                     String name,
                     org.sigtec.ink.Note gesture)
Method Detail

setName

public void setName(String name)
Sets the sample name.

Specified by:
setName in interface Gesture<org.sigtec.ink.Note>
Parameters:
name - the name to be set.

getName

public String getName()
Returns the name of the gesture sample.

Specified by:
getName in interface Gesture<org.sigtec.ink.Note>
Returns:
the gesture sample's name.

setGesture

public void setGesture(org.sigtec.ink.Note gesture)
Sets the sample gesture.

Parameters:
gesture - the gesture to be set.

getGesture

public org.sigtec.ink.Note getGesture()
Returns the gesture sample.

Specified by:
getGesture in interface Gesture<org.sigtec.ink.Note>
Returns:
the gesture sample.

accept

public void accept(Visitor visitor)
Accepts a visitor.

Specified by:
accept in interface DataObject
Specified by:
accept in interface Gesture<org.sigtec.ink.Note>
Overrides:
accept in class DefaultDataObject
Parameters:
visitor - the visitor to be used.

clone

public Object clone()
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object

getSource

public GestureDevice<?,?> getSource()
Description copied from interface: Gesture
Get the source device of the gesture.

Specified by:
getSource in interface Gesture<org.sigtec.ink.Note>
Returns:
The source device.

setSource

public void setSource(GestureDevice<?,?> device)
Description copied from interface: Gesture
Set the source device of the gesture.

Specified by:
setSource in interface Gesture<org.sigtec.ink.Note>
Parameters:
device - The source device.

© 2006-2007 ETH Zurich

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