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 EncoderPositionChangeEvent 00015 { 00016 Phidget source; 00017 int index; 00018 int value; 00019 int time; 00020 00026 public EncoderPositionChangeEvent(Phidget source, int index, int time, int value) { 00027 this.source = source; 00028 this.index = index; 00029 this.value = value; 00030 this.time = time; 00031 } 00032 00040 public Phidget getSource() { 00041 return source; 00042 } 00043 00049 public int getIndex() { 00050 return index; 00051 } 00052 00059 public int getValue() { 00060 return value; 00061 } 00062 00069 public int getTime() 00070 { 00071 return time; 00072 } 00073 00079 public String toString() { 00080 00081 return source.toString() + " encoder position " + index + " changed by " 00082 + value + " Time: " + time; 00083 } 00084 }