UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.gesture
Class GestureCategory

java.lang.Object
  |
  +--java.util.Observable
        |
        +--edu.berkeley.guir.lib.gesture.DefaultGestureObject
              |
              +--edu.berkeley.guir.lib.gesture.AbstractGestureContainer
                    |
                    +--edu.berkeley.guir.lib.gesture.GestureCategory
All Implemented Interfaces:
Cloneable, GestureContainer, GestureObject, Observer, Serializable

public class GestureCategory
extends AbstractGestureContainer
implements Serializable, Observer, Cloneable

Collection of Gestures.

See Also:
Serialized Form

Inner classes inherited from class edu.berkeley.guir.lib.gesture.AbstractGestureContainer
AbstractGestureContainer.MyCollectionListener, AbstractGestureContainer.MyPropChangeListener
 
Field Summary
protected  boolean directionInvariant
           
protected  Vector gestures
           
protected  boolean orientationInvariant
           
protected  boolean sizeInvariant
           
 
Fields inherited from class edu.berkeley.guir.lib.gesture.AbstractGestureContainer
collectionListener, listenerList, name, propChangeListener
 
Fields inherited from class edu.berkeley.guir.lib.gesture.DefaultGestureObject
author, parent, propChangeSupport, properties
 
Fields inherited from interface edu.berkeley.guir.lib.gesture.GestureContainer
CHILD_CHANGE_PROP, CHILDREN_PROP, NAME_PROP
 
Fields inherited from interface edu.berkeley.guir.lib.gesture.GestureObject
AUTHOR_PROP, ENABLED_PROP, PARENT_PROP
 
Constructor Summary
GestureCategory()
           
GestureCategory(String name)
           
GestureCategory(Vector gestureVector, String name)
           
 
Method Summary
 void addGesture(Gesture g)
           
 Object clone()
          A deep copy.
 Gesture gestureAt(int i)
           
protected  List getChildren()
           
 Class[] getChildTypes()
          Returns an array of all the valid types for children of this container.
 int getGestureIndex(Gesture target)
          returns -1 if target not in the set
 boolean isDirectionInvariant()
           
 boolean isDot()
           
 boolean isOrientationInvariant()
           
 boolean isSizeInvariant()
           
static GestureCategory read(Reader reader)
           
static GestureCategory read(TokenReader r)
           
 void removeGesture(Gesture g)
           
 void replace(GestureCategory gc)
           
 void setDirectionInvariance(boolean on)
           
 void setExamplesEnabled(boolean enabled)
          Enable or disable all examples
 void setOrientationInvariance(boolean on)
           
 void setSizeInvariance(boolean on)
           
 String toString()
           
 void update(Observable gesture, Object arg)
           
 void write(Writer writer)
           
 
Methods inherited from class edu.berkeley.guir.lib.gesture.AbstractGestureContainer
add, addCollectionListener, contains, findAncestorOfClass, fireCollectionEvent, fireCollectionEvent, fixParents, getChild, getChild, getChildList, getEnabledChildren, getName, getProperty, getUniqueName, hasProperty, indexOf, isChildType, iterator, remove, removeCollectionListener, setName, setProperty, setPropertyOnTree, size
 
Methods inherited from class edu.berkeley.guir.lib.gesture.DefaultGestureObject
addPropertyChangeListener, addPropertyChangeListener, getAuthor, getParent, isEnabled, readProperties, removePropertyChangeListener, removePropertyChangeListener, setAuthor, setEnabled, setParent, unsetProperty, writeProperties
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.berkeley.guir.lib.gesture.GestureObject
addPropertyChangeListener, addPropertyChangeListener, getAuthor, getParent, isEnabled, removePropertyChangeListener, removePropertyChangeListener, setAuthor, setEnabled, setParent, unsetProperty
 

Field Detail

gestures

protected Vector gestures

directionInvariant

protected boolean directionInvariant

orientationInvariant

protected boolean orientationInvariant

sizeInvariant

protected boolean sizeInvariant
Constructor Detail

GestureCategory

public GestureCategory()

GestureCategory

public GestureCategory(String name)

GestureCategory

public GestureCategory(Vector gestureVector,
                       String name)
Method Detail

getChildren

protected List getChildren()
Overrides:
getChildren in class AbstractGestureContainer

addGesture

public void addGesture(Gesture g)

gestureAt

public Gesture gestureAt(int i)

getGestureIndex

public int getGestureIndex(Gesture target)
returns -1 if target not in the set

removeGesture

public void removeGesture(Gesture g)

replace

public void replace(GestureCategory gc)

update

public void update(Observable gesture,
                   Object arg)
Specified by:
update in interface Observer

isDot

public boolean isDot()

clone

public Object clone()
Description copied from interface: GestureObject
A deep copy.
Overrides:
clone in class AbstractGestureContainer

isSizeInvariant

public boolean isSizeInvariant()

setSizeInvariance

public void setSizeInvariance(boolean on)

isDirectionInvariant

public boolean isDirectionInvariant()

setDirectionInvariance

public void setDirectionInvariance(boolean on)

isOrientationInvariant

public boolean isOrientationInvariant()

setOrientationInvariance

public void setOrientationInvariance(boolean on)

setExamplesEnabled

public void setExamplesEnabled(boolean enabled)
Enable or disable all examples

getChildTypes

public Class[] getChildTypes()
Description copied from interface: GestureContainer
Returns an array of all the valid types for children of this container.

write

public void write(Writer writer)
           throws IOException

read

public static GestureCategory read(Reader reader)
                            throws IOException,
                                   ParseException

read

public static GestureCategory read(TokenReader r)
                            throws IOException,
                                   ParseException

toString

public String toString()
Overrides:
toString in class Object

Copyright Information