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

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.OutputComponent
              extended by edu.stanford.hci.dtools.deviceeditor.components.SpeakerComponent
All Implemented Interfaces:
java.io.Serializable, org.eclipse.ui.views.properties.IPropertySource

public class SpeakerComponent
extends OutputComponent

This software is distributed under the BSD License.

Author:
Michael Bernstein ( mbernst(AT)stanford.edu ), Bjoern Hartmann ( bjoern(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
SpeakerComponent()
           
SpeakerComponent(SpeakerComponent copy)
           
SpeakerComponent(java.lang.String name, java.lang.String image, org.eclipse.draw2d.geometry.Point location, org.eclipse.draw2d.geometry.Dimension dimensions, java.lang.String hardware)
          Creates a generic Speaker component
 
Method Summary
 IOComponent getCopy()
           
 javax.sound.sampled.Clip getCurrentSound()
           
 java.lang.String getDefaultImage()
          Return a string representing the image that should be returned if there is no other image to use
 boolean getMute()
           
 double getVolume()
           
 void setCurrentSound(javax.sound.sampled.Clip currentSound)
           
 void updateSpeakerState()
          Update anything interesting about the speaker (volume, mute, etc.)
 
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, getPropertyValue, getSize, getSocket, getSocketImage, getTypeName, setDeviceConfiguration, setDiagramComponent, setHardwareAddress, setHardwareConnection, setHighlighted, setImageFilename, setLocation, setName, setPrivateName, setPropertyValue, 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

SpeakerComponent

public SpeakerComponent(java.lang.String name,
                        java.lang.String image,
                        org.eclipse.draw2d.geometry.Point location,
                        org.eclipse.draw2d.geometry.Dimension dimensions,
                        java.lang.String hardware)
Creates a generic Speaker component

Parameters:
name -
image - an image you would like to draw in the background of the LED
location -
dimensions -

SpeakerComponent

public SpeakerComponent()

SpeakerComponent

public SpeakerComponent(SpeakerComponent copy)
Method Detail

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:

getVolume

public double getVolume()

getMute

public boolean getMute()

getCurrentSound

public javax.sound.sampled.Clip getCurrentSound()

setCurrentSound

public void setCurrentSound(javax.sound.sampled.Clip currentSound)

updateSpeakerState

public void updateSpeakerState()
Update anything interesting about the speaker (volume, mute, etc.)