© 2006-2007 ETH Zurich

org.ximtec.igesture.core
Class DefaultSampleDescriptor<T>

java.lang.Object
  extended by org.ximtec.igesture.core.DefaultPropertyChangeNotifier
      extended by org.ximtec.igesture.core.DefaultDataObject
          extended by org.ximtec.igesture.core.DefaultDescriptor
              extended by org.ximtec.igesture.core.DefaultSampleDescriptor<T>
All Implemented Interfaces:
Serializable, DataObject, Descriptor, PropertyChangeNotifier
Direct Known Subclasses:
SampleDescriptor, SampleDescriptor3D

public abstract class DefaultSampleDescriptor<T>
extends DefaultDescriptor

Describes a gesture by a set of gesture samples.

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_SAMPLES
           
 
Fields inherited from class org.ximtec.igesture.core.DefaultDataObject
PROPERTY_ID
 
Fields inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier
propertyChangeSupport
 
Constructor Summary
DefaultSampleDescriptor()
          Constructs a new sample descriptor.
 
Method Summary
 void accept(Visitor visitor)
          Accepts a visitor.
 void addSample(Gesture<T> sample)
          Adds a sample to the descriptor.
 Gesture<T> getSample(int index)
          Returns the gesture sample for a given index position.
 List<Gesture<T>> getSamples()
          Returns the samples.
 void removeSample(Gesture<T> sample)
          Removes a sample from the gesture set.
 String toString()
           
 
Methods inherited from class org.ximtec.igesture.core.DefaultDescriptor
getName, getType
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ximtec.igesture.core.DataObject
getId, setId
 
Methods inherited from interface org.ximtec.igesture.core.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

PROPERTY_SAMPLES

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

DefaultSampleDescriptor

public DefaultSampleDescriptor()
Constructs a new sample descriptor.

Method Detail

getSamples

public List<Gesture<T>> getSamples()
Returns the samples.

Returns:
the samples.

getSample

public Gesture<T> getSample(int index)
Returns the gesture sample for a given index position.

Parameters:
index - the position of the sample to be returned.
Returns:
the sample at the specified index position.

addSample

public void addSample(Gesture<T> sample)
Adds a sample to the descriptor.

Parameters:
sample - the sample to be added.

removeSample

public void removeSample(Gesture<T> sample)
Removes a sample from the gesture set.

Parameters:
sample - the sample to be removed.

accept

public void accept(Visitor visitor)
Accepts a visitor.

Specified by:
accept in interface DataObject
Overrides:
accept in class DefaultDataObject
Parameters:
visitor - the visitor to be used.

toString

public String toString()
Overrides:
toString in class Object

© 2006-2007 ETH Zurich

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