00001 /* 00002 * Copyright 2006 Phidgets Inc. All rights reserved. 00003 */ 00004 00005 package com.phidgets.event; 00006 00007 import com.phidgets.Phidget; 00008 00014 public class InputChangeEvent 00015 { 00016 Phidget source; 00017 int index; 00018 boolean state; 00019 00025 public InputChangeEvent(Phidget source, int index, boolean state) { 00026 this.source = source; 00027 this.index = index; 00028 this.state = state; 00029 } 00030 00038 public Phidget getSource() { 00039 return source; 00040 } 00041 00047 public int getIndex() { 00048 return index; 00049 } 00050 00056 public boolean getState() { 00057 return state; 00058 } 00059 00065 public String toString() { 00066 return source.toString() + " input " + index + " changed to " 00067 + state; 00068 } 00069 }