com.phidgets.event
Class SensorChangeEvent

java.lang.Object
  extended bycom.phidgets.event.SensorChangeEvent

public class SensorChangeEvent
extends java.lang.Object

This class represents the data for a SensorChangeEvent.

Author:
Phidgets Inc.

Constructor Summary
SensorChangeEvent(Phidget source, int index, int value)
          Class constructor.
 
Method Summary
 int getIndex()
          Returns the index of the sensor.
 Phidget getSource()
          Returns the source Phidget of this event.
 int getValue()
          Retuns the value of the sensor.
 java.lang.String toString()
          Returns a string containing information about the event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SensorChangeEvent

public SensorChangeEvent(Phidget source,
                         int index,
                         int value)
Class constructor. This is called internally by the phidget library when creating this event.

Parameters:
source - the Phidget object from which this event originated
Method Detail

getSource

public Phidget getSource()
Returns the source Phidget of this event. This is a reference to the Phidget object from which this event was called. This object can be cast into a specific type of Phidget object to call specific device calls on it.

Returns:
the event caller

getIndex

public int getIndex()
Returns the index of the sensor.

Returns:
the index of the sensor

getValue

public int getValue()
Retuns the value of the sensor. This value can range from 0-1000.

Returns:
the value of the sensor

toString

public java.lang.String toString()
Returns a string containing information about the event.

Returns:
an informative event string