edu.stanford.hci.dtools.deviceeditor.components
Class AccelerometerComponent

java.lang.Object
  extended by edu.stanford.hci.dtools.statechart.model.ModelElement
      extended by edu.stanford.hci.dtools.deviceeditor.components.IOComponent
          extended by edu.stanford.hci.dtools.deviceeditor.components.InputComponent
              extended by edu.stanford.hci.dtools.deviceeditor.components.AccelerometerComponent
All Implemented Interfaces:
java.io.Serializable, org.eclipse.ui.views.properties.IPropertySource

public class AccelerometerComponent
extends InputComponent

This software is distributed under the BSD License.

Author:
Bjoern Hartmann ( bjoern(AT)stanford.edu ), Michael Bernstein ( mbernst(AT)stanford.edu )
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.stanford.hci.dtools.deviceeditor.components.IOComponent
CONNECTION_PROP, CONTINUOUS_RANGE_MAX, CONTINUOUS_RANGE_MIN, HARDWARE_PROP, HIGHLIGHT_PROP, IMAGE_PROP, LOCATION_PROP, SIZE_PROP, SOCKET_PROP
 
Constructor Summary
AccelerometerComponent()
           
AccelerometerComponent(InputComponent copy)
           
AccelerometerComponent(java.lang.String name, java.lang.String image, org.eclipse.draw2d.geometry.Point location, org.eclipse.draw2d.geometry.Dimension dimensions, java.lang.String hardware)
           
 
Method Summary
 java.util.ArrayList<EventConditional> generateEvents()
           
 IOComponent getCopy()
           
 int getCurrentValue(edu.stanford.hci.dtools.deviceeditor.components.AccelerometerComponent.Axis axis)
           
 EventConditional getDefaultEvent(java.util.ArrayList<EventConditional> possibleEvents)
           
 java.lang.String getDefaultImage()
          Return a string representing the image that should be returned if there is no other image to use
 boolean hasEvent(EventConditional e)
          returns true if this inputcomponent has a matching event
 boolean hasOrientationChanged(edu.stanford.hci.dtools.deviceeditor.components.AccelerometerComponent.Axis axis)
           
 void update(java.lang.Object[] arguments)
          Updates the component state based on incoming messages
 
Methods inherited from class edu.stanford.hci.dtools.deviceeditor.components.InputComponent
getPropertyValue, setPropertyValue
 
Methods inherited from class edu.stanford.hci.dtools.deviceeditor.components.IOComponent
getControlSignalSources, getControlSignalTargets, getDefaultContinuousControlSignalTarget, getDefaultControlSignalSource, getDefaultDiscreteControlSignalTarget, getDeviceConfiguration, getDiagramComponent, getHardwareAddress, getHardwareConnection, getHardwareConnectionImage, getHighlighted, getImageFilename, getLocation, getName, getPrivateName, getPropertyDescriptors, getSize, getSocket, getSocketImage, getTypeName, setDeviceConfiguration, setDiagramComponent, setHardwareAddress, setHardwareConnection, setHighlighted, setImageFilename, setLocation, setName, setPrivateName, setSize, setSocket
 
Methods inherited from class edu.stanford.hci.dtools.statechart.model.ModelElement
addPropertyChangeListener, getEditableValue, isPropertySet, removePropertyChangeListener, resetPropertyValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccelerometerComponent

public AccelerometerComponent(java.lang.String name,
                              java.lang.String image,
                              org.eclipse.draw2d.geometry.Point location,
                              org.eclipse.draw2d.geometry.Dimension dimensions,
                              java.lang.String hardware)

AccelerometerComponent

public AccelerometerComponent()

AccelerometerComponent

public AccelerometerComponent(InputComponent copy)
Method Detail

hasEvent

public boolean hasEvent(EventConditional e)
Description copied from class: InputComponent
returns true if this inputcomponent has a matching event

Specified by:
hasEvent in class InputComponent

getDefaultEvent

public EventConditional getDefaultEvent(java.util.ArrayList<EventConditional> possibleEvents)
Specified by:
getDefaultEvent in class InputComponent

generateEvents

public java.util.ArrayList<EventConditional> generateEvents()
Specified by:
generateEvents in class InputComponent

getCopy

public IOComponent getCopy()
Specified by:
getCopy in class IOComponent

getDefaultImage

public java.lang.String getDefaultImage()
Description copied from class: IOComponent
Return a string representing the image that should be returned if there is no other image to use

Specified by:
getDefaultImage in class IOComponent
Returns:

update

public void update(java.lang.Object[] arguments)
Description copied from class: InputComponent
Updates the component state based on incoming messages

Specified by:
update in class InputComponent
Parameters:
arguments - arguments of the OSC message received

getCurrentValue

public int getCurrentValue(edu.stanford.hci.dtools.deviceeditor.components.AccelerometerComponent.Axis axis)

hasOrientationChanged

public boolean hasOrientationChanged(edu.stanford.hci.dtools.deviceeditor.components.AccelerometerComponent.Axis axis)