import java.util.EventObject;


/**
 * @author Remi Forax
 *
 */
public class CoordinateEvent extends EventObject {

  public CoordinateEvent(Object source) {
    this(source,ALL_INDICIES,-1,-1);
  }

  public CoordinateEvent(Object source,int index,int x,int y) {
    super(source);
    this.index=index;
    this.x=x;
    this.y=y;
  }

  public int getIndex() {
    return index;
  }
  
  public int getX() {
    return x;
  }
  
  public int getY() {
    return y;
  }
  
  private final int index;
  private final int x,y;
  
  public final static int ALL_INDICIES=-1;
}
