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

edu.berkeley.guir.lib.gesture
Interface GestureObject

All Superinterfaces:
Cloneable
All Known Subinterfaces:
GestureContainer
All Known Implementing Classes:
DefaultGestureObject

public interface GestureObject
extends Cloneable

Interface for gesture objects. Note that clone() does a deep copy. It emits propertyChangeEvents when any property changes (including author).


Field Summary
static String AUTHOR_PROP
           
static String ENABLED_PROP
          Whether the GestureObject is enabled or not.
static String PARENT_PROP
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Listen for all propertyChangeEvents
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Listen for propertyChangeEvents for a particular property
 Object clone()
          A deep copy.
 String getAuthor()
           
 GestureContainer getParent()
           
 Object getProperty(String name)
          Get the value of the named property (or null if it is not set).
 boolean hasProperty(String name)
          Returns whether the object has the current property set
 boolean isEnabled()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Stop listening for all propertyChangeEvents
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Stop listening for propertyChangeEvents for a particular property
 void setAuthor(String author)
          emits property change for property AUTHOR_PROP
 void setEnabled(boolean on)
          emits property change for property ENABLED_PROP
 void setParent(GestureContainer parent)
          emits property change for property PARENT_PROP
 void setProperty(String name, Object value)
          Set the named property to a value.
 void unsetProperty(String name)
          Unset the property.
 

Field Detail

PARENT_PROP

public static final String PARENT_PROP

ENABLED_PROP

public static final String ENABLED_PROP
Whether the GestureObject is enabled or not. Should have value true or false. (If not set, assumed it is enabled.)

AUTHOR_PROP

public static final String AUTHOR_PROP
Method Detail

setAuthor

public void setAuthor(String author)
emits property change for property AUTHOR_PROP

getAuthor

public String getAuthor()

setEnabled

public void setEnabled(boolean on)
emits property change for property ENABLED_PROP

isEnabled

public boolean isEnabled()

setParent

public void setParent(GestureContainer parent)
emits property change for property PARENT_PROP

getParent

public GestureContainer getParent()

hasProperty

public boolean hasProperty(String name)
Returns whether the object has the current property set

setProperty

public void setProperty(String name,
                        Object value)
Set the named property to a value. Null is not allowed as a key or value.

getProperty

public Object getProperty(String name)
Get the value of the named property (or null if it is not set).

unsetProperty

public void unsetProperty(String name)
Unset the property. Unsetting an already unset property has no effect. Predefined properties (e.g., author and enabled) cannot be removed and attempting to do so will result in an error.

clone

public Object clone()
A deep copy.
Overrides:
clone in class Object

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Listen for all propertyChangeEvents

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Listen for propertyChangeEvents for a particular property

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Stop listening for all propertyChangeEvents

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Stop listening for propertyChangeEvents for a particular property

Copyright Information